TwitterStream

Type Alias TwitterStream 

Source
pub type TwitterStream = TwitterStream<Body>;
Available on crate feature hyper only.
Expand description

A type alias of TwitterStream using Hyper’s HTTP client.

Aliased Type§

pub struct TwitterStream { /* private fields */ }

Implementations§

Source§

impl TwitterStream

Source

pub fn follow<C, A>(follow: &[u64], token: &Token<C, A>) -> FutureTwitterStream
where C: AsRef<str>, A: AsRef<str>,

Connect to the filter stream, yielding Tweets from the users specified by follow argument.

This is a shorthand for twitter_stream::Builder::new(token).follow(follow).listen(). For more specific configurations, use TwitterStream::builder or Builder::new.

§Panics

This will panic if the underlying HTTPS connector failed to initialize.

Source

pub fn track<C, A>(track: &str, token: &Token<C, A>) -> FutureTwitterStream
where C: AsRef<str>, A: AsRef<str>,

Connect to the filter stream, yielding Tweets that matches the query specified by track argument.

This is a shorthand for twitter_stream::Builder::new(token).track(track).listen(). For more specific configurations, use TwitterStream::builder or Builder::new.

§Panics

This will panic if the underlying HTTPS connector failed to initialize.

Source

pub fn locations<C, A>( locations: &[BoundingBox], token: &Token<C, A>, ) -> FutureTwitterStream
where C: AsRef<str>, A: AsRef<str>,

Connect to the filter stream, yielding geolocated Tweets falling within the specified bounding boxes.

This is a shorthand for twitter_stream::Builder::new(token).locations(locations).listen(). For more specific configurations, use TwitterStream::builder or Builder::new.

§Panics

This will panic if the underlying HTTPS connector failed to initialize.

Source

pub fn sample<C, A>(token: &Token<C, A>) -> FutureTwitterStream
where C: AsRef<str>, A: AsRef<str>,

Connect to the sample stream, yielding a “small random sample” of all public Tweets.

This is a shorthand for twitter_stream::Builder::new(token).listen(). For more specific configurations, use TwitterStream::builder or Builder::new.

§Panics

This will panic if the underlying HTTPS connector failed to initialize.