stream-node
.. image:: https://circleci.com/gh/tschellenbach/stream-python.png?circle-token=ca08d1aa53fd4f9c3255a89bde5cb08c59b9586a
:target: https://circleci.com/gh/tschellenbach/stream-python/tree/master
.. image:: https://coveralls.io/repos/tschellenbach/stream-python/badge.png
:target: https://coveralls.io/r/tschellenbach/stream-python
stream-node is a Node/Javascript client for Stream <https://getstream.io/>
_.
.. code-block:: javascript
var stream = require('getstream');
// Instantiate a new client (server side)
client = stream.connect('YOUR_API_KEY', 'API_KEY_SECRET')
// Instantiate a new client (client side)
client = stream.connect('YOUR_API_KEY')
// Find your API keys here https://getstream.io/dashboard/
// Instantiate a feed object server side
user1 = client.feed('user:1');
// Instantiate a feed object client side
user1 = client.feed('user:1', 'FEED_SECRET');
// Get activities from 5 to 10 (slow pagination)
user1.get({limit:5, offset:5}, callback);
// (Recommended & faster) Filter on an id less than 112334
user1.get({limit:5, id_lt:112334}, callback);
// Create a new activity
activity = {'actor': 1, 'verb': 'tweet', 'object': 1};
user1.addActivity(activity, callback);
// Remove an activity by its id
user1.removeActivity('12345678910');
// Follow another feed
user1.follow('flat:42');
// Stop following another feed
user1.unfollow('flat:42');
Docs are available on GetStream.io
_.
.. _GetStream.io: http://getstream.io/docs/
Installation
Install from NPM
.. code-block:: bash
npm install getstream
Install using bower
.. code-block:: bash
# comming soon
Contributing
First, make sure you can run the test suite. Tests are run via Mocha
.. code-block:: bash
mocha test/integration/index.js