Search in sources :

Example 1 with Repository

use of com.marshalchen.ultimateandroid.demo.model.Repository in project UltimateAndroid by cymcsg.

the class RepositoryPresenter method loadRepositoryInfo.

public void loadRepositoryInfo() {
    repositoryView.showProgressBar();
    Subscriber subscriber = new Subscriber<RepositoryList<List<Repository>>>() {

        @Override
        public void onCompleted() {
            Logs.d("completed");
        }

        @Override
        public void onError(Throwable e) {
            Logs.e(e.getMessage());
        }

        @Override
        public void onNext(RepositoryList<List<Repository>> repositoryList) {
            repositoryView.setReposotories(repositoryList);
        }
    };
    //  GithubApiService.getInstance().loadRepositoryInfo(subscriber, "ultimate", "java");
    GithubApiService.getInstance().loadRepositoryInfo(subscriber, "stars:>100", "java");
}
Also used : Repository(com.marshalchen.ultimateandroid.demo.model.Repository) Subscriber(rx.Subscriber) RepositoryList(com.marshalchen.ultimateandroid.demo.model.RepositoryList) RepositoryList(com.marshalchen.ultimateandroid.demo.model.RepositoryList) List(java.util.List)

Aggregations

Repository (com.marshalchen.ultimateandroid.demo.model.Repository)1 RepositoryList (com.marshalchen.ultimateandroid.demo.model.RepositoryList)1 List (java.util.List)1 Subscriber (rx.Subscriber)1