@smapiot/piral-cloud-node v1.14.0-pre.20240430.5
@smapiot/piral-cloud-node
Node-usable API Client for the Piral Feed Service.
This package is compatible with Node.js v12 or higher.
Important Links
- 📢 We are hiring! - work with us on Piral, its ecosystem and our users
- 🌍 Website - learn more about the Piral Feed Service
- 📖 Documentation - everything to get started and master the Piral Feed Service
- 👪 Community Chat - ask questions and provide answers in our Gitter room
Installation
The package can be installed with your favorite npm client, e.g.:
npm i @smapiot/piral-cloud-node
Once installed the package is ready to be used.
Usage
To use the package you need to import the createServiceClient
function and call it:
const { createServiceClient } = require('@smapiot/piral-cloud-node');
const client = createServiceClient({
apiKey: '123...',
});
// use the client
If you want to use it with your own Piral Feed Service instance then provide the host
option:
const { createServiceClient } = require('@smapiot/piral-cloud-node');
const client = createServiceClient({
apiKey: '123...',
host: 'http://localhost:9000',
});
// use the client
Example
If you want to just manipulate a feed you can go ahead and use the doUpdateFeed
function.
const { createServiceClient } = require('@smapiot/piral-cloud-node');
const client = createServiceClient({
apiKey: '123...',
});
const feedId = 'my-feed';
console.log('Before', await client.doQueryFeed(feedId));
await client.doUpdateFeed(feedId, {
contributors: ['a@b.com', 'c@d.com'],
});
console.log('After', await client.doQueryFeed(feedId));
Everything is fully typed using TypeScript declarations.
License
This SDK is released using the MIT license. For more information see the license file.
5 days ago
5 days ago
5 days ago
5 days ago
5 days ago
6 days ago
6 days ago
6 days ago
6 days ago
12 days ago
12 days ago
11 days ago
13 days ago
13 days ago
16 days ago
16 days ago
17 days ago
17 days ago
17 days ago
17 days ago
19 days ago
18 days ago
19 days ago
19 days ago
19 days ago
26 days ago
26 days ago
27 days ago
27 days ago
30 days ago
1 month ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
3 months ago
3 months ago
3 months ago
2 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
9 months ago
7 months ago
8 months ago
10 months ago
10 months ago
10 months ago
7 months ago
9 months ago
11 months ago
11 months ago
11 months ago
11 months ago
12 months ago
11 months ago
11 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago