diff --git a/spring-social-github/src/main/java/org/springframework/social/github/api/GitHub.java b/spring-social-github/src/main/java/org/springframework/social/github/api/GitHub.java old mode 100644 new mode 100755 index 8373f3f2..abede614 --- a/spring-social-github/src/main/java/org/springframework/social/github/api/GitHub.java +++ b/spring-social-github/src/main/java/org/springframework/social/github/api/GitHub.java @@ -29,6 +29,7 @@ * * @author Craig Walls * @author Willie Wheeler (willie.wheeler@gmail.com) + * @author Michał Łoza (michal@mloza.pl) */ public interface GitHub extends ApiBinding { @@ -53,6 +54,13 @@ public interface GitHub extends ApiBinding { */ UserOperations userOperations(); + /** + * Returns the portion of the GitHub API containing the organization operations. + * + * @return organization operations + */ + OrganizationOperations organizationOperations(); + /** * Returns the underlying {@link RestOperations} object allowing for consumption of GitHub endpoints that may not be otherwise covered by the API binding. * The RestOperations object returned is configured to include an OAuth "Authorization" header on all requests. diff --git a/spring-social-github/src/main/java/org/springframework/social/github/api/GitHubOrganization.java b/spring-social-github/src/main/java/org/springframework/social/github/api/GitHubOrganization.java new file mode 100755 index 00000000..c5b07e8d --- /dev/null +++ b/spring-social-github/src/main/java/org/springframework/social/github/api/GitHubOrganization.java @@ -0,0 +1,56 @@ +/* + * Copyright 2013-2014 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.social.github.api; + +import java.io.Serializable; + +/** + * A GitHub organization + * + * @author Michał Łoza (michal@mloza.pl) + */ +@SuppressWarnings("serial") +public class GitHubOrganization implements Serializable { + + private final long id; + + private final String url; + + private final String login; + + private final String avatarUrl; + + private final String description; + + public GitHubOrganization(long id, String url, String login, String avatarUrl, String description) { + this.id = id; + this.url = url; + this.login = login; + this.avatarUrl = avatarUrl; + this.description = description; + } + + public long getId() { return id; } + + public String getUrl() { return url; } + + public String getLogin() { return login; } + + public String getAvatarUrl() { return avatarUrl; } + + public String getDescription() { return description; } + +} diff --git a/spring-social-github/src/main/java/org/springframework/social/github/api/OrganizationOperations.java b/spring-social-github/src/main/java/org/springframework/social/github/api/OrganizationOperations.java new file mode 100755 index 00000000..1a96512a --- /dev/null +++ b/spring-social-github/src/main/java/org/springframework/social/github/api/OrganizationOperations.java @@ -0,0 +1,16 @@ +package org.springframework.social.github.api; + +import java.util.List; + +/** + * Interface defining the operations for working with GitHub organizations. + * + * @author Michał Łoza (michal@mloza.pl) + */ +public interface OrganizationOperations { + + GitHubOrganization getOrganization(String organizationName); + + List getOrganizationRepositories(String organizationName); + +} diff --git a/spring-social-github/src/main/java/org/springframework/social/github/api/UserOperations.java b/spring-social-github/src/main/java/org/springframework/social/github/api/UserOperations.java old mode 100644 new mode 100755 index 5bf441a2..aa418c2c --- a/spring-social-github/src/main/java/org/springframework/social/github/api/UserOperations.java +++ b/spring-social-github/src/main/java/org/springframework/social/github/api/UserOperations.java @@ -21,6 +21,7 @@ * Interface defining the operations for working with GitHub users. * * @author Willie Wheeler (willie.wheeler@gmail.com) + * @author Michał Łoza (michal@mloza.pl) */ public interface UserOperations { @@ -44,7 +45,35 @@ public interface UserOperations { * @return the URL to the user's GitHub profile. */ String getProfileUrl(); - + + /** + * Retrieve current user repository list + * + * @return list of current user repositories + */ + List getRepositories(); + + /** + * Retrieve given user repository list + * + * @return list of given user repositories + */ + List getRepositories(String user); + + /** + * Retrieve current user organizations list (also private organizations) + * + * @return list of current user organizations + */ + List getOrganizations(); + + /** + * Retrieve given user organizations list (only public organizations) + * + * @return list of given user organizations + */ + List getOrganizations(String user); + /** * Public operation to return a given user's followers. * diff --git a/spring-social-github/src/main/java/org/springframework/social/github/api/impl/GitHubTemplate.java b/spring-social-github/src/main/java/org/springframework/social/github/api/impl/GitHubTemplate.java old mode 100644 new mode 100755 index 6bc1400c..431bb175 --- a/spring-social-github/src/main/java/org/springframework/social/github/api/impl/GitHubTemplate.java +++ b/spring-social-github/src/main/java/org/springframework/social/github/api/impl/GitHubTemplate.java @@ -17,10 +17,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; -import org.springframework.social.github.api.GistOperations; -import org.springframework.social.github.api.GitHub; -import org.springframework.social.github.api.RepoOperations; -import org.springframework.social.github.api.UserOperations; +import org.springframework.social.github.api.*; import org.springframework.social.github.api.impl.json.GitHubModule; import org.springframework.social.oauth2.AbstractOAuth2ApiBinding; import org.springframework.social.oauth2.OAuth2Version; @@ -33,12 +30,14 @@ * @author Craig Walls * @author Willie Wheeler (willie.wheeler@gmail.com) * @author Andy Wilkinson + * @author Michał Łoza (michal@mloza.pl) */ public class GitHubTemplate extends AbstractOAuth2ApiBinding implements GitHub { private GistOperations gistOperations; private RepoOperations repoOperations; private UserOperations userOperations; - + private OrganizationOperations organizationOperations; + /** * No-arg constructor to support cases in which you want to call the GitHub * API without requiring authorization. This is useful for public operations, @@ -84,6 +83,10 @@ public RestOperations restOperations() { return getRestTemplate(); } + public OrganizationOperations organizationOperations() { + return organizationOperations; + } + @Override protected MappingJackson2HttpMessageConverter getJsonMessageConverter() { MappingJackson2HttpMessageConverter converter = super.getJsonMessageConverter(); @@ -99,6 +102,7 @@ private void initSubApis() { this.gistOperations = new GistTemplate(getRestTemplate(), isAuthorized()); this.repoOperations = new RepoTemplate(getRestTemplate(), isAuthorized()); this.userOperations = new UserTemplate(getRestTemplate(), isAuthorized()); + this.organizationOperations = new OrganizationTemplate(getRestTemplate(), isAuthorized()); } } diff --git a/spring-social-github/src/main/java/org/springframework/social/github/api/impl/OrganizationTemplate.java b/spring-social-github/src/main/java/org/springframework/social/github/api/impl/OrganizationTemplate.java new file mode 100755 index 00000000..95d39821 --- /dev/null +++ b/spring-social-github/src/main/java/org/springframework/social/github/api/impl/OrganizationTemplate.java @@ -0,0 +1,56 @@ +/* + * Copyright 2013 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.social.github.api.impl; + +import org.springframework.social.github.api.*; +import org.springframework.web.client.RestTemplate; + +import java.util.List; + +import static java.util.Arrays.asList; + +/** + *

+ * Organization template implementation. + *

+ * + * @author Michał Łoza (michal@mloza.pl) + */ +public class OrganizationTemplate extends AbstractGitHubOperations implements OrganizationOperations { + + private final RestTemplate restTemplate; + + /** + * @param restTemplate A RestTemplate + * @param isAuthorizedForUser Boolean indicating whether the RestTemplate is authorized for a user + */ + public OrganizationTemplate(RestTemplate restTemplate, boolean isAuthorizedForUser) { + super(isAuthorizedForUser); + this.restTemplate = restTemplate; + } + + public GitHubOrganization getOrganization(String organizationName) { + return restTemplate.getForObject(buildOrganizationUri(""), GitHubOrganization.class, organizationName); + } + + public List getOrganizationRepositories(String organizationName) { + return asList(restTemplate.getForObject(buildOrganizationUri("/repos"), GitHubRepo[].class, organizationName)); + } + + private String buildOrganizationUri(String path) { + return buildUri("orgs/{organization}" + path); + } +} diff --git a/spring-social-github/src/main/java/org/springframework/social/github/api/impl/UserTemplate.java b/spring-social-github/src/main/java/org/springframework/social/github/api/impl/UserTemplate.java old mode 100644 new mode 100755 index c76c8cd5..36292944 --- a/spring-social-github/src/main/java/org/springframework/social/github/api/impl/UserTemplate.java +++ b/spring-social-github/src/main/java/org/springframework/social/github/api/impl/UserTemplate.java @@ -15,7 +15,7 @@ */ package org.springframework.social.github.api.impl; -import static java.util.Arrays.*; +import static java.util.Arrays.asList; import java.text.DateFormat; import java.text.ParseException; @@ -23,11 +23,8 @@ import java.util.Date; import java.util.List; import java.util.Locale; -import java.util.Map; -import org.springframework.social.github.api.GitHubUser; -import org.springframework.social.github.api.GitHubUserProfile; -import org.springframework.social.github.api.UserOperations; +import org.springframework.social.github.api.*; import org.springframework.web.client.RestTemplate; /** @@ -37,6 +34,7 @@ * * @author Willie Wheeler (willie.wheeler@gmail.com) * @author Andy Wilkinson + * @author Michał Łoza (michal@mloza.pl) */ public class UserTemplate extends AbstractGitHubOperations implements UserOperations { @@ -51,6 +49,22 @@ public UserTemplate(RestTemplate restTemplate, boolean isAuthorizedForUser) { this.restTemplate = restTemplate; } + public List getRepositories() { + return asList(restTemplate.getForObject(buildUri("/user/repos"), GitHubRepo[].class)); + } + + public List getRepositories(String user) { + return asList(restTemplate.getForObject(buildUserUri("/repos"), GitHubRepo[].class, user)); + } + + public List getOrganizations() { + return asList(restTemplate.getForObject(buildUri("/user/orgs"), GitHubOrganization[].class)); + } + + public List getOrganizations(String user) { + return asList(restTemplate.getForObject(buildUserUri("/orgs"), GitHubOrganization[].class, user)); + } + public List getFollowers(String user) { return asList(restTemplate.getForObject(buildUserUri("/followers"), GitHubUser[].class, user)); } diff --git a/spring-social-github/src/main/java/org/springframework/social/github/api/impl/json/GitHubModule.java b/spring-social-github/src/main/java/org/springframework/social/github/api/impl/json/GitHubModule.java old mode 100644 new mode 100755 index ba2954e8..fb3dfbd0 --- a/spring-social-github/src/main/java/org/springframework/social/github/api/impl/json/GitHubModule.java +++ b/spring-social-github/src/main/java/org/springframework/social/github/api/impl/json/GitHubModule.java @@ -23,6 +23,7 @@ * Jackson module for setting up mixin annotations on GitHub model types. * * @author Andy Wilkinson + * @author Michał Łoza */ public class GitHubModule extends SimpleModule { @@ -42,5 +43,6 @@ public void setupModule(SetupContext context) { context.setMixInAnnotations(GitHubRepo.class, GitHubRepoMixin.class); context.setMixInAnnotations(GitHubUser.class, GitHubUserMixin.class); context.setMixInAnnotations(GitHubUserProfile.class, GitHubUserProfileMixin.class); + context.setMixInAnnotations(GitHubOrganization.class, GitHubOrganizationMixin.class); } } diff --git a/spring-social-github/src/main/java/org/springframework/social/github/api/impl/json/GitHubOrganizationMixin.java b/spring-social-github/src/main/java/org/springframework/social/github/api/impl/json/GitHubOrganizationMixin.java new file mode 100755 index 00000000..e9cd5f00 --- /dev/null +++ b/spring-social-github/src/main/java/org/springframework/social/github/api/impl/json/GitHubOrganizationMixin.java @@ -0,0 +1,44 @@ +/* + * Copyright 2014 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.social.github.api.impl.json; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.social.github.api.GitHubOrganization; + +/** + * Annotated mixin to add annotations to {@link GitHubOrganization} + * + * @author Michał Łoza + */ +abstract class GitHubOrganizationMixin extends GitHubObjectMixin { + + long id; + + String url; + + String login; + + String avatarUrl; + + String description; + + GitHubOrganizationMixin( + @JsonProperty("id") long id, + @JsonProperty("url") String url, + @JsonProperty("login") String login, + @JsonProperty("avatar_url") String avatarUrl, + @JsonProperty("description") String description) {} +} diff --git a/spring-social-github/src/test/java/org/springframework/social/github/api/impl/OrganizationTemplateTest.java b/spring-social-github/src/test/java/org/springframework/social/github/api/impl/OrganizationTemplateTest.java new file mode 100755 index 00000000..686ddb55 --- /dev/null +++ b/spring-social-github/src/test/java/org/springframework/social/github/api/impl/OrganizationTemplateTest.java @@ -0,0 +1,84 @@ +/* + * Copyright 2013-2014 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.social.github.api.impl; + +import org.junit.Test; +import org.springframework.http.MediaType; +import org.springframework.social.github.api.*; + +import java.util.Date; +import java.util.List; + +import static org.junit.Assert.*; +import static org.springframework.http.HttpMethod.GET; +import static org.springframework.test.web.client.match.MockRestRequestMatchers.method; +import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo; +import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess; + +/** + * @author Michał Łoza (michal@mloza.pl) + */ +public class OrganizationTemplateTest extends AbstractGitHubApiTest { + + @Test + public void getOrganization() { + responseHeaders.setContentType(MediaType.APPLICATION_JSON); + mockServer.expect(requestTo("https://api.github.com/orgs/EndlessInfinity")) + .andExpect(method(GET)) + .andRespond(withSuccess(jsonResource("organization"), MediaType.APPLICATION_JSON)); + + GitHubOrganization organization = gitHub.organizationOperations().getOrganization("EndlessInfinity"); + + assertEquals(17481604L, organization.getId()); + assertEquals("EndlessInfinity", organization.getLogin()); + assertEquals("Test organization", organization.getDescription()); + assertEquals("https://api.github.com/orgs/EndlessInfinity", organization.getUrl()); + } + + @Test + public void getOrganizationRepos() { + responseHeaders.setContentType(MediaType.APPLICATION_JSON); + mockServer.expect(requestTo("https://api.github.com/orgs/EndlessInfinity/repos")) + .andExpect(method(GET)) + .andRespond(withSuccess(jsonResource("organization-repos"), MediaType.APPLICATION_JSON)); + + List repos = gitHub.organizationOperations().getOrganizationRepositories("EndlessInfinity"); + + assertEquals(2, repos.size()); + + GitHubRepo repo = repos.get(0); + assertEquals(52549339L, repo.getId()); + assertEquals("testRepository1", repo.getName()); + assertEquals("TestingRepository", repo.getDescription()); + assertEquals("https://api.github.com/repos/EndlessInfinity/testRepository1", repo.getUrl()); + assertEquals("https://github.com/EndlessInfinity/testRepository1", repo.getHtmlUrl()); + assertEquals("https://github.com/EndlessInfinity/testRepository1.git", repo.getCloneUrl()); + assertEquals("git://github.com/EndlessInfinity/testRepository1.git", repo.getGitUrl()); + assertEquals("git@github.com:EndlessInfinity/testRepository1.git", repo.getSshUrl()); + assertEquals("https://github.com/EndlessInfinity/testRepository1", repo.getSvnUrl()); + + repo = repos.get(1); + assertEquals(52549359L, repo.getId()); + assertEquals("testRepository2", repo.getName()); + assertEquals("Testing repository 2", repo.getDescription()); + assertEquals("https://api.github.com/repos/EndlessInfinity/testRepository2", repo.getUrl()); + assertEquals("https://github.com/EndlessInfinity/testRepository2", repo.getHtmlUrl()); + assertEquals("https://github.com/EndlessInfinity/testRepository2.git", repo.getCloneUrl()); + assertEquals("git://github.com/EndlessInfinity/testRepository2.git", repo.getGitUrl()); + assertEquals("git@github.com:EndlessInfinity/testRepository2.git", repo.getSshUrl()); + assertEquals("https://github.com/EndlessInfinity/testRepository2", repo.getSvnUrl()); + } +} diff --git a/spring-social-github/src/test/java/org/springframework/social/github/api/impl/UserTemplateTest.java b/spring-social-github/src/test/java/org/springframework/social/github/api/impl/UserTemplateTest.java old mode 100644 new mode 100755 index e1ccda18..7e322b97 --- a/spring-social-github/src/test/java/org/springframework/social/github/api/impl/UserTemplateTest.java +++ b/spring-social-github/src/test/java/org/springframework/social/github/api/impl/UserTemplateTest.java @@ -23,12 +23,17 @@ import org.junit.Test; import org.springframework.core.io.ClassPathResource; import org.springframework.http.MediaType; +import org.springframework.social.github.api.GitHubOrganization; +import org.springframework.social.github.api.GitHubRepo; import org.springframework.social.github.api.GitHubUserProfile; +import java.util.List; + /** * @author Craig Walls * @author Willie Wheeler (willie.wheeler@gmail.com) * @author Andy Wilkinson + * @author Michał Łoza (michal@mloza.pl) */ public class UserTemplateTest extends AbstractGitHubApiTest { @@ -80,4 +85,82 @@ public void getFollowing() { assertEquals(17, gitHub.userOperations().getFollowing("williewheeler").size()); } + @Test + public void getRepositories() { + responseHeaders.setContentType(MediaType.APPLICATION_JSON); + mockServer.expect(requestTo("https://api.github.com/user/repos")) + .andExpect(method(GET)) + .andRespond(withSuccess(jsonResource("user-repos"), MediaType.APPLICATION_JSON)); + + List repos = gitHub.userOperations().getRepositories(); + validateRepos(repos); + } + + @Test + public void getUserRepositories() { + responseHeaders.setContentType(MediaType.APPLICATION_JSON); + mockServer.expect(requestTo("https://api.github.com/users/mloza/repos")) + .andExpect(method(GET)) + .andRespond(withSuccess(jsonResource("user-repos"), MediaType.APPLICATION_JSON)); + + List repos = gitHub.userOperations().getRepositories("mloza"); + validateRepos(repos); + } + + private void validateRepos(List repos) { + assertEquals(2, repos.size()); + + GitHubRepo repo = repos.get(0); + assertEquals(52549339L, repo.getId()); + assertEquals("testRepository1", repo.getName()); + assertEquals("TestingRepository", repo.getDescription()); + assertEquals("https://api.github.com/repos/EndlessInfinity/testRepository1", repo.getUrl()); + assertEquals("https://github.com/EndlessInfinity/testRepository1", repo.getHtmlUrl()); + assertEquals("https://github.com/EndlessInfinity/testRepository1.git", repo.getCloneUrl()); + assertEquals("git://github.com/EndlessInfinity/testRepository1.git", repo.getGitUrl()); + assertEquals("git@github.com:EndlessInfinity/testRepository1.git", repo.getSshUrl()); + assertEquals("https://github.com/EndlessInfinity/testRepository1", repo.getSvnUrl()); + + repo = repos.get(1); + assertEquals(52549359L, repo.getId()); + assertEquals("testRepository2", repo.getName()); + assertEquals("Testing repository 2", repo.getDescription()); + assertEquals("https://api.github.com/repos/EndlessInfinity/testRepository2", repo.getUrl()); + assertEquals("https://github.com/EndlessInfinity/testRepository2", repo.getHtmlUrl()); + assertEquals("https://github.com/EndlessInfinity/testRepository2.git", repo.getCloneUrl()); + assertEquals("git://github.com/EndlessInfinity/testRepository2.git", repo.getGitUrl()); + assertEquals("git@github.com:EndlessInfinity/testRepository2.git", repo.getSshUrl()); + assertEquals("https://github.com/EndlessInfinity/testRepository2", repo.getSvnUrl()); + } + + @Test + public void getOrganizations() { + responseHeaders.setContentType(MediaType.APPLICATION_JSON); + mockServer.expect(requestTo("https://api.github.com/user/orgs")) + .andExpect(method(GET)) + .andRespond(withSuccess(jsonResource("user-orgs"), MediaType.APPLICATION_JSON)); + + List organizations = gitHub.userOperations().getOrganizations(); + validateOrganizations(organizations); + } + + @Test + public void getGivenUserOrganizations() { + responseHeaders.setContentType(MediaType.APPLICATION_JSON); + mockServer.expect(requestTo("https://api.github.com/users/mloza/orgs")) + .andExpect(method(GET)) + .andRespond(withSuccess(jsonResource("user-orgs"), MediaType.APPLICATION_JSON)); + + List organizations = gitHub.userOperations().getOrganizations("mloza"); + validateOrganizations(organizations); + } + + private void validateOrganizations(List organizations) { + assertEquals(2, organizations.size()); + + assertEquals("EndlessInfinity", organizations.get(0).getLogin()); + assertEquals(17481604L, organizations.get(0).getId()); + assertEquals("EndlessInfinity2", organizations.get(1).getLogin()); + assertEquals(17481605L, organizations.get(1).getId()); + } } diff --git a/spring-social-github/src/test/java/org/springframework/social/github/api/impl/organization-repos.json b/spring-social-github/src/test/java/org/springframework/social/github/api/impl/organization-repos.json new file mode 100755 index 00000000..0dfc8e3f --- /dev/null +++ b/spring-social-github/src/test/java/org/springframework/social/github/api/impl/organization-repos.json @@ -0,0 +1,188 @@ +[ + { + "id": 52549339, + "name": "testRepository1", + "full_name": "EndlessInfinity/testRepository1", + "owner": { + "login": "EndlessInfinity", + "id": 17481604, + "avatar_url": "https://avatars.githubusercontent.com/u/17481604?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/EndlessInfinity", + "html_url": "https://github.com/EndlessInfinity", + "followers_url": "https://api.github.com/users/EndlessInfinity/followers", + "following_url": "https://api.github.com/users/EndlessInfinity/following{/other_user}", + "gists_url": "https://api.github.com/users/EndlessInfinity/gists{/gist_id}", + "starred_url": "https://api.github.com/users/EndlessInfinity/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/EndlessInfinity/subscriptions", + "organizations_url": "https://api.github.com/users/EndlessInfinity/orgs", + "repos_url": "https://api.github.com/users/EndlessInfinity/repos", + "events_url": "https://api.github.com/users/EndlessInfinity/events{/privacy}", + "received_events_url": "https://api.github.com/users/EndlessInfinity/received_events", + "type": "Organization", + "site_admin": false + }, + "private": false, + "html_url": "https://github.com/EndlessInfinity/testRepository1", + "description": "TestingRepository", + "fork": false, + "url": "https://api.github.com/repos/EndlessInfinity/testRepository1", + "forks_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/forks", + "keys_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/teams", + "hooks_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/hooks", + "issue_events_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/issues/events{/number}", + "events_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/events", + "assignees_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/assignees{/user}", + "branches_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/branches{/branch}", + "tags_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/tags", + "blobs_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/statuses/{sha}", + "languages_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/languages", + "stargazers_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/stargazers", + "contributors_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/contributors", + "subscribers_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/subscribers", + "subscription_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/subscription", + "commits_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/contents/{+path}", + "compare_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/merges", + "archive_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/downloads", + "issues_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/issues{/number}", + "pulls_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/pulls{/number}", + "milestones_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/milestones{/number}", + "notifications_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/labels{/name}", + "releases_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/releases{/id}", + "deployments_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/deployments", + "created_at": "2016-02-25T19:01:35Z", + "updated_at": "2016-02-25T19:01:35Z", + "pushed_at": "2016-02-25T19:01:35Z", + "git_url": "git://github.com/EndlessInfinity/testRepository1.git", + "ssh_url": "git@github.com:EndlessInfinity/testRepository1.git", + "clone_url": "https://github.com/EndlessInfinity/testRepository1.git", + "svn_url": "https://github.com/EndlessInfinity/testRepository1", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "open_issues_count": 0, + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "master", + "permissions": { + "admin": false, + "push": false, + "pull": true + } + }, + { + "id": 52549359, + "name": "testRepository2", + "full_name": "EndlessInfinity/testRepository2", + "owner": { + "login": "EndlessInfinity", + "id": 17481604, + "avatar_url": "https://avatars.githubusercontent.com/u/17481604?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/EndlessInfinity", + "html_url": "https://github.com/EndlessInfinity", + "followers_url": "https://api.github.com/users/EndlessInfinity/followers", + "following_url": "https://api.github.com/users/EndlessInfinity/following{/other_user}", + "gists_url": "https://api.github.com/users/EndlessInfinity/gists{/gist_id}", + "starred_url": "https://api.github.com/users/EndlessInfinity/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/EndlessInfinity/subscriptions", + "organizations_url": "https://api.github.com/users/EndlessInfinity/orgs", + "repos_url": "https://api.github.com/users/EndlessInfinity/repos", + "events_url": "https://api.github.com/users/EndlessInfinity/events{/privacy}", + "received_events_url": "https://api.github.com/users/EndlessInfinity/received_events", + "type": "Organization", + "site_admin": false + }, + "private": false, + "html_url": "https://github.com/EndlessInfinity/testRepository2", + "description": "Testing repository 2", + "fork": false, + "url": "https://api.github.com/repos/EndlessInfinity/testRepository2", + "forks_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/forks", + "keys_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/teams", + "hooks_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/hooks", + "issue_events_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/issues/events{/number}", + "events_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/events", + "assignees_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/assignees{/user}", + "branches_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/branches{/branch}", + "tags_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/tags", + "blobs_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/statuses/{sha}", + "languages_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/languages", + "stargazers_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/stargazers", + "contributors_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/contributors", + "subscribers_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/subscribers", + "subscription_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/subscription", + "commits_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/contents/{+path}", + "compare_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/merges", + "archive_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/downloads", + "issues_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/issues{/number}", + "pulls_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/pulls{/number}", + "milestones_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/milestones{/number}", + "notifications_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/labels{/name}", + "releases_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/releases{/id}", + "deployments_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/deployments", + "created_at": "2016-02-25T19:01:54Z", + "updated_at": "2016-02-25T19:01:54Z", + "pushed_at": "2016-02-25T19:01:55Z", + "git_url": "git://github.com/EndlessInfinity/testRepository2.git", + "ssh_url": "git@github.com:EndlessInfinity/testRepository2.git", + "clone_url": "https://github.com/EndlessInfinity/testRepository2.git", + "svn_url": "https://github.com/EndlessInfinity/testRepository2", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "open_issues_count": 0, + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "master", + "permissions": { + "admin": false, + "push": false, + "pull": true + } + } +] \ No newline at end of file diff --git a/spring-social-github/src/test/java/org/springframework/social/github/api/impl/organization.json b/spring-social-github/src/test/java/org/springframework/social/github/api/impl/organization.json new file mode 100755 index 00000000..33266019 --- /dev/null +++ b/spring-social-github/src/test/java/org/springframework/social/github/api/impl/organization.json @@ -0,0 +1,26 @@ +{ + "login": "EndlessInfinity", + "id": 17481604, + "url": "https://api.github.com/orgs/EndlessInfinity", + "repos_url": "https://api.github.com/orgs/EndlessInfinity/repos", + "events_url": "https://api.github.com/orgs/EndlessInfinity/events", + "hooks_url": "https://api.github.com/orgs/EndlessInfinity/hooks", + "issues_url": "https://api.github.com/orgs/EndlessInfinity/issues", + "members_url": "https://api.github.com/orgs/EndlessInfinity/members{/member}", + "public_members_url": "https://api.github.com/orgs/EndlessInfinity/public_members{/member}", + "avatar_url": "https://avatars.githubusercontent.com/u/17481604?v=3", + "description": "Test organization", + "name": "EndlessInfinity", + "company": null, + "blog": "http://mloza.pl", + "location": "", + "email": "", + "public_repos": 2, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/EndlessInfinity", + "created_at": "2016-02-25T19:01:00Z", + "updated_at": "2016-02-25T19:14:25Z", + "type": "Organization" +} \ No newline at end of file diff --git a/spring-social-github/src/test/java/org/springframework/social/github/api/impl/user-orgs.json b/spring-social-github/src/test/java/org/springframework/social/github/api/impl/user-orgs.json new file mode 100755 index 00000000..bd6a85e3 --- /dev/null +++ b/spring-social-github/src/test/java/org/springframework/social/github/api/impl/user-orgs.json @@ -0,0 +1,28 @@ +[ + { + "login": "EndlessInfinity", + "id": 17481604, + "url": "https://api.github.com/orgs/EndlessInfinity", + "repos_url": "https://api.github.com/orgs/EndlessInfinity/repos", + "events_url": "https://api.github.com/orgs/EndlessInfinity/events", + "hooks_url": "https://api.github.com/orgs/EndlessInfinity/hooks", + "issues_url": "https://api.github.com/orgs/EndlessInfinity/issues", + "members_url": "https://api.github.com/orgs/EndlessInfinity/members{/member}", + "public_members_url": "https://api.github.com/orgs/EndlessInfinity/public_members{/member}", + "avatar_url": "https://avatars.githubusercontent.com/u/17481604?v=3", + "description": "Test organization" + }, + { + "login": "EndlessInfinity2", + "id": 17481605, + "url": "https://api.github.com/orgs/EndlessInfinity2", + "repos_url": "https://api.github.com/orgs/EndlessInfinity2/repos", + "events_url": "https://api.github.com/orgs/EndlessInfinity2/events", + "hooks_url": "https://api.github.com/orgs/EndlessInfinity2/hooks", + "issues_url": "https://api.github.com/orgs/EndlessInfinity2/issues", + "members_url": "https://api.github.com/orgs/EndlessInfinity2/members{/member}", + "public_members_url": "https://api.github.com/orgs/EndlessInfinity2/public_members{/member}", + "avatar_url": "https://avatars.githubusercontent.com/u/17481604?v=3", + "description": "Test organization" + } +] \ No newline at end of file diff --git a/spring-social-github/src/test/java/org/springframework/social/github/api/impl/user-repos.json b/spring-social-github/src/test/java/org/springframework/social/github/api/impl/user-repos.json new file mode 100755 index 00000000..8a6a6f8a --- /dev/null +++ b/spring-social-github/src/test/java/org/springframework/social/github/api/impl/user-repos.json @@ -0,0 +1,188 @@ +[ + { + "id": 52549339, + "name": "testRepository1", + "full_name": "EndlessInfinity/testRepository1", + "owner": { + "login": "EndlessInfinity", + "id": 17481604, + "avatar_url": "https://avatars.githubusercontent.com/u/17481604?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/EndlessInfinity", + "html_url": "https://github.com/EndlessInfinity", + "followers_url": "https://api.github.com/users/EndlessInfinity/followers", + "following_url": "https://api.github.com/users/EndlessInfinity/following{/other_user}", + "gists_url": "https://api.github.com/users/EndlessInfinity/gists{/gist_id}", + "starred_url": "https://api.github.com/users/EndlessInfinity/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/EndlessInfinity/subscriptions", + "organizations_url": "https://api.github.com/users/EndlessInfinity/orgs", + "repos_url": "https://api.github.com/users/EndlessInfinity/repos", + "events_url": "https://api.github.com/users/EndlessInfinity/events{/privacy}", + "received_events_url": "https://api.github.com/users/EndlessInfinity/received_events", + "type": "Organization", + "site_admin": false + }, + "private": false, + "html_url": "https://github.com/EndlessInfinity/testRepository1", + "description": "TestingRepository", + "fork": false, + "url": "https://api.github.com/repos/EndlessInfinity/testRepository1", + "forks_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/forks", + "keys_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/teams", + "hooks_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/hooks", + "issue_events_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/issues/events{/number}", + "events_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/events", + "assignees_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/assignees{/user}", + "branches_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/branches{/branch}", + "tags_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/tags", + "blobs_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/statuses/{sha}", + "languages_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/languages", + "stargazers_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/stargazers", + "contributors_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/contributors", + "subscribers_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/subscribers", + "subscription_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/subscription", + "commits_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/contents/{+path}", + "compare_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/merges", + "archive_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/downloads", + "issues_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/issues{/number}", + "pulls_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/pulls{/number}", + "milestones_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/milestones{/number}", + "notifications_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/labels{/name}", + "releases_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/releases{/id}", + "deployments_url": "https://api.github.com/repos/EndlessInfinity/testRepository1/deployments", + "created_at": "2016-02-25T19:01:35Z", + "updated_at": "2016-02-25T19:01:35Z", + "pushed_at": "2016-02-25T19:01:35Z", + "git_url": "git://github.com/EndlessInfinity/testRepository1.git", + "ssh_url": "git@github.com:EndlessInfinity/testRepository1.git", + "clone_url": "https://github.com/EndlessInfinity/testRepository1.git", + "svn_url": "https://github.com/EndlessInfinity/testRepository1", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "open_issues_count": 0, + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "master", + "permissions": { + "admin": true, + "push": true, + "pull": true + } + }, + { + "id": 52549359, + "name": "testRepository2", + "full_name": "EndlessInfinity/testRepository2", + "owner": { + "login": "EndlessInfinity", + "id": 17481604, + "avatar_url": "https://avatars.githubusercontent.com/u/17481604?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/EndlessInfinity", + "html_url": "https://github.com/EndlessInfinity", + "followers_url": "https://api.github.com/users/EndlessInfinity/followers", + "following_url": "https://api.github.com/users/EndlessInfinity/following{/other_user}", + "gists_url": "https://api.github.com/users/EndlessInfinity/gists{/gist_id}", + "starred_url": "https://api.github.com/users/EndlessInfinity/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/EndlessInfinity/subscriptions", + "organizations_url": "https://api.github.com/users/EndlessInfinity/orgs", + "repos_url": "https://api.github.com/users/EndlessInfinity/repos", + "events_url": "https://api.github.com/users/EndlessInfinity/events{/privacy}", + "received_events_url": "https://api.github.com/users/EndlessInfinity/received_events", + "type": "Organization", + "site_admin": false + }, + "private": false, + "html_url": "https://github.com/EndlessInfinity/testRepository2", + "description": "Testing repository 2", + "fork": false, + "url": "https://api.github.com/repos/EndlessInfinity/testRepository2", + "forks_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/forks", + "keys_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/teams", + "hooks_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/hooks", + "issue_events_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/issues/events{/number}", + "events_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/events", + "assignees_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/assignees{/user}", + "branches_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/branches{/branch}", + "tags_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/tags", + "blobs_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/statuses/{sha}", + "languages_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/languages", + "stargazers_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/stargazers", + "contributors_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/contributors", + "subscribers_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/subscribers", + "subscription_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/subscription", + "commits_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/contents/{+path}", + "compare_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/merges", + "archive_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/downloads", + "issues_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/issues{/number}", + "pulls_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/pulls{/number}", + "milestones_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/milestones{/number}", + "notifications_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/labels{/name}", + "releases_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/releases{/id}", + "deployments_url": "https://api.github.com/repos/EndlessInfinity/testRepository2/deployments", + "created_at": "2016-02-25T19:01:54Z", + "updated_at": "2016-02-25T19:01:54Z", + "pushed_at": "2016-02-25T19:01:55Z", + "git_url": "git://github.com/EndlessInfinity/testRepository2.git", + "ssh_url": "git@github.com:EndlessInfinity/testRepository2.git", + "clone_url": "https://github.com/EndlessInfinity/testRepository2.git", + "svn_url": "https://github.com/EndlessInfinity/testRepository2", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "open_issues_count": 0, + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "master", + "permissions": { + "admin": true, + "push": true, + "pull": true + } + } +] \ No newline at end of file