All Projects → tesaguri → twitter-stream-rs

tesaguri / twitter-stream-rs

Licence: MIT license
A Rust library for listening on Twitter Streaming API.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to twitter-stream-rs

twitter-like-bot
This app allows you to automate Twitter liking for specific keywords, hashtags, or even full sentences. The bot uses streaming API which means that everything happens in real time.
Stars: ✭ 30 (-54.55%)
Mutual labels:  twitter-api, twitter-streaming-api
twitter-stream
A Go wrapper for Twitter's V2 Filtered Stream API
Stars: ✭ 26 (-60.61%)
Mutual labels:  twitter-api, twitter-streaming-api
SparkTwitterAnalysis
An Apache Spark standalone application using the Spark API in Scala. The application uses Simple Build Tool(SBT) for building the project.
Stars: ✭ 29 (-56.06%)
Mutual labels:  twitter-api, twitter-streaming-api
100daysofcode Twitter Bot
Twitter bot for #100DaysOfCode
Stars: ✭ 214 (+224.24%)
Mutual labels:  twitter-api
Twitterdelete
💀 Delete your old, unpopular tweets.
Stars: ✭ 231 (+250%)
Mutual labels:  twitter-api
Awesome-Rust-MachineLearning
This repository is a list of machine learning libraries written in Rust. It's a compilation of GitHub repositories, blogs, books, movies, discussions, papers, etc. 🦀
Stars: ✭ 1,110 (+1581.82%)
Mutual labels:  rust-library
contour-rs
Contour polygon creation in Rust (using marching squares algorithm)
Stars: ✭ 33 (-50%)
Mutual labels:  rust-library
Jekyll Twitter Plugin
A Liquid tag plugin for the Jekyll blogging engine that embeds Tweets, Timelines and more from Twitter API
Stars: ✭ 204 (+209.09%)
Mutual labels:  twitter-api
terraform-provider-twitter
No description or website provided.
Stars: ✭ 24 (-63.64%)
Mutual labels:  twitter-api
hidapi-rs
Rust bindings for the hidapi C library
Stars: ✭ 103 (+56.06%)
Mutual labels:  rust-library
TwitterScraper
Scrape a User's Twitter data! Bypass the 3,200 tweet API limit for a User!
Stars: ✭ 80 (+21.21%)
Mutual labels:  twitter-api
Egg Mode
a twitter api crate for rust
Stars: ✭ 249 (+277.27%)
Mutual labels:  twitter-api
arangors
Easy to use rust driver for arangoDB
Stars: ✭ 120 (+81.82%)
Mutual labels:  rust-library
Harpy
A Twitter app built with Flutter
Stars: ✭ 211 (+219.7%)
Mutual labels:  twitter-api
tweet png
A flutter app to generate beautiful, high-quality screenshots of tweets from twitter.
Stars: ✭ 51 (-22.73%)
Mutual labels:  twitter-api
Tweetledee
A PHP library that provides an incredibly easy way to access Twitter data as JSON or RSS feed by URL or standard CLI syntax.
Stars: ✭ 208 (+215.15%)
Mutual labels:  twitter-api
Nebuchadnezzar
High Performance Key-Value Store
Stars: ✭ 49 (-25.76%)
Mutual labels:  rust-library
mokkapps
My GitHub profile README which is automatically updated. Please ⭐️ if you like it
Stars: ✭ 63 (-4.55%)
Mutual labels:  twitter-api
twitter-status
Twitter Status Web Component
Stars: ✭ 59 (-10.61%)
Mutual labels:  twitter-api
i2p-rs
Rust client library for interacting with I2P
Stars: ✭ 62 (-6.06%)
Mutual labels:  rust-library

Twitter Stream

Build Status Current Version Documentation

A Rust library for listening on Twitter Streaming API.

Usage

Add this to your Cargo.toml:

[dependencies]
futures = "0.3"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
twitter-stream = "0.13"

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

use futures::prelude::*;
use twitter_stream::{Token, TwitterStream};

#[tokio::main]
async fn main() {
    let token = Token::from_parts("consumer_key", "consumer_secret", "access_key", "access_secret");

    TwitterStream::track("@Twitter", &token)
        .try_flatten_stream()
        .try_for_each(|json| {
            println!("{}", json);
            future::ok(())
        })
        .await
        .unwrap();
}

Alternatives

egg-mode, a Twitter API client crate, implements a Streaming API client as well. The following table shows key differences between twitter-stream and egg-mode.

twitter-stream egg-mode
Streaming message type string::String<bytes::Bytes> (raw JSON string) StreamMessage (deserialized message)
REST API integration No Yes
Customizable HTTP client Yes No

If your application don't require explicit control over the raw JSON strings or underlying HTTP client, egg-mode may be a better choice.

License

This project is licensed under the MIT license (LICENSE or https://opensource.org/licenses/MIT) unless explicitly stated otherwise.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].