streamich-api-jsonp

0.0.2 • Public • Published

Streamich JavaScript API Client over JSONP

This library is browser client for api.streamich.com. It has exactly the same features as streamich-api-js library, but instead of using reqwest for executing HTTP request this library uses a built-in JSONP client, which makes this library some 4x smaller.

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-jsonp

Weekly Downloads

2

Version

0.0.2

License

none

Last publish

Collaborators

  • streamich