Trending statuses

This commit is contained in:
Grishka
2022-02-07 15:44:00 +03:00
parent aa193b8921
commit 1f4611bc4e
2 changed files with 34 additions and 8 deletions

View File

@@ -0,0 +1,20 @@
package org.joinmastodon.android.api.requests.trends;
import com.google.gson.reflect.TypeToken;
import org.joinmastodon.android.api.MastodonAPIRequest;
import org.joinmastodon.android.model.Status;
import java.util.List;
public class GetTrendingStatuses extends MastodonAPIRequest<List<Status>>{
public GetTrendingStatuses(String maxID, String minID, int limit){
super(HttpMethod.GET, "/trends/statuses", new TypeToken<>(){});
if(maxID!=null)
addQueryParameter("max_id", maxID);
if(minID!=null)
addQueryParameter("min_id", minID);
if(limit>0)
addQueryParameter("limit", ""+limit);
}
}