- java.lang.Object
-
- co.tryterra.terraclient.RequestConfig
-
public class RequestConfig extends Object
Class representing request configuration parameters used when making calls to the Terra API.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RequestConfig.Builder
Builder class forRequestConfig
instances.static class
RequestConfig.Samples
Enum representing all possible values for thewith_samples
query parameter.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RequestConfig.Builder
builder()
RequestConfig.Samples
getWithSamples()
The value that will be sent to indicate whether the API should return data samples with the response body.boolean
isRetryIfRateLimited()
The value that will be sent to indicate whether the request will be retried later if rate limited.boolean
isToWebhook()
The value that will be sent to indicate whether the API should send the data directly to the developer's webhook URL.
-
-
-
Method Detail
-
builder
public static RequestConfig.Builder builder()
-
getWithSamples
public RequestConfig.Samples getWithSamples()
The value that will be sent to indicate whether the API should return data samples with the response body. This will be used in thewith_samples
query parameter.- Returns:
- value for the
with_samples
query parameter
-
isToWebhook
public boolean isToWebhook()
The value that will be sent to indicate whether the API should send the data directly to the developer's webhook URL. This will be used in theto_webhook
query parameter.
Note that if this is set, the future returned by API request methods will never contain any parsed data objects.- Returns:
- value for the
to_webhook
query parameter
-
isRetryIfRateLimited
public boolean isRetryIfRateLimited()
The value that will be sent to indicate whether the request will be retried later if rate limited.- Returns:
- value for the
to_webhook
query parameter
-
-