@Override public void doLoadInBackground(HashMap<Integer, Object> result) throws IOException { Gh4Application app = (Gh4Application) getContext().getApplicationContext(); GitHubClient client = new GitHubClient(); client.setOAuth2Token(app.getAuthToken()); RepositoryService repoService = new RepositoryService(client); result.put(LoaderResult.DATA, repoService.getRepository(mRepoOwner, mRepoName)); }
@Override public void doLoadInBackground(HashMap<Integer, Object> result) throws IOException { Gh4Application app = (Gh4Application) getContext().getApplicationContext(); GitHubClient client = new DefaultClient(); client.setOAuth2Token(app.getAuthToken()); IssueService issueService = new IssueService(client); result.put(LoaderResult.DATA, issueService.getComments(mRepoOwner, mRepoName, mIssueNumber)); }