Examples of withField()


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

   * @see com.github.api.v2.services.GistService#updateGistComment(java.lang.String, java.lang.String)
   */
  @Override
  public Comment updateGistComment(String commentId, String commentText) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.GistApiUrls.UPDATE_GIST_COMMENT_URL);
    String apiUrl = builder.withField(ParameterNames.COMMENT_ID, commentId).buildUrl();
    Comment comment = new Comment();
    comment.setBody(commentText);
        JsonObject json = unmarshall(callApiMethod(apiUrl, marshall(comment), ApplicationConstants.CONTENT_TYPE_JSON, HttpMethod.POST, 200));
        return unmarshall(new TypeToken<Comment>(){}, json);
  }
View Full Code Here

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

   */
  @Override
  public Blob getBlob(String userName, String repositoryName, String treeSha,
      String filePath) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.ObjectApiUrls.GET_BLOB_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).withField(ParameterNames.REPOSITORY_NAME, repositoryName).withField(ParameterNames.SHA, treeSha).withField(ParameterNames.FILE_PATH, filePath).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<Blob>(){}, json.get("blob"));
  }

View Full Code Here

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

   */
  @Override
  public List<Blob> getBlobs(String userName, String repositoryName,
      String treeSha) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.ObjectApiUrls.GET_BLOBS_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).withField(ParameterNames.REPOSITORY_NAME, repositoryName).withField(ParameterNames.SHA, treeSha).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<List<Blob>>(){}, json.get("blobs"));
  }

View Full Code Here

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

   */
  @Override
  public InputStream getObjectContent(String userName, String repositoryName,
      String objectSha) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.ObjectApiUrls.GET_OBJECT_CONTENT_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).withField(ParameterNames.REPOSITORY_NAME, repositoryName).withField(ParameterNames.SHA, objectSha).buildUrl();
        return callApiGet(apiUrl);
  }

  /* (non-Javadoc)
   * @see com.github.api.v2.services.ObjectService#getTree(java.lang.String, java.lang.String, java.lang.String)
View Full Code Here

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

   */
  @Override
  public List<Tree> getTree(String userName, String repositoryName,
      String treeSha) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.ObjectApiUrls.GET_TREE_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).withField(ParameterNames.REPOSITORY_NAME, repositoryName).withField(ParameterNames.SHA, treeSha).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<List<Tree>>(){}, json.get("tree"));
  }
}
View Full Code Here

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

   * @see com.github.api.v2.services.FeedService#getCommitFeed(java.lang.String, java.lang.String, java.lang.String, int)
   */
  @Override
  public Feed getCommitFeed(String userName, String repositoryName, String branchName, int count) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.FeedUrls.GET_COMMIT_FEED_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).withField(ParameterNames.REPOSITORY_NAME, repositoryName).withField(ParameterNames.BRANCH, branchName).withParameter(ParameterNames.NUM, String.valueOf(count)).buildUrl();
        return unmarshall(apiUrl);
  }

  /* (non-Javadoc)
   * @see com.github.api.v2.services.FeedService#getNetworkFeed(java.lang.String, java.lang.String, int)
View Full Code Here

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

   * @see com.github.api.v2.services.FeedService#getNetworkFeed(java.lang.String, java.lang.String, int)
   */
  @Override
  public Feed getNetworkFeed(String userName, String repositoryName, int count) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.FeedUrls.GET_NETWORK_FEED_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).withField(ParameterNames.REPOSITORY_NAME, repositoryName).withParameter(ParameterNames.NUM, String.valueOf(count)).buildUrl();
        return unmarshall(apiUrl);
  }

  /* (non-Javadoc)
   * @see com.github.api.v2.services.FeedService#getPrivateUserFeed(java.lang.String, int)
View Full Code Here

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

   * @see com.github.api.v2.services.FeedService#getPrivateUserFeed(java.lang.String, int)
   */
  @Override
  public Feed getPrivateUserFeed(String userName, int count) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.FeedUrls.GET_PRIVATE_USER_FEED_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).withParameter(ParameterNames.NUM, String.valueOf(count)).buildUrl();
        return unmarshall(apiUrl);
  }

  /* (non-Javadoc)
   * @see com.github.api.v2.services.FeedService#getPublicTimelineFeed(int)
View Full Code Here

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

   * @see com.github.api.v2.services.FeedService#getPublicUserFeed(java.lang.String, int)
   */
  @Override
  public Feed getPublicUserFeed(String userName, int count) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.FeedUrls.GET_PUBLIC_USER_FEED_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).withParameter(ParameterNames.NUM, String.valueOf(count)).buildUrl();
        return unmarshall(apiUrl);
  }

  /* (non-Javadoc)
   * @see com.github.api.v2.services.FeedService#getWikiFeed(java.lang.String, java.lang.String, int)
View Full Code Here

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

   * @see com.github.api.v2.services.FeedService#getWikiFeed(java.lang.String, java.lang.String, int)
   */
  @Override
  public Feed getWikiFeed(String userName, String repositoryName, int count) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.FeedUrls.GET_WIKI_FEED_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).withField(ParameterNames.REPOSITORY_NAME, repositoryName).withParameter(ParameterNames.NUM, String.valueOf(count)).buildUrl();
        return unmarshall(apiUrl);
  }
 
  /* (non-Javadoc)
   * @see com.github.api.v2.services.FeedService#getBlogFeed(int)
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.