Constructor
new ConnectionStreams(connection)
##Coverage of the API
- GET /streams -- 100%
- POST /streams -- only data (no object)
- PUT /streams -- 0%
- DELETE /streams/{stream-id} -- 0%
Parameters:
Name | Type | Description |
---|---|---|
connection |
Connection |
- Source:
Members
delete
- Source:
Methods
create(streamData, callback)
TODO make it object-aware like for Events TODO why to we need a _create ? TODO could return Stream object synchronously before calling the API
Parameters:
Name | Type | Description |
---|---|---|
streamData |
||
callback |
- Source:
get(options, callback)
Parameters:
Name | Type | Description |
---|---|---|
options |
ConnectionStreamsOptions | |
callback |
ConnectionStreams~getCallback | handles the response |
- Source:
getById(streamId)
TODO remove it's unused and could lead to miscomprehension Get a Stream by it's Id. Works only if fetchStructure has been done once.
Parameters:
Name | Type | Description |
---|---|---|
streamId |
string |
- Source:
Throws:
-
Connection.fetchStructure must have been called before.
- Type
- Error
getDisplayTree(arrayOfStreams)
Utility to debug a tree structure
Parameters:
Name | Type | Description |
---|---|---|
arrayOfStreams |
Array.<ConnectionStreams> |
- Source:
getFlatenedObjects(options, done)
Get the all the streams of the Tree in a list.. parents firsts
Parameters:
Name | Type | Description |
---|---|---|
options |
ConnectionStreams~options | |
done |
ConnectionStreams~getFlatenedObjectsDone |
- Source:
toJSON(arrayOfStreams)
Utility to get a Stream Tree as if was sent by the API
Parameters:
Name | Type | Description |
---|---|---|
arrayOfStreams |
Array.<ConnectionStreams> |
- Source:
updateProperties(options, callback)
TODO remove it's unused
Parameters:
Name | Type | Description |
---|---|---|
options |
ConnectionStreamsOptions | |
callback |
ConnectionStreams~getCallback | handles the response |
- Source:
walkTree(options, eachStream, done)
Walk the tree structure.. parents are always announced before childrens
Parameters:
Name | Type | Description |
---|---|---|
options |
ConnectionStreams~options | |
eachStream |
ConnectionStreams~walkTreeEachStreams | |
done |
ConnectionStreams~walkTreeDone |
- Source:
Type Definitions
getCallback(error, result)
Called with the desired streams as result.
Parameters:
Name | Type | Description |
---|---|---|
error |
Object | eventual error |
result |
Array.<Stream> |
- Source:
walkTreeDone()
Called when walk is done
- Source:
walkTreeEachStreams(stream)
Called once per streams
Parameters:
Name | Type | Description |
---|---|---|
stream |
Stream |
- Source: