- 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 classRequestConfig.BuilderBuilder class forRequestConfiginstances.static classRequestConfig.SamplesEnum representing all possible values for thewith_samplesquery parameter.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RequestConfig.Builderbuilder()RequestConfig.SamplesgetWithSamples()The value that will be sent to indicate whether the API should return data samples with the response body.booleanisRetryIfRateLimited()The value that will be sent to indicate whether the request will be retried later if rate limited.booleanisToWebhook()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_samplesquery parameter.- Returns:
- value for the
with_samplesquery 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_webhookquery 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_webhookquery 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_webhookquery parameter
-
-