public class ApiClientFactory extends Object
| Constructor and Description |
|---|
ApiClientFactory() |
| Modifier and Type | Method and Description |
|---|---|
ApiClientFactory |
apiKey(String apiKey)
Sets the apiKey in header for each call to endpoint.
|
<T> T |
build(Class<T> apiClass)
Instantiates a client for the given API.
|
ApiClientFactory |
credentialsProvider(AWSCredentialsProvider provider)
Sets the credentials provider, needed if APIs require authentication.
|
ApiClientFactory |
endpoint(String endpoint)
Sets the endpoint of the APIs.
|
ApiClientFactory |
region(String region)
Sets the region of the endpoint.
|
public ApiClientFactory endpoint(String endpoint)
endpoint - endpoint urlpublic ApiClientFactory apiKey(String apiKey)
apiKey - to send in headerpublic ApiClientFactory region(String region)
region - a region stringpublic ApiClientFactory credentialsProvider(AWSCredentialsProvider provider)
provider - an AWS credentials providerpublic <T> T build(Class<T> apiClass)
apiClass - API class defined in API Gateway.Copyright © 2015. All rights reserved.