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

Examples of com.github.api.v2.services.constant.GitHubApiUrls.GitHubApiUrlBuilder


  /* (non-Javadoc)
   * @see com.github.api.v2.services.RepositoryService#getCollaborators(java.lang.String, java.lang.String)
   */
  @Override
  public List<String> getCollaborators(String userName, String repositoryName) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.RepositoryApiUrls.GET_COLLABORATORS_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).withField(ParameterNames.REPOSITORY_NAME, repositoryName).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<List<String>>(){}, json.get("collaborators"));
  }
View Full Code Here


  /* (non-Javadoc)
   * @see com.github.api.v2.services.RepositoryService#getContributors(java.lang.String, java.lang.String)
   */
  @Override
  public List<User> getContributors(String userName, String repositoryName) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.RepositoryApiUrls.GET_CONTRIBUTORS_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).withField(ParameterNames.REPOSITORY_NAME, repositoryName).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<List<User>>(){}, json.get("contributors"));
  }
View Full Code Here

  /* (non-Javadoc)
   * @see com.github.api.v2.services.RepositoryService#getForks(java.lang.String, java.lang.String)
   */
  @Override
  public List<Repository> getForks(String userName, String repositoryName) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.RepositoryApiUrls.GET_FORKS_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).withField(ParameterNames.REPOSITORY_NAME, repositoryName).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<List<Repository>>(){}, json.get("network"));
  }
View Full Code Here

  /* (non-Javadoc)
   * @see com.github.api.v2.services.RepositoryService#getDeployKeys(java.lang.String)
   */
  @Override
  public List<Key> getDeployKeys(String repositoryName) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.RepositoryApiUrls.GET_DEPLOY_KEYS_URL);
        String                apiUrl  = builder.withField(ParameterNames.REPOSITORY_NAME, repositoryName).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<List<Key>>(){}, json.get("public_keys"));
  }
View Full Code Here

   * @see com.github.api.v2.services.RepositoryService#getLanguageBreakdown(java.lang.String, java.lang.String)
   */
  @Override
  public Map<Language, Long> getLanguageBreakdown(String userName,
      String repositoryName) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.RepositoryApiUrls.GET_LANGUAGE_BREAKDOWN_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).withField(ParameterNames.REPOSITORY_NAME, repositoryName).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<Map<Language, Long>>(){}, json.get("languages"));
  }
View Full Code Here

  /* (non-Javadoc)
   * @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

  /* (non-Javadoc)
   * @see com.github.api.v2.services.RepositoryService#getRepositories(java.lang.String)
   */
  @Override
  public List<Repository> getRepositories(String userName) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.RepositoryApiUrls.GET_REPOSITORIES_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<List<Repository>>(){}, json.get("repositories"));
  }
View Full Code Here

  /* (non-Javadoc)
   * @see com.github.api.v2.services.RepositoryService#getRepository(java.lang.String, java.lang.String)
   */
  @Override
  public Repository getRepository(String userName, String repositoryName) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.RepositoryApiUrls.GET_REPOSITORY_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).withField(ParameterNames.REPOSITORY_NAME, repositoryName).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<Repository>(){}, json.get("repository"));
  }
View Full Code Here

  /* (non-Javadoc)
   * @see com.github.api.v2.services.RepositoryService#getTags(java.lang.String, java.lang.String)
   */
  @Override
  public Map<String, String> getTags(String userName, String repositoryName) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.RepositoryApiUrls.GET_TAGS_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).withField(ParameterNames.REPOSITORY_NAME, repositoryName).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<Map<String, String>>(){}, json.get("tags"));
  }
View Full Code Here

  /* (non-Javadoc)
   * @see com.github.api.v2.services.RepositoryService#getWatchers(java.lang.String, java.lang.String)
   */
  @Override
  public List<String> getWatchers(String userName, String repositoryName) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.RepositoryApiUrls.GET_WATCHERS_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).withField(ParameterNames.REPOSITORY_NAME, repositoryName).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<List<String>>(){}, json.get("watchers"));
  }
View Full Code Here

TOP

Related Classes of com.github.api.v2.services.constant.GitHubApiUrls.GitHubApiUrlBuilder

Copyright © 2018 www.massapicom. 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.