Class Feed

Class Summary
Constructor Attributes Constructor Name and Description
 
Feed(masterApikey)
Create an instance of Feed

Method Summary

Method Attributes Method Name and Description
 
create(dataSource, callback, optionalDataFormat)
Create new feed: POST /v2/feeds
 
createKey(id, dataSource, callback, optionalDataFormat)
Create API key: POST /v2/{env}/keys
 
delete(feedID, callback)
Delete feed: DELETE /v2/feeds/
 
deleteKey(id, keyID, callback)
Delete API key: DELETE /v2/{env}/keys/
 
history(id, start, end, interval, callback, optionalDataFormat)
Historical Queries
 
list(parameters, callback, OptionalDataFormat)
List all available feeds: GET /v2/feeds
 
listKey(The, The, Optional)
List API keys: GET /v2/{env}/keys
 
read(feedID, parameters, callback, optionalDataFormat)
Read feed: GET /v2/feeds/
 
readKey(id, keyID, callback, optionalDataFormat)
Read API key: GET /v2/{env}/keys/
 
update(feedID, dataSource, callback, optionalDataFormat)
Update feed: PUT /v2/feeds/

Class Detail

Feed(masterApikey)
Create an instance of Feed
Parameters:
{string} masterApikey
Your pachube api key.

Method Detail

  • create(dataSource, callback, optionalDataFormat)
    Create new feed: POST /v2/feeds
    Parameters:
    {string} dataSource
    The data source, a path, a string or an object.
    {function} callback
    The callbak function.
    {string} optionalDataFormat
    Optional data format parameter, json, xml csv, default to json.
  • createKey(id, dataSource, callback, optionalDataFormat)
    Create API key: POST /v2/{env}/keys
    Parameters:
    {string|number} id
    The current environment id, could be feed, stream, or point id.
    {string|object} dataSource
    The data source, could be a paht, a string or an object.
    {function} callback
    The callback function.
    {string} optionalDataFormat
    Optional data format parameter, could be json or xml.
  • delete(feedID, callback)
    Delete feed: DELETE /v2/feeds/
    Parameters:
    {number} feedID
    The feed id.
    {function} callback
    The callback function.
  • deleteKey(id, keyID, callback)
    Delete API key: DELETE /v2/{env}/keys/
    Parameters:
    {string|number} id
    The current environment id, could be feed, stream, or point id.
    {string} keyID
    The key id.
    {function} callback
    The callback function.
  • history(id, start, end, interval, callback, optionalDataFormat)
    Historical Queries
    Parameters:
    {string|number} id
    The current environment id, could be feed, stream, or point id.
    {string} start
    The start timestamp, e.g. 2010-05-20T11:01:46Z.
    {end} end
    The end timestamp, e.g. 2010-05-21T11:01:46Z.
    {number} interval
    The time interval, intergel number.
    {function} callback
    The callback function.
    {string} optionalDataFormat
    Optional data format parameter, could be json or xml.
  • list(parameters, callback, OptionalDataFormat)
    List all available feeds: GET /v2/feeds
    Parameters:
    {object} parameters
    The parameters object.
    {function} callback
    The callback function.
    {string} OptionalDataFormat
    Optional data format parameter, json ,xml or csv, default json.
  • listKey(The, The, Optional)
    List API keys: GET /v2/{env}/keys
    Parameters:
    {string|number} The
    current environment id, could be feed, stream, or point id.
    {function} The
    callback function.
    {string} Optional
    data format parameter, could be json or xml.
  • read(feedID, parameters, callback, optionalDataFormat)
    Read feed: GET /v2/feeds/
    Parameters:
    {number} feedID
    The feed id.
    {object} parameters
    Optinal parameters object.
    {function} callback
    The callback function.
    {string} optionalDataFormat
    Optional data format parameter, json, xml or csv, default json.
  • readKey(id, keyID, callback, optionalDataFormat)
    Read API key: GET /v2/{env}/keys/
    Parameters:
    {string|number} id
    The current environment id, could be feed, stream, or point id.
    {string} keyID
    The key id.
    {function} callback
    The callback function.
    {string} optionalDataFormat
    Optional data format parameter, could be json or xml.
  • update(feedID, dataSource, callback, optionalDataFormat)
    Update feed: PUT /v2/feeds/
    Parameters:
    {number} feedID
    The feed id.
    {string} dataSource
    The data source, a path, a string or an object.
    {function} callback
    The callback function.
    {string} optionalDataFormat
    Optional data format parameter, json, xml csv, default json.