Search in sources :

Example 1 with CollectionBean

use of com.twtstudio.bbs.bdpqchen.bbs.individual.model.CollectionBean in project BBS-Android by bdpqchen.

the class CollectionClient method loadCollection.

void loadCollection() {
    Retrofit retrofit = new Retrofit.Builder().client(client).addConverterFactory(GsonConverterFactory.create()).baseUrl(RxDoHttpClient.BASE_URL + "home/").build();
    CollectionApi collectionApi = retrofit.create(CollectionApi.class);
    Call<CollectionBean> call = collectionApi.getCollection(uidToken);
    call.enqueue(new Callback<CollectionBean>() {

        @Override
        public void onResponse(Call<CollectionBean> call, Response<CollectionBean> response) {
            if (response != null) {
                collectionPresenter.setCollectionDate(response.body());
            }
        }

        @Override
        public void onFailure(Call<CollectionBean> call, Throwable t) {
        }
    });
}
Also used : Retrofit(retrofit2.Retrofit) CollectionBean(com.twtstudio.bbs.bdpqchen.bbs.individual.model.CollectionBean)

Aggregations

CollectionBean (com.twtstudio.bbs.bdpqchen.bbs.individual.model.CollectionBean)1 Retrofit (retrofit2.Retrofit)1