added function to obtain token

This commit is contained in:
Andrea Clement 2020-03-05 20:36:49 +01:00
parent 153e87b27b
commit 5a6de98dc6
1 changed files with 9 additions and 0 deletions

View File

@ -40,6 +40,15 @@ interface PixelfedAPI {
@Query("limit") limit: Int? = null
): Call<List<Status>>
@GET()
fun getToken(
@Query("client_id") client_id: String,
@Query("client_secret") client_secret: String,
@Query("redirect_uri") redirect_uri: String,
@Query("grant_type") grant_type: String
): Call<Token>
companion object {
fun create(baseUrl: String): PixelfedAPI {
return Retrofit.Builder()