Skip to content

flow-io/from-twitter

Repository files navigation

from-twitter

NPM version Build Status Coverage Status Dependencies

Provides a stream interface for the Twitter stream API.

Installation

$ npm install flow-from-twitter

For use in the browser, use browserify.

Usage

var stream = require( 'flow-from-twitter' );

stream( [options] )

...TODO.

To set the stream options,

var opts = {
	
};

// TODO: demo use

stream.factory( [options] )

Returns a reusable stream factory. The factory method ensures streams are configured identically by using the same set of provided options.

var opts = {
	
};

var factory = require( 'flow-from-twitter' ).factory( opts );

// TODO: demo use

stream.objectMode( [options] )

This method is a convenience function to create streams which always operate in objectMode. The method will always override the objectMode option in options.

var stream = require( 'flow-from-twitter' ).objectMode;

// TODO: demo use

Examples

var createStream = require( 'flow-from-twitter' );

// Create a readable stream:
var readableStream = createStream();

// Pipe the data...
readableStream.pipe( process.stdout );

To run the example code from the top-level application directory,

$ node ./examples/index.js

Tests

Unit

Unit tests use the Mocha test framework with Chai assertions. To run the tests, execute the following command in the top-level application directory:

$ make test

All new feature development should have corresponding unit tests to validate correct functionality.

Test Coverage

This repository uses Istanbul as its code coverage tool. To generate a test coverage report, execute the following command in the top-level application directory:

$ make test-cov

Istanbul creates a ./reports/coverage directory. To access an HTML version of the report,

$ make view-cov

License

MIT license.

Copyright

Copyright © 2015. Athan Reines.

About

Provides a stream interface for the Twitter stream API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published