streamich-api-js

0.0.9 • Public • Published

Streamich JavaScript API Client

JavaScript browser client for streamich.com API.

You might consider using streamich-api-jsonp which provides exactly the same functionality, but uses JSONP requests instead of reqwest library, which this package uses.

Usage

Standalone library.

Take the streamich-api-jsonp.js file from /build directory.

Include it in your web project:

<script src="js/streamich-api-jsonp.js"></script>

This will export a global object StreamichApi, which you use as follows:

var api = StreamichApi({
    key: "<YOUR_API_KEY>"
});

api.things("<ID>", function(err, res) {
    console.log(err, res);
});

With Webpack, Browserify, Require.js

You can also use this library as a module in Webpack, Browserify, or Require.js bundle.

Install the library:

npm install streamich-api-jsonp

Use it as follows:

var StreamichApi = require("streamich-api-jsonp");

var api = StreamichApi({
    key: "<YOUR_API_KEY>"
});

api.things("<ID>", function(err, res) {
    console.log(err, res);
});

API

For full command reference see streamich-api.

api.ping(cb);
api.things(id, cb);
api.things.mentions(id, cb);
// etc...

Development

webpack -p
git ...
npm publish   

Readme

Keywords

none

Package Sidebar

Install

npm i streamich-api-js

Weekly Downloads

9

Version

0.0.9

License

none

Last publish

Collaborators

  • streamich