Search in sources :

Example 1 with ClientAuthInterceptor

use of io.plaidapp.data.api.ClientAuthInterceptor in project plaid by nickbutcher.

the class DesignerNewsPrefs method createApi.

private void createApi() {
    final OkHttpClient client = new OkHttpClient.Builder().addInterceptor(new ClientAuthInterceptor(accessToken, BuildConfig.DESIGNER_NEWS_CLIENT_ID)).build();
    final Gson gson = new Gson();
    api = new Retrofit.Builder().baseUrl(DesignerNewsService.ENDPOINT).client(client).addConverterFactory(new DenvelopingConverter(gson)).addConverterFactory(GsonConverterFactory.create(gson)).build().create(DesignerNewsService.class);
}
Also used : Retrofit(retrofit2.Retrofit) OkHttpClient(okhttp3.OkHttpClient) ClientAuthInterceptor(io.plaidapp.data.api.ClientAuthInterceptor) DesignerNewsService(io.plaidapp.data.api.designernews.DesignerNewsService) Gson(com.google.gson.Gson) DenvelopingConverter(io.plaidapp.data.api.DenvelopingConverter)

Aggregations

Gson (com.google.gson.Gson)1 ClientAuthInterceptor (io.plaidapp.data.api.ClientAuthInterceptor)1 DenvelopingConverter (io.plaidapp.data.api.DenvelopingConverter)1 DesignerNewsService (io.plaidapp.data.api.designernews.DesignerNewsService)1 OkHttpClient (okhttp3.OkHttpClient)1 Retrofit (retrofit2.Retrofit)1