All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.uwetrottmann.trakt5.services.Authentication Maven / Gradle / Ivy

There is a newer version: 6.16.0
Show newest version
package com.uwetrottmann.trakt5.services;

import com.uwetrottmann.trakt5.TraktV2;
import com.uwetrottmann.trakt5.entities.AccessToken;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

public interface Authentication {

    @FormUrlEncoded
    @POST(TraktV2.OAUTH2_TOKEN_URL)
    Call exchangeCodeForAccessToken(
            @Field("grant_type") String grantType,
            @Field("code") String code,
            @Field("client_id") String clientId,
            @Field("client_secret") String clientSecret,
            @Field("redirect_uri") String redirectUri
    );

    @FormUrlEncoded
    @POST(TraktV2.OAUTH2_TOKEN_URL)
    Call refreshAccessToken(
            @Field("grant_type") String grantType,
            @Field("refresh_token") String refreshToken,
            @Field("client_id") String clientId,
            @Field("client_secret") String clientSecret,
            @Field("redirect_uri") String redirectUri
    );

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy