Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SPADE-Node-JS-Client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eclipse Research Labs
SPADE Project
SPADE-Node-JS-Client
Commits
90212c59
Commit
90212c59
authored
8 months ago
by
Matej Kokol
Browse files
Options
Downloads
Patches
Plain Diff
added remote item discovery
parent
7e7d019a
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/data-broker.ts
+12
-1
12 additions, 1 deletion
lib/data-broker.ts
package-lock.json
+2
-2
2 additions, 2 deletions
package-lock.json
package.json
+1
-1
1 addition, 1 deletion
package.json
with
15 additions
and
4 deletions
lib/data-broker.ts
+
12
−
1
View file @
90212c59
...
...
@@ -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.
*
...
...
This diff is collapsed.
Click to expand it.
package-lock.json
+
2
−
2
View file @
90212c59
{
"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"
...
...
This diff is collapsed.
Click to expand it.
package.json
+
1
−
1
View file @
90212c59
{
"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"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment