Example usage for twitter4j Paging getSinceId

List of usage examples for twitter4j Paging getSinceId

Introduction

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

Prototype

public long getSinceId() 

Source Link

Usage

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//  ww  w. j  a  v  a  2  s .com
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:org.tweetalib.android.TwitterUtil.java

License:Apache License

public static Query updateQueryWithPaging(Query query, Paging paging) {

    if (paging.getMaxId() > -1) {
        query.setMaxId(paging.getMaxId());
    }/*from w w  w.  j a v a2  s .c o  m*/
    if (paging.getSinceId() > -1) {
        query.setSinceId(paging.getSinceId());
    }
    /*
     * if (paging.getPage() != 1 && paging.getPage() != -1) {
     * query.setPage(paging.getPage()); }
     */

    return query;
}