use of com.twtstudio.bbs.bdpqchen.bbs.individual.model.SimpleBean in project BBS-Android by bdpqchen.
the class CollectionClient method collectByTid.
// TODO: 2017/5/23 传入Prenster来处理返回数据
void collectByTid(String tid) {
Retrofit retrofit = new Retrofit.Builder().client(client).addConverterFactory(GsonConverterFactory.create()).baseUrl("https://bbs.twtstudio.com/api/home/").build();
CollectionApi collectionApi = retrofit.create(CollectionApi.class);
Call<SimpleBean> call = collectionApi.collectByTid(uidToken, tid);
call.enqueue(new Callback<SimpleBean>() {
@Override
public void onResponse(Call<SimpleBean> call, Response<SimpleBean> response) {
collectionPresenter.dealCollectData(response.body());
}
@Override
public void onFailure(Call<SimpleBean> call, Throwable t) {
}
});
}
use of com.twtstudio.bbs.bdpqchen.bbs.individual.model.SimpleBean in project BBS-Android by bdpqchen.
the class CollectionClient method deleteCollection.
void deleteCollection(int tid) {
Retrofit retrofit = new Retrofit.Builder().client(client).addConverterFactory(GsonConverterFactory.create()).baseUrl("https://bbs.twtstudio.com/api/home/").build();
CollectionApi collectionApi = retrofit.create(CollectionApi.class);
Call<SimpleBean> call = collectionApi.deleteCollection(uidToken, String.valueOf(tid));
call.enqueue(new Callback<SimpleBean>() {
@Override
public void onResponse(Call<SimpleBean> call, Response<SimpleBean> response) {
collectionPresenter.dealDeleteData(response.body());
}
@Override
public void onFailure(Call<SimpleBean> call, Throwable t) {
}
});
}
Aggregations