Class AnalyticsApi


  • public class AnalyticsApi
    extends Object
    • Constructor Detail

      • AnalyticsApi

        public AnalyticsApi​(ApiClient apiClient)
      • AnalyticsApi

        public AnalyticsApi()
        Constructor for AnalyticsApi production environment where API key is not required.
      • AnalyticsApi

        public AnalyticsApi​(String basePath)
        Constructor for AnalyticsApi with custom API base path where API key is not required.
        Parameters:
        basePath - the api base path. Expected Environment.PRODUCTION.basePath (default) or Environment.SANDBOX.basePath.
      • AnalyticsApi

        public AnalyticsApi​(Environment environment)
        Constructor for AnalyticsApi with custom API base path where API key is not required.
        Parameters:
        environment - the target environment. Expected Environment.PRODUCTION (default) or Environment.SANDBOX.
      • AnalyticsApi

        public AnalyticsApi​(String apiKey,
                            String basePath)
        Constructor for AnalyticsApi with custom API base path
        Parameters:
        apiKey - the api key to use to authenticate to the API
        basePath - the api base path. Expected Environment.PRODUCTION.basePath (default) or Environment.SANDBOX.basePath.
      • AnalyticsApi

        public AnalyticsApi​(String apiKey,
                            Environment environment)
        Constructor for AnalyticsApi with custom API base path
        Parameters:
        apiKey - the api key to use to authenticate to the API
        environment - the target environment. Expected Environment.PRODUCTION (default) or Environment.SANDBOX.
    • Method Detail

      • getApiClient

        public ApiClient getApiClient()
      • setApiClient

        public void setApiClient​(ApiClient apiClient)
      • getLiveStreamsPlays

        public AnalyticsApi.APIgetLiveStreamsPlaysRequest getLiveStreamsPlays​(LocalDate from,
                                                                              String dimension)
        Get play events for live stream Retrieve filtered analytics about the number of plays for your live streams in a project.
        Parameters:
        from - Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (required)
        dimension - Use this query parameter to define the dimension that you want analytics for. - `liveStreamId`: Returns analytics based on the public live stream identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. - `browser`: Returns analytics based on the browser used by the viewers during the play event. (required)
        Returns:
        APIgetLiveStreamsPlaysRequest
        Http Response Details:
        Status Code Description Response Headers
        200 Success -
        400 Bad request error -
        403 Forbidden - Disabled Analytics -
        404 Not Found -
      • getVideosPlays

        public AnalyticsApi.APIgetVideosPlaysRequest getVideosPlays​(LocalDate from,
                                                                    String dimension)
        Get play events for video Retrieve filtered analytics about the number of plays for your videos in a project.
        Parameters:
        from - Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (required)
        dimension - Use this query parameter to define the dimension that you want analytics for. - `videoId`: Returns analytics based on the public video identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. - `browser`: Returns analytics based on the browser used by the viewers during the play event. (required)
        Returns:
        APIgetVideosPlaysRequest
        Http Response Details:
        Status Code Description Response Headers
        200 Success -
        400 Bad request error -
        403 Forbidden - Disabled Analytics -
        404 Not Found -