Examples of withParameter()


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

   * @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)
  }

  /* (non-Javadoc)
 
View Full Code Here

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

   * @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)
  }

  /* (non-Javadoc)
 
View Full Code Here

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

   * @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

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

     * @see com.google.code.facebook.graph.client.oauth.FacebookOAuthService#getAuthorizationUrl(java.lang.String)
     */
    @Override
  public String getAuthorizationUrl(String callBackUrl) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.OAuthUrls.AUTHORIZE_URL);
    builder.withParameter(ParameterNames.CLIENT_ID, clientId).withParameter(ParameterNames.REDIRECT_URI, callBackUrl);
    return builder.buildUrl();
  }
   
  /* (non-Javadoc)
   * @see com.google.code.facebook.graph.client.oauth.FacebookOAuthService#getAuthorizationUrl(java.lang.String, java.util.Set)
View Full Code Here

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

   */
  @Override
  public String getAuthorizationUrl(String callBackUrl,
      Set<Scope> permissions) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.OAuthUrls.AUTHORIZE_URL);
    builder.withParameter(ParameterNames.CLIENT_ID, clientId).withParameter(ParameterNames.REDIRECT_URI, callBackUrl);
    builder.withParameterEnumSet(ParameterNames.SCOPE, permissions, ",");
    return builder.buildUrl();
  }

    /* (non-Javadoc)
 
View Full Code Here

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

     */
    @Override
  public String getAccessToken(String callBackUrl, String code) {
      try {
        GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.OAuthUrls.ACCESS_TOKEN_URL);
        builder.withParameter(ParameterNames.CLIENT_ID, clientId);
        builder.withParameter(ParameterNames.CLIENT_SECRET, secret);
        builder.withParameter(ParameterNames.REDIRECT_URI, callBackUrl);
        builder.withParameter(ParameterNames.CODE, code);
       
      String response = convertStreamToString(callApiGet(builder.buildUrl()));
View Full Code Here

Examples of com.google.code.stackexchange.client.provider.url.ApiUrlBuilder.withParameter()

   * @see com.google.code.stackexchange.client.StackOverflowApiClient#searchQuestions(java.lang.String)
   */
  @Override
  public PagedList<Question> searchQuestions(String query) {
    ApiUrlBuilder builder = createStackOverflowApiUrlBuilder(StackExchangeApiMethods.SEARCH_QUESTIONS);
        String                apiUrl  = builder.withParameter("intitle", query).buildUrl();

        return unmarshallList(Question.class, callApiMethod(apiUrl));
       
       
  }
View Full Code Here

Examples of com.google.code.stackexchange.client.provider.url.ApiUrlBuilder.withParameter()

   */
  @Override
  public PagedList<Question> searchQuestions(String query, QuestionSortOrder sort,
      Paging paging) {
    ApiUrlBuilder builder = createStackOverflowApiUrlBuilder(StackExchangeApiMethods.SEARCH_QUESTIONS);
        String                apiUrl  = builder.withParameter("intitle", query).withSort(sort).withPaging(paging).buildUrl();

        return unmarshallList(Question.class, callApiMethod(apiUrl));
       
       
  }
View Full Code Here

Examples of com.google.code.stackexchange.client.provider.url.ApiUrlBuilder.withParameter()

   */
  @Override
  public PagedList<Question> searchQuestions(String query, QuestionSortOrder sort,
      Range range) {
    ApiUrlBuilder builder = createStackOverflowApiUrlBuilder(StackExchangeApiMethods.SEARCH_QUESTIONS);
        String                apiUrl  = builder.withParameter("intitle", query).withSort(sort).withRange(range).buildUrl();

        return unmarshallList(Question.class, callApiMethod(apiUrl));
       
       
  }
View Full Code Here

Examples of com.google.code.stackexchange.client.provider.url.ApiUrlBuilder.withParameter()

  @Override
  public PagedList<Question> searchQuestions(String query,
      List<String> includeTags, List<String> excludeTags,
      QuestionSortOrder sort, Paging paging) {
    ApiUrlBuilder builder = createStackOverflowApiUrlBuilder(StackExchangeApiMethods.SEARCH_QUESTIONS);
        String                apiUrl  = builder.withParameter("intitle", query).withParameters("tagged", includeTags, ";").withParameters("nottagged", excludeTags, ";").withSort(sort).withPaging(paging).buildUrl();

        return unmarshallList(Question.class, callApiMethod(apiUrl));
  }
}
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.