Package com.github.api.v2.services.constant.GitHubApiUrls

Examples of com.github.api.v2.services.constant.GitHubApiUrls.GitHubApiUrlBuilder.buildUrl()


   * @see com.github.api.v2.services.GistService#getOwnedGists()
   */
  @Override
  public List<Gist> getOwnedGists() {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.GistApiUrls.GET_OWNED_GISTS_URL);
        String                apiUrl  = builder.buildUrl();
        JsonElement json = unmarshallArray(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<List<Gist>>(){}, json);
  }

View Full Code Here


   * @see com.github.api.v2.services.GistService#getPublicGists()
   */
  @Override
  public List<Gist> getPublicGists() {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.GistApiUrls.GET_PUBLIC_GISTS_URL);
        String                apiUrl  = builder.buildUrl();
        JsonElement json = unmarshallArray(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<List<Gist>>(){}, json);
  }

View Full Code Here

   * @see com.github.api.v2.services.GistService#getStarredGists()
   */
  @Override
  public List<Gist> getStarredGists() {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.GistApiUrls.GET_STARRED_GISTS_URL);
        String                apiUrl  = builder.buildUrl();
        JsonElement json = unmarshallArray(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<List<Gist>>(){}, json);
  }
 
View Full Code Here

   */
  @Override
  public Repository createRepository(String name, String description,
      String homePage, Visibility visibility) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.RepositoryApiUrls.CREATE_REPOSITORY_URL);
        String                apiUrl  = builder.buildUrl();
        Map<String, String> parameters = new HashMap<String, String>();
        parameters.put(ParameterNames.NAME, name);
        parameters.put(ParameterNames.DESCRIPTION, description);
        parameters.put(ParameterNames.HOME_PAGE, homePage);
        parameters.put(ParameterNames.PUBLIC, ((visibility == Visibility.PUBLIC)? "1" : "0"));
View Full Code Here

   * @see com.github.api.v2.services.RepositoryService#getPushableRepositories()
   */
  @Override
  public List<Repository> getPushableRepositories() {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.RepositoryApiUrls.GET_PUSHABLE_REPOSITORIES_URL);
        String                apiUrl  = builder.buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<List<Repository>>(){}, json.get("repositories"));
  }

View Full Code Here

   * @see com.github.api.v2.services.OrganizationService#getAllOrganizationRepositories()
   */
  @Override
  public List<Repository> getAllOrganizationRepositories() {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.OrganizationApiUrls.GET_ALL_REPOSITORIES_URL);
        String                apiUrl  = builder.buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<List<Repository>>(){}, json.get("repositories"));
  }

View Full Code Here

   * @see com.github.api.v2.services.OrganizationService#getUserOrganizations()
   */
  @Override
  public List<Organization> getUserOrganizations() {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.OrganizationApiUrls.GET_ORGANIZATIONS_URL);
        String                apiUrl  = builder.buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<List<Organization>>(){}, json.get("organizations"));
  }
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.