Class AppStoreApi


  • public class AppStoreApi
    extends Object
    AppStoreApi has methods for interacting with all endpoints in the API set
    • Constructor Detail

      • AppStoreApi

        public AppStoreApi()
        AppStoreApi
      • AppStoreApi

        public AppStoreApi​(ApiClient apiClient)
        AppStoreApi
        Parameters:
        apiClient - ApiClient pass into the new instance of this class
    • Method Detail

      • getInstance

        public static AppStoreApi getInstance​(ApiClient apiClient)
        AppStoreApi getInstance
        Parameters:
        apiClient - ApiClient pass into the new instance of this class
        Returns:
        instance of this class
      • getApiClient

        public ApiClient getApiClient()
        get ApiClient
        Returns:
        apiClient the current ApiClient
      • setApiClient

        public void setApiClient​(ApiClient apiClient)
        set ApiClient
        Parameters:
        apiClient - ApiClient pass into the new instance of this class
      • setUserAgent

        public void setUserAgent​(String userAgent)
        set user agent
        Parameters:
        userAgent - string to override the user agent
      • getUserAgent

        public String getUserAgent()
        get user agent
        Returns:
        String of user agent
      • getSubscription

        public Subscription getSubscription​(String accessToken,
                                            UUID subscriptionId)
                                     throws IOException
        Retrieves a subscription for a given subscriptionId

        200 - Success - return response of unique Subscription object

        404 - When a failure occurs in the endpoint

        Parameters:
        subscriptionId - Unique identifier for Subscription object
        accessToken - Authorization token for user set in header of each request
        Returns:
        Subscription
        Throws:
        IOException - if an error occurs while attempting to invoke the API *
      • getSubscriptionForHttpResponse

        public com.google.api.client.http.HttpResponse getSubscriptionForHttpResponse​(String accessToken,
                                                                                      UUID subscriptionId)
                                                                               throws IOException
        Retrieves a subscription for a given subscriptionId

        200 - Success - return response of unique Subscription object

        404 - When a failure occurs in the endpoint

        Parameters:
        subscriptionId - Unique identifier for Subscription object
        accessToken - Authorization token for user set in header of each request
        Returns:
        HttpResponse
        Throws:
        IOException - if an error occurs while attempting to invoke the API
      • convertInputToByteArray

        public ByteArrayInputStream convertInputToByteArray​(InputStream is)
                                                     throws IOException
        convert intput to byte array
        Parameters:
        is - InputStream the server status code returned
        Returns:
        byteArrayInputStream a ByteArrayInputStream
        Throws:
        IOException - for failed or interrupted I/O operations