@Test public void getUserReplies() throws Exception { TestObserver<List<UserReply>> testObserver = mDataManager.getUserReplies("xshengcn", 0) .test().await(); testObserver.assertNoErrors(); testObserver.assertComplete(); }
public Single<List<UserReply>> getUserReplies(String userLogin, int offset) { return mService.getUserReplies(buildAuthorization(), userLogin, offset, PAGE_LIMIT) .compose(applySingleSchedulers()); }
DataManager { public Single<List<UserReply>> getUserReplies(String userLogin, int offset) { return mService.getUserReplies(buildAuthorization(), userLogin, offset, PAGE_LIMIT) .compose(applySingleSchedulers()); } }
DataManager { public Single<List<UserReply>> getUserReplies(String userLogin, int offset) { return mService.getUserReplies(buildAuthorization(), userLogin, offset, PAGE_LIMIT) .compose(applySingleSchedulers()); } DataManager(@NonNull OkHttpClient client, @NonNull PreferencesHelper preferencesHelper); }
DataManager { public Single<List<UserReply>> getUserReplies(String userLogin, int offset) { return mService.getUserReplies(buildAuthorization(), userLogin, offset, PAGE_LIMIT) .compose(applySingleSchedulers()); } DataManager(@NonNull OkHttpClient client, @NonNull PreferencesHelper preferencesHelper); String buildAuthorization(); Single<Token> login(String username, String password); Single<List<Topic>> getTopics(int offset); Single<TopicDetail> createTopic(int nodeId, String title, String body); Single<List<News>> getAllNewses(Integer offset); Single<List<News>> getNewses(String nodeId, Integer offset); Single<List<NewsReply>> getNewsReplies(int newsId, int offset); Single<List<Topic>> getUserTopics(String userLogin, int offset); Single<List<Topic>> getUserFavorites(String userLogin, int offset); Single<List<UserReply>> getUserReplies(String userLogin, int offset); Single<UserDetail> getMe(); Single<UserDetail> getMe(boolean forced); Single<NotificationUnread> getNotificationsUnreadCount(); Single<List<Notification>> getNotifications(int offset); Single<TopicAndReplies> getTopicAndComments(int topicId); Single<TopicDetail> getTopicDetail(int id); Single<List<TopicReply>> getTopicReplies(int topicId, int offset); Single<TopicReply> publishComment(int id, String body); Single<ImageResult> uploadPhoto(String filePath); Single<Map<TopicNodeCategory, List<TopicNode>>> getTopicNodes(); Single<List<Project>> getProjects(int offset); Single<List<SiteListItem>> getSites(); Single<UserDetail> getUserDetail(String userLogin); }
DataManager { public Single<List<UserReply>> getUserReplies(String userLogin, int offset) { return mService.getUserReplies(buildAuthorization(), userLogin, offset, PAGE_LIMIT) .compose(applySingleSchedulers()); } DataManager(@NonNull OkHttpClient client, @NonNull PreferencesHelper preferencesHelper); String buildAuthorization(); Single<Token> login(String username, String password); Single<List<Topic>> getTopics(int offset); Single<TopicDetail> createTopic(int nodeId, String title, String body); Single<List<News>> getAllNewses(Integer offset); Single<List<News>> getNewses(String nodeId, Integer offset); Single<List<NewsReply>> getNewsReplies(int newsId, int offset); Single<List<Topic>> getUserTopics(String userLogin, int offset); Single<List<Topic>> getUserFavorites(String userLogin, int offset); Single<List<UserReply>> getUserReplies(String userLogin, int offset); Single<UserDetail> getMe(); Single<UserDetail> getMe(boolean forced); Single<NotificationUnread> getNotificationsUnreadCount(); Single<List<Notification>> getNotifications(int offset); Single<TopicAndReplies> getTopicAndComments(int topicId); Single<TopicDetail> getTopicDetail(int id); Single<List<TopicReply>> getTopicReplies(int topicId, int offset); Single<TopicReply> publishComment(int id, String body); Single<ImageResult> uploadPhoto(String filePath); Single<Map<TopicNodeCategory, List<TopicNode>>> getTopicNodes(); Single<List<Project>> getProjects(int offset); Single<List<SiteListItem>> getSites(); Single<UserDetail> getUserDetail(String userLogin); static final int PAGE_LIMIT; static final String DATE_FORMAT; }