@Test public void getReplyTest(){ TopicService.getReply(this.iResponsibleView, 524330, 1, new ResponseListener<List<Reply>>() { @Override public void onComplete(List<Reply> result) { for (Reply reply : result){ System.out.println(reply.toString()); } } @Override public boolean onFailed(String msg) { System.out.println(msg); return true; } }); }
public static void getReply(IResponsibleView responsibleView, int topicId, int page, ResponseListener<List<Reply>> listener){ topicApi.getTopicDetail(topicId, page) .subscribeOn(Schedulers.computation()) .map(HtmlUtil::getReplies) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new RxObserver2<>(responsibleView, listener)); }
TopicService extends BaseService<List<Topic>> { public static void getReply(IResponsibleView responsibleView, int topicId, int page, ResponseListener<List<Reply>> listener){ topicApi.getTopicDetail(topicId, page) .subscribeOn(Schedulers.computation()) .map(HtmlUtil::getReplies) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new RxObserver2<>(responsibleView, listener)); } }
TopicService extends BaseService<List<Topic>> { public static void getReply(IResponsibleView responsibleView, int topicId, int page, ResponseListener<List<Reply>> listener){ topicApi.getTopicDetail(topicId, page) .subscribeOn(Schedulers.computation()) .map(HtmlUtil::getReplies) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new RxObserver2<>(responsibleView, listener)); } TopicService(IResponsibleView v, ResponseListener<List<Topic>> topicListener); }
TopicService extends BaseService<List<Topic>> { public static void getReply(IResponsibleView responsibleView, int topicId, int page, ResponseListener<List<Reply>> listener){ topicApi.getTopicDetail(topicId, page) .subscribeOn(Schedulers.computation()) .map(HtmlUtil::getReplies) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new RxObserver2<>(responsibleView, listener)); } TopicService(IResponsibleView v, ResponseListener<List<Topic>> topicListener); void getTopic(Tab type, int page); static void postTopic(IResponsibleView iResponsibleView,
                          String title,
                          String content,
                          String node,
                          ResponseListener<Topic> listener); static void getTopicByNode(IResponsibleView view,
                                      String node,
                                      int page,
                                      ResponseListener<List<Topic>> listener); static void getTopicAndReply(IResponsibleView responsibleView,
                                        int topicId,
                                        int page,
                                        ResponseListener<Topic> listener); static void postReply(IResponsibleView responsibleView,
                                 Topic topic,
                                 String content,
                                 ResponseListener<String> responseListener); static void getReply(IResponsibleView responsibleView,
                                int topicId,
                                int page,
                                ResponseListener<List<Reply>> listener); void getReplyFromApi(Topic topic, int page); }
TopicService extends BaseService<List<Topic>> { public static void getReply(IResponsibleView responsibleView, int topicId, int page, ResponseListener<List<Reply>> listener){ topicApi.getTopicDetail(topicId, page) .subscribeOn(Schedulers.computation()) .map(HtmlUtil::getReplies) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new RxObserver2<>(responsibleView, listener)); } TopicService(IResponsibleView v, ResponseListener<List<Topic>> topicListener); void getTopic(Tab type, int page); static void postTopic(IResponsibleView iResponsibleView,
                          String title,
                          String content,
                          String node,
                          ResponseListener<Topic> listener); static void getTopicByNode(IResponsibleView view,
                                      String node,
                                      int page,
                                      ResponseListener<List<Topic>> listener); static void getTopicAndReply(IResponsibleView responsibleView,
                                        int topicId,
                                        int page,
                                        ResponseListener<Topic> listener); static void postReply(IResponsibleView responsibleView,
                                 Topic topic,
                                 String content,
                                 ResponseListener<String> responseListener); static void getReply(IResponsibleView responsibleView,
                                int topicId,
                                int page,
                                ResponseListener<List<Reply>> listener); void getReplyFromApi(Topic topic, int page);  }