0.0.2 • Published 9 years ago
streamich-api v0.0.2
Streamich API Interface
Defines the interface of streamich.com API.
This package cannot be used on its own. Use instead:
streamich-api-jsonp
orstreamich-api-js
-- for browser environments, orstreamich-api-node
-- for Node.js environment.
API
api.ping(cb); // GET /ping
api.things(id, cb); // GET /things/<id>
api.things.mentions(id, cb); // GET /things/<id>/mentions
...
Call arbitrary API endpoints:
// Retrieve a single thing.
api.client.get("things/<ID>", function(err, res) {
console.log(err, res);
});
// Execute ping command and provide custom query string parameters and headers.
api.client.get("ping", params, headers, function(err, res) {
console.log(err, res);
});
// Execute arbitrary request.
api.client.request("https://api.streamich.com/", "ping", params, "GET", body, headers, cb);