4 releases (2 breaking)

Uses old Rust 2015

0.3.0 Jun 1, 2018
0.2.1 May 17, 2018
0.2.0 Jun 21, 2017
0.1.0 Jun 16, 2017

#1267 in Parser implementations

40 downloads per month

MIT license

1.5K SLoC

Twitter Stream

Build Status Current Version Documentation

A Rust library for listening on Twitter Streaming API.


This library requires Rust 1.21 or later.


Add this to your Cargo.toml:

twitter-stream = "0.5"

and this to your crate root:

extern crate twitter_stream;

Here is a basic example that prints public mentions @Twitter in JSON format:

extern crate futures;
extern crate tokio_core;
extern crate twitter_stream;

use futures::{Future, Stream};
use tokio_core::reactor::Core;
use twitter_stream::{Token, TwitterStreamBuilder};

fn main() {
    let token = Token::new("consumer_key", "consumer_secret", "access_key", "access_secret");

    let mut core = Core::new().unwrap();

    let future = TwitterStreamBuilder::filter(&token).handle(&core.handle())
        .for_each(|json| {
            println!("{}", json);



~52K SLoC