@Test public void getRepo() { responseHeaders.setContentType(MediaType.APPLICATION_JSON); mockServer.expect(requestTo("https: .andExpect(method(GET)) .andRespond(withSuccess(jsonResource("repo"), MediaType.APPLICATION_JSON)); GitHubRepo repo = gitHub.repoOperations().getRepo("williewheeler", "skybase"); assertEquals(2811637L, repo.getId()); assertEquals("skybase", repo.getName()); assertEquals("CMDB based on Neo4j", repo.getDescription()); assertEquals("https: assertEquals("https: assertEquals("https: assertEquals("git: assertEquals("git@github.com:williewheeler/skybase.git", repo.getSshUrl()); assertEquals("https: }
public GitHubRepo getRepo(String user, String repo) { return restTemplate.getForObject(buildRepoUri(""), GitHubRepo.class, user, repo); }
RepoTemplate extends AbstractGitHubOperations implements RepoOperations { public GitHubRepo getRepo(String user, String repo) { return restTemplate.getForObject(buildRepoUri(""), GitHubRepo.class, user, repo); } }
RepoTemplate extends AbstractGitHubOperations implements RepoOperations { public GitHubRepo getRepo(String user, String repo) { return restTemplate.getForObject(buildRepoUri(""), GitHubRepo.class, user, repo); } RepoTemplate(RestTemplate restTemplate, boolean isAuthorizedForUser); }
RepoTemplate extends AbstractGitHubOperations implements RepoOperations { public GitHubRepo getRepo(String user, String repo) { return restTemplate.getForObject(buildRepoUri(""), GitHubRepo.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 GitHubRepo getRepo(String user, String repo) { return restTemplate.getForObject(buildRepoUri(""), GitHubRepo.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);  }