@Test public void getCreatedTopics() { Member livid = new Member("Livid"); new MemberService(iResponsibleView, new ResponseListener<Member>() { @Override public boolean onFailed(String msg) { System.err.println(msg); return true; } @Override public void onComplete(Member result) { System.out.println(result.getTopicsCount()); for (Topic topic:result.getCreatedTopics()){ System.out.println(topic); } } }).getCreatedTopics(livid, 2); }
public void getCreatedTopics(Member member, int page){ final Member member1 = (Member) member.clone(); mMemberApi.getMemberTopics(member1.getUsername(), page) .compose(RxUtil.io2main()) .subscribe(new RxObserver<String>(this){ @Override public void _onNext(String s) { if (!verify(s)){ return; } HtmlUtil.attachCreatedTopics(member1, s); returnSuccess(member1); } }); }
MemberService extends BaseService<Member> { public void getCreatedTopics(Member member, int page){ final Member member1 = (Member) member.clone(); mMemberApi.getMemberTopics(member1.getUsername(), page) .compose(RxUtil.io2main()) .subscribe(new RxObserver<String>(this){ @Override public void _onNext(String s) { if (!verify(s)){ return; } HtmlUtil.attachCreatedTopics(member1, s); returnSuccess(member1); } }); } }
MemberService extends BaseService<Member> { public void getCreatedTopics(Member member, int page){ final Member member1 = (Member) member.clone(); mMemberApi.getMemberTopics(member1.getUsername(), page) .compose(RxUtil.io2main()) .subscribe(new RxObserver<String>(this){ @Override public void _onNext(String s) { if (!verify(s)){ return; } HtmlUtil.attachCreatedTopics(member1, s); returnSuccess(member1); } }); } MemberService(IResponsibleView iResponsibleView, ResponseListener<Member> responseListener); }
MemberService extends BaseService<Member> { public void getCreatedTopics(Member member, int page){ final Member member1 = (Member) member.clone(); mMemberApi.getMemberTopics(member1.getUsername(), page) .compose(RxUtil.io2main()) .subscribe(new RxObserver<String>(this){ @Override public void _onNext(String s) { if (!verify(s)){ return; } HtmlUtil.attachCreatedTopics(member1, s); returnSuccess(member1); } }); } MemberService(IResponsibleView iResponsibleView, ResponseListener<Member> responseListener); void getMemberDetail(Member member); void getMemberDetail(String username); void getCreatedTopics(Member member, int page); }
MemberService extends BaseService<Member> { public void getCreatedTopics(Member member, int page){ final Member member1 = (Member) member.clone(); mMemberApi.getMemberTopics(member1.getUsername(), page) .compose(RxUtil.io2main()) .subscribe(new RxObserver<String>(this){ @Override public void _onNext(String s) { if (!verify(s)){ return; } HtmlUtil.attachCreatedTopics(member1, s); returnSuccess(member1); } }); } MemberService(IResponsibleView iResponsibleView, ResponseListener<Member> responseListener); void getMemberDetail(Member member); void getMemberDetail(String username); void getCreatedTopics(Member member, int page); static final String ERR_NEED_LOGIN; static final String ERR_HAS_HIDDEN; }