Class 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 Detail

      • TerraClientFactory

        public TerraClientFactory()
    • Method Detail

      • getClientV2

        public static TerraClientV2 getClientV2​(String xApiKey,
                                                String devId)
        Creates a new TerraClientV2 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 key
        devId - your Terra developer ID
        Returns:
        the created instance
      • getClientV2

        public static TerraClientV2 getClientV2​(String xApiKey,
                                                String devId,
                                                RequestConfig requestConfig)
        Creates a new TerraClientV2 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 key
        devId - your Terra developer ID
        requestConfig - the default per-request configuration to use
        Returns:
        the created instance
      • getClientV2

        public static TerraClientV2 getClientV2​(String xApiKey,
                                                String devId,
                                                String apiUrl)
        Creates a new TerraClientV2 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 key
        devId - your Terra developer ID
        apiUrl - 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 new TerraClientV2 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 key
        devId - your Terra developer ID
        apiUrl - the API base url to make requests to
        requestConfig - the default per-request configuration to use
        Returns:
        the created instance