modernize autocomplete (#2510)

* modernize autocomplete

* use @WorkerThread annotation
This commit is contained in:
Konrad Pozniak 2022-05-17 19:55:37 +02:00 committed by GitHub
commit cec8f6dd65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 314 additions and 412 deletions

View file

@ -288,6 +288,14 @@ interface MastodonApi {
@Query("following") following: Boolean? = null
): Single<List<TimelineAccount>>
@GET("api/v1/accounts/search")
fun searchAccountsCall(
@Query("q") query: String,
@Query("resolve") resolve: Boolean? = null,
@Query("limit") limit: Int? = null,
@Query("following") following: Boolean? = null
): Call<List<TimelineAccount>>
@GET("api/v1/accounts/{id}")
fun account(
@Path("id") accountId: String
@ -593,6 +601,16 @@ interface MastodonApi {
@Query("following") following: Boolean? = null
): Single<SearchResult>
@GET("api/v2/search")
fun searchCall(
@Query("q") query: String?,
@Query("type") type: String? = null,
@Query("resolve") resolve: Boolean? = null,
@Query("limit") limit: Int? = null,
@Query("offset") offset: Int? = null,
@Query("following") following: Boolean? = null
): Call<SearchResult>
@FormUrlEncoded
@POST("api/v1/accounts/{id}/note")
fun updateAccountNote(