Compose: auto-complete mentions, hashtags, and emojis
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package org.joinmastodon.android.api.requests.search;
|
||||
|
||||
import org.joinmastodon.android.api.MastodonAPIRequest;
|
||||
import org.joinmastodon.android.model.SearchResults;
|
||||
|
||||
public class GetSearchResults extends MastodonAPIRequest<SearchResults>{
|
||||
public GetSearchResults(String query, Type type){
|
||||
super(HttpMethod.GET, "/search", SearchResults.class);
|
||||
addQueryParameter("q", query);
|
||||
if(type!=null)
|
||||
addQueryParameter("type", type.name().toLowerCase());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getPathPrefix(){
|
||||
return "/api/v2";
|
||||
}
|
||||
|
||||
public enum Type{
|
||||
ACCOUNTS,
|
||||
HASHTAGS,
|
||||
STATUSES
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user