Compose: auto-complete mentions, hashtags, and emojis

This commit is contained in:
Grishka
2022-03-17 06:28:36 +03:00
parent 098128bcd4
commit 7186b6387f
12 changed files with 863 additions and 19 deletions

View File

@@ -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
}
}