app_streams

Methods

(inner) createStream(options) → {Promise}

Source:
Create an app stream for the authenticated app. The options object must at least include "objectType", which is an array of up to 5(!) valid apps streams to subscribe to. Allowed values are: post, bookmark, follow, mute, block, message, channel, channel_subscription, token and user You can optionally add "key: 'myfancykeyname'" to name your stream. If you do not supply your own key, you get back a generated one from the API which you need to keep track of.
Parameters:
Name Type Description
options Object Option object.
Returns:
Type
Promise

(inner) deleteStream(streamKey) → {Promise}

Source:
See:
Delete a specific app stream by its key.
Example
const { meta, data } = await pnut.deleteStream("myStreamKey");
Parameters:
Name Type Description
streamKey string A stream key.
Returns:
Type
Promise

(inner) deleteStreams() → {Promise}

Source:
See:
Delete all app streams for the authorized app.
Example
const { meta, data } = await pnut.deleteStreams();
Returns:
Type
Promise

(inner) stream(streamKey, paramsopt) → {Promise}

Source:
See:
Get a specific app stream by its key.
Example
const { meta, data } = await pnut.stream("myStreamKey");
Parameters:
Name Type Attributes Description
streamKey string A stream key
params Object <optional>
Additional URI parameters
Returns:
Type
Promise

(inner) streams(paramsopt) → {Promise}

Source:
See:
Get a specific app stream by its key.
Example
const { meta, data } = await pnut.streams();
Parameters:
Name Type Attributes Description
params Object <optional>
Additional URI parameters
Returns:
Type
Promise

(inner) updateStream(options) → {Promise}

Source:
Update an app stream for the authorized app. Same rules as in createStream apply, but "key" is no longer optional and must be supplied to identify the stream you want to update.
Parameters:
Name Type Description
options Object Options object
Returns:
Type
Promise