当前位置: 首页>>代码示例>>Java>>正文


Java LoganSquareConverterFactory类代码示例

本文整理汇总了Java中com.github.aurae.retrofit2.LoganSquareConverterFactory的典型用法代码示例。如果您正苦于以下问题:Java LoganSquareConverterFactory类的具体用法?Java LoganSquareConverterFactory怎么用?Java LoganSquareConverterFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


LoganSquareConverterFactory类属于com.github.aurae.retrofit2包,在下文中一共展示了LoganSquareConverterFactory类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import com.github.aurae.retrofit2.LoganSquareConverterFactory; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    random = new Random();
    xkcdMapper = new XkcdMapper();
    executor = Executors.newSingleThreadExecutor();
    Realm.init(this);
    RealmConfiguration realmConfiguration = new RealmConfiguration.Builder() //
            .deleteRealmIfMigrationNeeded() //
            .build();
    Realm.setDefaultConfiguration(realmConfiguration);
    retrofit = new Retrofit.Builder().baseUrl("http://xkcd.com/")
            .addConverterFactory(LoganSquareConverterFactory.create())
            .build();
    xkcdService = retrofit.create(XkcdService.class);
}
 
开发者ID:Zhuinden,项目名称:xkcd-example,代码行数:17,代码来源:CustomApplication.java

示例2: getRetrofit

import com.github.aurae.retrofit2.LoganSquareConverterFactory; //导入依赖的package包/类
@NonNull
private Retrofit getRetrofit() {
    return new Retrofit.Builder()
            .baseUrl(ApiService.API_ENDPOINT)
            .addCallAdapterFactory(RxJava2CallAdapterFactory.createWithScheduler(Schedulers.io()))
            .addConverterFactory(LoganSquareConverterFactory.create())
            .client(CLIENT)
            .build();
}
 
开发者ID:kbiakov,项目名称:newsreader-mvp-android,代码行数:10,代码来源:Api.java

示例3: retrofit

import com.github.aurae.retrofit2.LoganSquareConverterFactory; //导入依赖的package包/类
@Provides
@ActivityScope
Retrofit retrofit(OkHttpClient okHttpClient, RxJava2CallAdapterFactory rxJava2CallAdapterFactory) {
    return new Retrofit.Builder().addConverterFactory(LoganSquareConverterFactory.create()) //
            .baseUrl("https://api.github.com/") //
            .addCallAdapterFactory(rxJava2CallAdapterFactory)
            .client(okHttpClient) //
            .build();
}
 
开发者ID:Zhuinden,项目名称:flowless,代码行数:10,代码来源:RetrofitModule.java

示例4: provideGithubService

import com.github.aurae.retrofit2.LoganSquareConverterFactory; //导入依赖的package包/类
@Provides
@Singleton
public GitHubService provideGithubService(@NonNull final OkHttpClient poOkHttpClient) {
    final Retrofit loRetrofit = new Retrofit.Builder()
            .baseUrl(mBaseUrl)
            .client(poOkHttpClient)
            .addConverterFactory(LoganSquareConverterFactory.create())
            .build();
    return loRetrofit.create(GitHubService.class);
}
 
开发者ID:RoRoche,项目名称:AndroidStarterAlt,代码行数:11,代码来源:ModuleRest.java

示例5: provideGithubService

import com.github.aurae.retrofit2.LoganSquareConverterFactory; //导入依赖的package包/类
@Override
public GitHubService provideGithubService(@NonNull final OkHttpClient poOkHttpClient) {
    final Retrofit loRetrofit = new Retrofit.Builder()
            .baseUrl(mMockWebServer.url("/").toString())
            .client(poOkHttpClient)
            .addConverterFactory(LoganSquareConverterFactory.create())
            .build();
    return loRetrofit.create(GitHubService.class);
}
 
开发者ID:RoRoche,项目名称:AndroidStarterAlt,代码行数:10,代码来源:MockModuleRest.java

示例6: createRetrofit

import com.github.aurae.retrofit2.LoganSquareConverterFactory; //导入依赖的package包/类
private void createRetrofit() {
    HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
    interceptor.setLevel(HttpLoggingInterceptor.Level.HEADERS);
    OkHttpClient okHttpClient = new OkHttpClient.Builder()
            .addInterceptor(interceptor)
            .build();

    retrofit = new Retrofit.Builder()
            .baseUrl(HOST_NAME)
            .client(okHttpClient)
            .addConverterFactory(LoganSquareConverterFactory.create())
            .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
            .build();
}
 
开发者ID:liuguangqiang,项目名称:Idaily,代码行数:15,代码来源:RetrofitClient.java

示例7: createConverterFactory

import com.github.aurae.retrofit2.LoganSquareConverterFactory; //导入依赖的package包/类
private Converter.Factory createConverterFactory() {

        return LoganSquareConverterFactory.create();

    }
 
开发者ID:vishnus1224,项目名称:RxJavaTeamworkClient,代码行数:6,代码来源:TeamworkApiClient.java


注:本文中的com.github.aurae.retrofit2.LoganSquareConverterFactory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。