Slide 50
Slide 50 text
GithubNetwork
public String getBaseUrl() {
return "https://api.github.com";
}
public Observable> getContributors(String owner, String repo) {
GithubApi githubApi = ApiClientGenerater.generate(GithubApi.class, getBaseUrl());
return githubApi.getContributors(owner, repo)
.map(new Func1, List>() {
@Override
public List call(List contributors) {
Database.getDatabase()
.prepareInsertIntoContributor()
.executeAll(contributors);
return contributors;
}
});
}
public Observable> getContributors() {
return getContributors("konifar", "droidkaigi2016");
}