@Test public void getCommits() { responseHeaders.setContentType(MediaType.APPLICATION_JSON); mockServer.expect(requestTo("https: .andExpect(method(GET)) .andRespond(withSuccess(jsonResource("repo-commits"), MediaType.APPLICATION_JSON)); assertEquals(30, gitHub.repoOperations().getCommits("williewheeler", "skybase").size()); }
public List<GitHubCommit> getCommits(String user, String repo) { return asList(restTemplate.getForObject(buildRepoUri("/commits"), GitHubCommit[].class, user, repo)); }
RepoTemplate extends AbstractGitHubOperations implements RepoOperations { public List<GitHubCommit> getCommits(String user, String repo) { return asList(restTemplate.getForObject(buildRepoUri("/commits"), GitHubCommit[].class, user, repo)); } }
RepoTemplate extends AbstractGitHubOperations implements RepoOperations { public List<GitHubCommit> getCommits(String user, String repo) { return asList(restTemplate.getForObject(buildRepoUri("/commits"), GitHubCommit[].class, user, repo)); } RepoTemplate(RestTemplate restTemplate, boolean isAuthorizedForUser); }
RepoTemplate extends AbstractGitHubOperations implements RepoOperations { public List<GitHubCommit> getCommits(String user, String repo) { return asList(restTemplate.getForObject(buildRepoUri("/commits"), GitHubCommit[].class, user, repo)); } RepoTemplate(RestTemplate restTemplate, boolean isAuthorizedForUser); GitHubRepo getRepo(String user, String repo); List<GitHubUser> getCollaborators(String user, String repo); List<GitHubCommit> getCommits(String user, String repo); List<GitHubDownload> getDownloads(String user, String repo); GitHubDownload getDownload(String user, String repo, Long id); List<GitHubRepo> getForks(String user, String repo); List<GitHubIssue> getIssues(String user, String repo); List<GitHubUser> getWatchers(String user, String repo); List<GitHubHook> getHooks(String user, String repo); }
RepoTemplate extends AbstractGitHubOperations implements RepoOperations { public List<GitHubCommit> getCommits(String user, String repo) { return asList(restTemplate.getForObject(buildRepoUri("/commits"), GitHubCommit[].class, user, repo)); } RepoTemplate(RestTemplate restTemplate, boolean isAuthorizedForUser); GitHubRepo getRepo(String user, String repo); List<GitHubUser> getCollaborators(String user, String repo); List<GitHubCommit> getCommits(String user, String repo); List<GitHubDownload> getDownloads(String user, String repo); GitHubDownload getDownload(String user, String repo, Long id); List<GitHubRepo> getForks(String user, String repo); List<GitHubIssue> getIssues(String user, String repo); List<GitHubUser> getWatchers(String user, String repo); List<GitHubHook> getHooks(String user, String repo);  }