コード例 #1
0
  public ResultSet authedSearch(SearchQuery searchQuery) throws N0ticeException {
    OAuthRequest request = createOauthRequest(Verb.GET, searchUrlBuilder.toUrl(searchQuery));
    oauthSignRequest(request);

    Response response = request.send();

    final String responseBody = response.getBody();
    if (response.getCode() == 200) {
      return searchParser.parseSearchResults(responseBody);
    }

    handleExceptions(response);
    throw new N0ticeException(response.getBody());
  }
コード例 #2
0
 public ResultSet search(SearchQuery searchQuery) throws N0ticeException {
   return searchParser.parseSearchResults(
       httpFetcher.fetchContent(searchUrlBuilder.toUrl(searchQuery), UTF_8));
 }