Added GET_QDN_RESOURCE_PROPERTIES Q-App action.

This commit is contained in:
CalDescent 2023-03-19 08:56:06 +00:00
parent 519bb10c60
commit 713fd4f0c6
2 changed files with 18 additions and 0 deletions

View File

@ -141,6 +141,7 @@ Here is a list of currently supported actions:
- LIST_QDN_RESOURCES - LIST_QDN_RESOURCES
- SEARCH_QDN_RESOURCES - SEARCH_QDN_RESOURCES
- GET_QDN_RESOURCE_STATUS - GET_QDN_RESOURCE_STATUS
- GET_QDN_RESOURCE_PROPERTIES
- FETCH_QDN_RESOURCE - FETCH_QDN_RESOURCE
- PUBLISH_QDN_RESOURCE - PUBLISH_QDN_RESOURCE
- GET_WALLET_BALANCE - GET_WALLET_BALANCE
@ -278,6 +279,17 @@ let res = await qortalRequest({
}); });
``` ```
### Get QDN resource properties
```
let res = await qortalRequest({
action: "GET_QDN_RESOURCE_PROPERTIES",
name: "QortalDemo",
service: "THUMBNAIL",
identifier: "qortal_avatar" // Optional
});
// Returns: filename, size, mimeType (where available)
```
### Publish QDN resource ### Publish QDN resource
_Requires user approval_ _Requires user approval_
``` ```

View File

@ -208,6 +208,12 @@ window.addEventListener("message", (event) => {
response = httpGet(url); response = httpGet(url);
break; break;
case "GET_QDN_RESOURCE_PROPERTIES":
let identifier = (data.identifier != null) ? data.identifier : "default";
url = "/arbitrary/resource/properties/" + data.service + "/" + data.name + "/" + identifier;
response = httpGet(url);
break;
case "SEARCH_CHAT_MESSAGES": case "SEARCH_CHAT_MESSAGES":
url = "/chat/messages?"; url = "/chat/messages?";
if (data.before != null) url = url.concat("&before=" + data.before); if (data.before != null) url = url.concat("&before=" + data.before);