Examples of withField()


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

   */
  @Override
  public void updateUser(User user) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.UserApiUrls.UPDATE_USER_URL);
    String userName = (user.getUsername() == null) ? user.getLogin() : user.getUsername();
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).buildUrl();
        Map<String, String> parameters = new HashMap<String, String>();
        parameters.put("values[" + ParameterNames.NAME + "]", user.getName());
        parameters.put("values[" + ParameterNames.EMAIL + "]", user.getEmail());
        parameters.put("values[" + ParameterNames.BLOG + "]", user.getBlog());
        parameters.put("values[" + ParameterNames.COMPANY + "]", user.getCompany());
View Full Code Here

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

   * @see com.github.api.v2.services.RepositoryService#addCollaborator(java.lang.String, java.lang.String)
   */
  @Override
  public void addCollaborator(String userName, String repositoryName, String collaboratorName) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.RepositoryApiUrls.ADD_COLLABORATOR_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).withField(ParameterNames.REPOSITORY_NAME, repositoryName).withField(ParameterNames.COLLABORATOR_NAME, collaboratorName).buildUrl();
        unmarshall(callApiPost(apiUrl, new HashMap<String, String>()));
  }

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

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

   * @see com.github.api.v2.services.RepositoryService#addDeployKey(java.lang.String, java.lang.String, java.lang.String)
   */
  @Override
  public List<Key> addDeployKey(String repositoryName, String title, String key) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.RepositoryApiUrls.ADD_DEPLOY_KEY_URL);
        String                apiUrl  = builder.withField(ParameterNames.REPOSITORY_NAME, repositoryName).buildUrl();
        Map<String, String> parameters = new HashMap<String, String>();
        parameters.put(ParameterNames.TITLE, title);
        parameters.put(ParameterNames.KEY, key);
        JsonObject json = unmarshall(callApiPost(apiUrl, parameters));
       
View Full Code Here

Examples of org.joda.time.DateMidnight.withField()

        if (beginningOfSemester.isAfterNow() || endOfSemester.isBeforeNow()) {
            return null;
        }

        final DateMidnight now = new DateMidnight();
        return now.withField(DateTimeFieldType.dayOfWeek(), 1);
    }

    public Interval getCurrentWeek() {
        final DateMidnight thisMonday = getThisMonday();
        return thisMonday == null ? null : new Interval(thisMonday, thisMonday.plusWeeks(1));
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.