@Override public Observable<RecentResponseJson> getRecentItems(String lastId, final int count) { QueryParams params = getBasicQueryParams().add("count", count); String url = makeApiUrl(REQUEST_RECENT_MEDIA, params, Prefs.getUserId()); if (lastId != null) { params.add("max_id", lastId); } Request.Builder request = new Request.Builder().url(url); return makeRequest(request, new TypeToken<RecentResponseJson>() {}.getType()); }
private QueryParams getBasicQueryParams() { return new QueryParams().add(PARAM_TOKEN, Prefs.getAccessToken()); }