0.0.2 • Published 9 years ago

streamich-api v0.0.2

Weekly downloads
11
License
-
Repository
-
Last release
9 years ago

Streamich API Interface

Defines the interface of streamich.com API.

This package cannot be used on its own. Use instead:

  1. streamich-api-jsonp or streamich-api-js -- for browser environments, or
  2. streamich-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);