New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

com.shekhargulati.reactivex:rx-tweet-stream

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

com.shekhargulati.reactivex:rx-tweet-stream

A RxJava Observable wrapper around Twitter Streaming API

  • 0.1.0
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

rx-twitter-stream Build Status License

RxJava observable for tweet stream. It is a wrapper around Twitter4J Streaming Library. rx-twitter-stream API uses JDK 8.

Getting Started

To use rx-tweet-stream in your application, you have to add rx-tweet-stream in your classpath. rx-tweet-stream is available on Maven Central so you just need to add dependency to your favorite build tool as show below.

For Apache Maven users, please add following to your pom.xml.

<dependencies>
    <dependency>
        <groupId>com.shekhargulati.reactivex</groupId>
        <artifactId>rx-tweet-stream</artifactId>
        <version>0.1.0</version>
        <type>jar</type>
    </dependency>
</dependencies>

Gradle users can add following to their build.gradle file.

compile(group: 'com.shekhargulati.reactivex', name: 'rx-tweet-stream', version: '0.1.0', ext: 'jar')

Usage

The example shown below uses the Twitter4j environment variables

export twitter4j.debug=true
export twitter4j.oauth.consumerKey=*********************
export twitter4j.oauth.consumerSecret=******************************************
export twitter4j.oauth.accessToken=**************************************************
export twitter4j.oauth.accessTokenSecret=******************************************
import com.shekhargulati.reactivex.twitter.TweetStream;

TweetStream.of("java").map(Status::getText).take(10).subscribe(System.out::println);

If you don't want to use environment variables, then you can use the overloaded method that allows you to pass configuration object.

ConfigurationBuilder cb = new ConfigurationBuilder();
cb.setDebugEnabled(true)
        .setOAuthConsumerKey("*********************")
        .setOAuthConsumerSecret("******************************************")
        .setOAuthAccessToken("**************************************************")
        .setOAuthAccessTokenSecret("******************************************");

TweetStream.of(cb.build(), "java").map(Status::getText).take(10).subscribe(System.out::println);

The other of factory methods present in TweetStream are:

Observable<Status> of(final long... usersToFollow)
Observable<Status> of(final String[] languages, final String[] searchTerms)
Observable<Status> of(final Configuration configuration, final String[] languages, final String[] searchTerms)
Observable<Status> of(final Configuration configuration, final String... searchTerms)
Observable<Status> of(final Configuration configuration, final long... usersToFollow)
Observable<Status> of(final Configuration configuration, final String[] languages, final String[] searchTerms, final long[] usersToFollow)

License

rx-tweet-stream is licensed under the MIT License - see the LICENSE file for details.

FAQs

Package last updated on 13 Mar 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc