本文整理匯總了Java中io.plaidapp.data.api.designernews.DesignerNewsService類的典型用法代碼示例。如果您正苦於以下問題:Java DesignerNewsService類的具體用法?Java DesignerNewsService怎麽用?Java DesignerNewsService使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
DesignerNewsService類屬於io.plaidapp.data.api.designernews包,在下文中一共展示了DesignerNewsService類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createApi
import io.plaidapp.data.api.designernews.DesignerNewsService; //導入依賴的package包/類
private void createApi() {
final OkHttpClient client = new OkHttpClient.Builder()
.addInterceptor(
new ClientAuthInterceptor(accessToken, BuildConfig.DESIGNER_NEWS_CLIENT_ID))
.build();
api = new Retrofit.Builder()
.baseUrl(DesignerNewsService.ENDPOINT)
.client(client)
.addConverterFactory(GsonConverterFactory.create())
.build()
.create(DesignerNewsService.class);
}
示例2: createApi
import io.plaidapp.data.api.designernews.DesignerNewsService; //導入依賴的package包/類
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);
}
示例3: getApi
import io.plaidapp.data.api.designernews.DesignerNewsService; //導入依賴的package包/類
public DesignerNewsService getApi() {
if (api == null) createApi();
return api;
}
示例4: getDesignerNewsApi
import io.plaidapp.data.api.designernews.DesignerNewsService; //導入依賴的package包/類
public DesignerNewsService getDesignerNewsApi() {
return designerNewsPrefs.getApi();
}