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.JobService#getJob(java.lang.String)
   */
  @Override
  public Job getJob(String id) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.JobApiUrls.GET_JOB_URL);
        String                apiUrl  = builder.withField(ParameterNames.ID, id).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
        return unmarshall(new TypeToken<Job>(){}, json);       
  }
View Full Code Here


  /* (non-Javadoc)
   * @see com.github.api.v2.services.JobService#searchFullTimeJobs(java.lang.String)
   */
  @Override
  public List<Job> searchFullTimeJobs(String query) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.JobApiUrls.SEARCH_JOBS_URL);
        String                apiUrl  = builder.withParameter(ParameterNames.SEARCH, query).withParameter(ParameterNames.FULL_TIME, "true").buildUrl();
        JsonElement json = unmarshallList(callApiGet(apiUrl));
        return unmarshall(new TypeToken<List<Job>>(){}, json)
    }
View Full Code Here

  /* (non-Javadoc)
   * @see com.github.api.v2.services.JobService#searchFullTimeJobs(java.lang.String, java.lang.String)
   */
  @Override
  public List<Job> searchFullTimeJobs(String query, String location) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.JobApiUrls.SEARCH_JOBS_URL);
        String                apiUrl  = builder.withParameter(ParameterNames.FULL_TIME, "true").withParameter(ParameterNames.SEARCH, query).withParameter(ParameterNames.LOCATION, location).buildUrl();
        JsonElement json = unmarshallList(callApiGet(apiUrl));
        return unmarshall(new TypeToken<List<Job>>(){}, json)
  }
View Full Code Here

  /* (non-Javadoc)
   * @see com.github.api.v2.services.JobService#searchFullTimeJobs(java.lang.String, com.github.api.v2.schema.GeoLocation)
   */
  @Override
  public List<Job> searchFullTimeJobs(String query, GeoLocation location) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.JobApiUrls.SEARCH_JOBS_URL);
        String                apiUrl  = builder.withParameter(ParameterNames.FULL_TIME, "true").withParameter(ParameterNames.SEARCH, query).withParameter(ParameterNames.LATITUDE, String.valueOf(location.getLatitude())).withParameter(ParameterNames.LONGITUDE, String.valueOf(location.getLongitude())).buildUrl();
        JsonElement json = unmarshallList(callApiGet(apiUrl));
        return unmarshall(new TypeToken<List<Job>>(){}, json)
  }
View Full Code Here

  /* (non-Javadoc)
   * @see com.github.api.v2.services.JobService#searchJobs(java.lang.String)
   */
  @Override
  public List<Job> searchJobs(String query) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.JobApiUrls.SEARCH_JOBS_URL);
        String                apiUrl  = builder.withParameter(ParameterNames.SEARCH, query).buildUrl();
        JsonElement json = unmarshallList(callApiGet(apiUrl));
        return unmarshall(new TypeToken<List<Job>>(){}, json)
  }
View Full Code Here

  /* (non-Javadoc)
   * @see com.github.api.v2.services.JobService#searchJobs(java.lang.String, java.lang.String)
   */
  @Override
  public List<Job> searchJobs(String query, String location) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.JobApiUrls.SEARCH_JOBS_URL);
        String                apiUrl  = builder.withParameter(ParameterNames.SEARCH, query).withParameter(ParameterNames.LOCATION, location).buildUrl();
        JsonElement json = unmarshallList(callApiGet(apiUrl));
        return unmarshall(new TypeToken<List<Job>>(){}, json)
  }
View Full Code Here

  /* (non-Javadoc)
   * @see com.github.api.v2.services.JobService#searchJobs(java.lang.String, com.github.api.v2.schema.GeoLocation)
   */
  @Override
  public List<Job> searchJobs(String query, GeoLocation location) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.JobApiUrls.SEARCH_JOBS_URL);
        String                apiUrl  = builder.withParameter(ParameterNames.SEARCH, query).withParameter(ParameterNames.LATITUDE, String.valueOf(location.getLatitude())).withParameter(ParameterNames.LONGITUDE, String.valueOf(location.getLongitude())).buildUrl();
        JsonElement json = unmarshallList(callApiGet(apiUrl));
        return unmarshall(new TypeToken<List<Job>>(){}, json)
  }
View Full Code Here

  /* (non-Javadoc)
   * @see com.github.api.v2.services.UserService#addEmail(java.lang.String)
   */
  @Override
  public void addEmail(String email) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.UserApiUrls.ADD_EMAIL_URL);
        String                apiUrl  = builder.buildUrl();
        Map<String, String> parameters = new HashMap<String, String>();
        parameters.put(ParameterNames.EMAIL, email);
    callApiPost(apiUrl, parameters);
  }
View Full Code Here

  /* (non-Javadoc)
   * @see com.github.api.v2.services.UserService#addKey(java.lang.String, java.lang.String)
   */
  @Override
  public void addKey(String title, String key) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.UserApiUrls.ADD_KEY_URL);
        String                apiUrl  = builder.buildUrl();
        Map<String, String> parameters = new HashMap<String, String>();
        parameters.put(ParameterNames.TITLE, title);
        parameters.put(ParameterNames.KEY, key);
    callApiPost(apiUrl, parameters);
  }
View Full Code Here

  /* (non-Javadoc)
   * @see com.github.api.v2.services.UserService#followUser(java.lang.String)
   */
  @Override
  public void followUser(String userName) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.UserApiUrls.FOLLOW_USER_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).buildUrl();
    callApiPost(apiUrl, new HashMap<String, String>());
  }
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.