Package com.twitter.hbc.core.endpoint

Examples of com.twitter.hbc.core.endpoint.StatusesFilterEndpoint


public class FilterStreamExample {

  public static void run(String consumerKey, String consumerSecret, String token, String secret) throws InterruptedException {
    BlockingQueue<String> queue = new LinkedBlockingQueue<String>(10000);
    StatusesFilterEndpoint endpoint = new StatusesFilterEndpoint();
    // add some track terms
    endpoint.trackTerms(Lists.newArrayList("twitterapi", "#yolo"));

    Authentication auth = new OAuth1(consumerKey, consumerSecret, token, secret);
    // Authentication auth = new BasicAuth(username, password);

    // Create a new BasicClient. By default gzip is enabled.
View Full Code Here


    }

    private void connect(String consumerKey, String consumerSecret, String token, String tokenSecret, String terms, String followings) {
        Hosts hosebirdHosts = new HttpHosts(Constants.STREAM_HOST);

        StatusesFilterEndpoint endpoint = new StatusesFilterEndpoint();

        List<String> termsList = getTermsListFromString(terms);
        if (termsList != null && termsList.size() > 0) {
            endpoint.trackTerms(termsList);
        }

        List<Long> followingsList = getFollowingsListFromString(followings);
        if (followingsList != null && followingsList.size() > 0) {
            endpoint.followings(followingsList);
        }

        Authentication hosebirdAuth = new OAuth1(
                consumerKey,
                consumerSecret,
View Full Code Here

TOP

Related Classes of com.twitter.hbc.core.endpoint.StatusesFilterEndpoint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.