- java.lang.Object
-
- co.tryterra.terraclient.TerraClientFactory
-
public class TerraClientFactory extends Object
A factory for creating a Terra client instance, which will be used for all requests to the Terra REST API.
-
-
Constructor Summary
Constructors Constructor Description TerraClientFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TerraClientV2
getClientV2(String xApiKey, String devId)
Creates a newTerraClientV2
instance using the authentication information provided, as well as the default request config.static TerraClientV2
getClientV2(String xApiKey, String devId, RequestConfig requestConfig)
Creates a newTerraClientV2
instance using the authentication information provided, as well as the given request config.static TerraClientV2
getClientV2(String xApiKey, String devId, String apiUrl)
Creates a newTerraClientV2
instance using the authentication information provided, as well as the default request config.static TerraClientV2
getClientV2(String xApiKey, String devId, String apiUrl, RequestConfig requestConfig)
Creates a newTerraClientV2
instance using the authentication information provided, as well as the given request config.
-
-
-
Method Detail
-
getClientV2
public static TerraClientV2 getClientV2(String xApiKey, String devId)
Creates a newTerraClientV2
instance using the authentication information provided, as well as the default request config. Requests will be made to the default API base URL (https://api.tryterra.co/v2
).- Parameters:
xApiKey
- your Terra API keydevId
- your Terra developer ID- Returns:
- the created instance
-
getClientV2
public static TerraClientV2 getClientV2(String xApiKey, String devId, RequestConfig requestConfig)
Creates a newTerraClientV2
instance using the authentication information provided, as well as the given request config. Requests will be made to the default API base URL (https://api.tryterra.co/v2
).- Parameters:
xApiKey
- your Terra API keydevId
- your Terra developer IDrequestConfig
- the default per-request configuration to use- Returns:
- the created instance
-
getClientV2
public static TerraClientV2 getClientV2(String xApiKey, String devId, String apiUrl)
Creates a newTerraClientV2
instance using the authentication information provided, as well as the default request config. Requests will be made to the provided API base URL.- Parameters:
xApiKey
- your Terra API keydevId
- your Terra developer IDapiUrl
- the API base url to make requests to- Returns:
- the created instance
-
getClientV2
public static TerraClientV2 getClientV2(String xApiKey, String devId, String apiUrl, RequestConfig requestConfig)
Creates a newTerraClientV2
instance using the authentication information provided, as well as the given request config. Requests will be made to the provided API base URL.- Parameters:
xApiKey
- your Terra API keydevId
- your Terra developer IDapiUrl
- the API base url to make requests torequestConfig
- the default per-request configuration to use- Returns:
- the created instance
-
-