コード例 #1
0
  static <T> IteratorBuilder<T> iterate(
      final String apiKey,
      final URI uri,
      final Status responseStatus,
      final TypeReference<List<T>> pageType) {

    return new IteratorBuilder<>(
        apiKey, HttpMethodBuilder.httpGet(), uri, responseStatus, pageType);
  }
コード例 #2
0
  /**
   * Creates a {@link Builder} for executing a {@code GET} request.
   *
   * @param apiKey the authorization token for accessing the EVRYTHNG API
   * @param uri the {@link URI} holding the absolute URL
   * @param responseStatus the expected {@link HttpResponse} status
   * @param returnType the native type to which the {@link HttpResponse} will be mapped to
   * @return an EVRYTHNG API-ready {@link Builder}
   */
  public static <T> Builder<T> get(
      final String apiKey,
      final URI uri,
      final Status responseStatus,
      final TypeReference<T> returnType) {

    return new CheckedBuilder<>(
        apiKey, HttpMethodBuilder.httpGet(), uri, responseStatus, returnType);
  }