Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Releases: gitskarios/GithubAndroidSdk

Version 2.0.0 - RxJava

15 Nov 15:29
Compare
Choose a tag to compare

This new version uses RxJava as a base for the clients.

Should be used like:

*List clients:

UserReposClient reposClient = new UserReposClient(getActivity(), username);
reposClient.observable()
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Subscriber<Pair<List<Repo>, Integer>>() {...});
@Override
    public void onCompleted() {

    }

    @Override
    public void onError(Throwable e) {

    }

    @Override
    public void onNext(Pair<List<Repo>, Integer> listIntegerPair) {

    }

*Single clients:

GetRepoClient repoClient = new GetRepoClient(context, repoInfo);
repoClient.observable()
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(new Subscriber<Repo>() {

                @Override
                public void onNext(Repo repo) {

                }

                @Override
                public void onError(Throwable e) {

                }

                @Override
                public void onCompleted() {

                }
            });

The SDK doesn't provided RxAndroid dependency, you should add it by yourself

    compile 'io.reactivex:rxandroid:1.0.1'

First jCenter release

27 Jun 17:12
Compare
Choose a tag to compare