Examples of withField()


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

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

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

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

   */
  @Override
  public List<NetworkCommit> getNetworkData(String userName, String repositoryName,
      String networkHash) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.NetworkApiUrls.GET_NETWORK_DATA_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).withField(ParameterNames.REPOSITORY_NAME, repositoryName).withParameter(ParameterNames.NET_HASH, networkHash).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<List<NetworkCommit>>(){}, json.get("commits"));
  }

View Full Code Here

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

   */
  @Override
  public List<NetworkCommit> getNetworkData(String userName, String repositoryName,
      String networkHash, int startIndex, int endIndex) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.NetworkApiUrls.GET_NETWORK_DATA_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).withField(ParameterNames.REPOSITORY_NAME, repositoryName).withParameter(ParameterNames.NET_HASH, networkHash).withParameter(ParameterNames.START_INDEX, String.valueOf(startIndex)).withParameter(ParameterNames.END_INDEX, String.valueOf(endIndex)).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<List<NetworkCommit>>(){}, json.get("commits"));
  }

View Full Code Here

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

   * @see com.github.api.v2.services.NetworkService#getNetworkMeta(java.lang.String, java.lang.String)
   */
  @Override
  public NetworkMeta getNetworkMeta(String userName, String repositoryName) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.NetworkApiUrls.GET_NETWORK_META_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).withField(ParameterNames.REPOSITORY_NAME, repositoryName).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
    Gson gson = getGsonBuilder().setDateFormat("yyyy-MM-dd").create();
    return gson.fromJson(json, NetworkMeta.class);
  }
View Full Code Here

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

   * @see com.github.api.v2.services.CommitService#getCommit(java.lang.String, java.lang.String, java.lang.String)
   */
  @Override
  public Commit getCommit(String userName, String repositoryName, String sha) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.CommitApiUrls.GET_COMMIT_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).withField(ParameterNames.REPOSITORY_NAME, repositoryName).withField(ParameterNames.SHA, sha).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<Commit>(){}, json.get("commit"));
  }

View Full Code Here

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

   */
  @Override
  public List<Commit> getCommits(String userName, String repositoryName,
      String branch, int pageNumber) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.CommitApiUrls.GET_COMMITS_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).withField(ParameterNames.REPOSITORY_NAME, repositoryName).withField(ParameterNames.BRANCH, branch).withParameter(ParameterNames.PAGE, String.valueOf(pageNumber)).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<List<Commit>>(){}, json.get("commits"));
  }

View Full Code Here

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

   */
  @Override
  public List<Commit> getCommits(String userName, String repositoryName,
      String branch, String filePath) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.CommitApiUrls.GET_COMMITS_FILE_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).withField(ParameterNames.REPOSITORY_NAME, repositoryName).withField(ParameterNames.BRANCH, branch).withField(ParameterNames.FILE_PATH, filePath).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<List<Commit>>(){}, json.get("commits"));
  }
 
View Full Code Here

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

   * @see com.github.api.v2.services.UserService#searchUsersByName(java.lang.String)
   */
  @Override
  public List<User> searchUsersByName(String name) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.UserApiUrls.SEARCH_USERS_BY_NAME_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, name).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
    Gson gson = getGsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss").create();
    return gson.fromJson(json.get("users"), new TypeToken<List<User>>(){}.getType());
  }
View Full Code Here

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

   * @see com.github.api.v2.services.UserService#unfollowUser(java.lang.String)
   */
  @Override
  public void unfollowUser(String userName) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.UserApiUrls.UNFOLLOW_USER_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).buildUrl();
    callApiPost(apiUrl, new HashMap<String, String>());
  }
 
  /* (non-Javadoc)
   * @see com.github.api.v2.services.UserService#getUserOrganizations(java.lang.String)
View Full Code Here

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

   * @see com.github.api.v2.services.UserService#getUserOrganizations(java.lang.String)
   */
  @Override
  public List<Organization> getUserOrganizations(String userName) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.UserApiUrls.GET_USER_ORGANIZATIONS);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).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.