use of com.meniga.sdk.converters.MenigaBaseConverter in project mobile-sdk-android by meniga.
the class MockClient method getApi.
public static MenigaAPI getApi(Interceptor myInterceptor) {
OkHttpClient client = new OkHttpClient.Builder().addInterceptor(myInterceptor).build();
final Retrofit retrofit = new Retrofit.Builder().addConverterFactory(new MenigaTransactionsConverter()).addConverterFactory(new MenigaFeedConverter(new MockFeedItemFactory(), GsonProvider.getGson())).addConverterFactory(new MenigaCategoryConverter()).addConverterFactory(new MenigaOfferConverter()).addConverterFactory(new MenigaRedemptionConverter(GsonProvider.getGson())).addConverterFactory(new MenigaReimbursementAccountConverter()).addConverterFactory(new MenigaIdNameKeyValConverter()).addConverterFactory(new MenigaChallengesConverter(new ChallengeItemFactory())).addConverterFactory(new MenigaFeedItemConverter(new MockFeedItemFactory())).addConverterFactory(new MenigaBaseConverter()).addConverterFactory(GsonConverterFactory.create()).baseUrl("http://meniga.is/api/").client(client).build();
return retrofit.create(MenigaAPI.class);
}
Aggregations