Skip to content
Snippets Groups Projects
Commit 90212c59 authored by Matej Kokol's avatar Matej Kokol
Browse files

added remote item discovery

parent 7e7d019a
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@ export class DataBroker {
}
/**
* Runs a discovery on the Data Broker and returns a list of items, where each item represents a Thing Description (TD).
* Runs a local discovery on the Data Broker and returns a list of items, where each item represents a Thing Description (TD).
*
* @method items
* @param {string} query - JSON Path query to filter items. Use '$' for all items.
......@@ -45,6 +45,17 @@ export class DataBroker {
return this._sbClient.post<ItemTD[]>('discovery', { data: query })
}
/**
* Runs a remote discovery on the Data Broker and returns a list of items from your partners, where each item represents a Thing Description (TD).
*
* @method remoteItems
* @param {string} query - JSON Path query to filter items. Use '$' for all items.
* @returns {Promise<ItemTD[]>} A promise that resolves to an array of Thing Descriptions (`ItemTD[]`).
*/
remoteItems(query: string): Promise<ItemTD[]> {
return this._sbClient.post<ItemTD[]>('discovery/remote', { data: query })
}
/**
* Retrieves the value read from a property of an Item.
*
......
{
"name": "spade-node-js-client",
"version": "1.0.2",
"version": "1.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "spade-node-js-client",
"version": "1.0.2",
"version": "1.1.0",
"license": "EPL-2.0",
"dependencies": {
"axios": "^1.7.7"
......
{
"name": "spade-node-js-client",
"version": "1.0.2",
"version": "1.1.0",
"description": "A client-side JavaScript library that can be used to iteract with Data Broker's API.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment