當前位置: 首頁>>代碼示例>>Java>>正文


Java AuthInterceptor類代碼示例

本文整理匯總了Java中io.plaidapp.data.api.AuthInterceptor的典型用法代碼示例。如果您正苦於以下問題:Java AuthInterceptor類的具體用法?Java AuthInterceptor怎麽用?Java AuthInterceptor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AuthInterceptor類屬於io.plaidapp.data.api包,在下文中一共展示了AuthInterceptor類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createApi

import io.plaidapp.data.api.AuthInterceptor; //導入依賴的package包/類
private void createApi() {
    final OkHttpClient client = new OkHttpClient.Builder()
            .addInterceptor(new AuthInterceptor(getAccessToken()))
            .build();
    api = new Retrofit.Builder()
            .baseUrl(DribbbleService.ENDPOINT)
            .client(client)
            .addConverterFactory(
                    GsonConverterFactory.create(
                            new GsonBuilder()
                                    .setDateFormat(DribbbleService.DATE_FORMAT)
                                    .create()))
            .build()
            .create((DribbbleService.class));
}
 
開發者ID:liulinbo,項目名稱:Amumu,代碼行數:16,代碼來源:DribbblePrefs.java

示例2: createProductHuntApi

import io.plaidapp.data.api.AuthInterceptor; //導入依賴的package包/類
private void createProductHuntApi() {
    final OkHttpClient client = new OkHttpClient.Builder()
            .addInterceptor(new AuthInterceptor(BuildConfig.PROCUCT_HUNT_DEVELOPER_TOKEN))
            .build();
    productHuntApi = new Retrofit.Builder()
            .baseUrl(ProductHuntService.ENDPOINT)
            .client(client)
            .addConverterFactory(GsonConverterFactory.create())
            .build()
            .create(ProductHuntService.class);
}
 
開發者ID:liulinbo,項目名稱:Amumu,代碼行數:12,代碼來源:BaseDataManager.java

示例3: createApi

import io.plaidapp.data.api.AuthInterceptor; //導入依賴的package包/類
private void createApi() {
    final OkHttpClient client = new OkHttpClient.Builder()
            .addInterceptor(new AuthInterceptor(getAccessToken()))
            .build();
    final Gson gson = new GsonBuilder()
            .setDateFormat(DribbbleService.DATE_FORMAT)
            .create();
    api = new Retrofit.Builder()
            .baseUrl(DribbbleService.ENDPOINT)
            .client(client)
            .addConverterFactory(new DenvelopingConverter(gson))
            .addConverterFactory(GsonConverterFactory.create(gson))
            .build()
            .create((DribbbleService.class));
}
 
開發者ID:yongjhih,項目名稱:android-proguards,代碼行數:16,代碼來源:DribbblePrefs.java

示例4: createProductHuntApi

import io.plaidapp.data.api.AuthInterceptor; //導入依賴的package包/類
private void createProductHuntApi() {
    final OkHttpClient client = new OkHttpClient.Builder()
            .addInterceptor(new AuthInterceptor(BuildConfig.PROCUCT_HUNT_DEVELOPER_TOKEN))
            .build();
    final Gson gson = new Gson();
    productHuntApi = new Retrofit.Builder()
            .baseUrl(ProductHuntService.ENDPOINT)
            .client(client)
            .addConverterFactory(new DenvelopingConverter(gson))
            .addConverterFactory(GsonConverterFactory.create(gson))
            .build()
            .create(ProductHuntService.class);
}
 
開發者ID:yongjhih,項目名稱:android-proguards,代碼行數:14,代碼來源:BaseDataManager.java


注:本文中的io.plaidapp.data.api.AuthInterceptor類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。