Example usage for twitter4j Paging getCount

List of usage examples for twitter4j Paging getCount

Introduction

In this page you can find the example usage for twitter4j Paging getCount.

Prototype

public int getCount() 

Source Link

Usage

From source file:com.dwdesign.tweetings.loader.TweetSearchLoader.java

License:Open Source License

@Override
public List<Status> getStatuses(final Paging paging) throws TwitterException {
    if (mTwitter == null)
        return null;
    final Query query = new Query(mQuery);
    query.setRpp(paging.getCount());
    if (paging.getMaxId() > 0) {
        query.setMaxId(paging.getMaxId());
    }/*from   w w  w. j  a  va  2s .  c  om*/
    return Arrays.asList(mTwitter.search(query).getStatuses());
}

From source file:com.github.moko256.mastodon.MTRangeConverter.java

License:Apache License

public static Range convert(Paging paging) {
    return new Range(convertLong(paging.getMaxId()), convertLong(paging.getSinceId()),
            (paging.getCount() == -1) ? 0 : paging.getCount());
}

From source file:com.github.moko256.twitlatte.SearchResultFragment.java

License:Apache License

@Override
@NonNull//from w w w.j  ava  2  s  .c  om
protected ResponseList<Status> getResponseList(@NonNull Paging paging) throws TwitterException {
    SearchResultList result = new SearchResultList();
    if (!searchText.equals("")) {
        Query query = new Query(searchText).count(paging.getCount()).sinceId(paging.getSinceId())
                .maxId(paging.getMaxId()).resultType(Query.ResultType.recent);
        result.addAll(GlobalApplication.twitter.search().search(query).getTweets());
    }
    return result;
}

From source file:de.vanita5.twittnuker.loader.support.TweetSearchLoader.java

License:Open Source License

@Override
public List<Status> getStatuses(final Twitter twitter, final Paging paging) throws TwitterException {
    if (twitter == null)
        return null;
    final Query query = new Query(processQuery(mQuery));
    query.setRpp(paging.getCount());
    if (paging.getMaxId() > 0) {
        query.setMaxId(paging.getMaxId());
    }//from ww w . j  a v a 2  s  . co  m
    return Arrays.asList(twitter.search(query).getStatuses());
}

From source file:org.getlantern.firetweet.loader.support.TweetSearchLoader.java

License:Open Source License

@NonNull
@Override/*from   w  ww. j  av  a 2 s  .  com*/
public List<Status> getStatuses(@NonNull final Twitter twitter, final Paging paging) throws TwitterException {
    final Query query = new Query(processQuery(mQuery));
    query.setRpp(paging.getCount());
    if (paging.getMaxId() > 0) {
        query.setMaxId(paging.getMaxId());
    }
    return twitter.search(query);
}