From b8aae4cc2d9d584b4538b5b32458348b903cb79c Mon Sep 17 00:00:00 2001 From: Phil Cluff <578330+GeneticGenesis@users.noreply.github.com> Date: Fri, 8 Jan 2021 11:07:14 +0000 Subject: [PATCH 1/3] Support Incidents, RealTime and Dimensions --- api_dimensions.go | 195 ++++++++ api_incidents.go | 295 ++++++++++++ api_real_time.go | 453 ++++++++++++++++++ client.go | 6 + docs/DimensionValue.md | 11 + docs/DimensionsApi.md | 74 +++ docs/FiltersApi.md | 4 +- docs/GetRealTimeBreakdownResponse.md | 12 + .../GetRealTimeHistogramTimeseriesResponse.md | 13 + ...RealTimeHistogramTimeseriesResponseMeta.md | 10 + docs/GetRealTimeTimeseriesResponse.md | 12 + docs/Incident.md | 30 ++ docs/IncidentBreakdown.md | 12 + docs/IncidentNotification.md | 12 + docs/IncidentNotificationRule.md | 14 + docs/IncidentResponse.md | 11 + docs/IncidentsApi.md | 119 +++++ docs/ListDimensionValuesResponse.md | 12 + docs/ListDimensionsResponse.md | 12 + docs/ListIncidentsResponse.md | 12 + docs/ListRealTimeDimensionsResponse.md | 12 + docs/ListRealTimeDimensionsResponseData.md | 11 + docs/ListRealTimeMetricsResponse.md | 12 + docs/ListRelatedIncidentsResponse.md | 12 + docs/NotificationRule.md | 12 + docs/RealTimeApi.md | 176 +++++++ docs/RealTimeBreakdownValue.md | 14 + docs/RealTimeHistogramTimeseriesBucket.md | 11 + ...RealTimeHistogramTimeseriesBucketValues.md | 11 + docs/RealTimeHistogramTimeseriesDatapoint.md | 16 + docs/RealTimeTimeseriesDatapoint.md | 12 + model_dimension_value.go | 9 + model_get_real_time_breakdown_response.go | 10 + ...real_time_histogram_timeseries_response.go | 11 + ...time_histogram_timeseries_response_meta.go | 8 + model_get_real_time_timeseries_response.go | 10 + model_incident.go | 28 ++ model_incident_breakdown.go | 10 + model_incident_notification.go | 10 + model_incident_notification_rule.go | 12 + model_incident_response.go | 9 + model_list_dimension_values_response.go | 10 + model_list_dimensions_response.go | 10 + model_list_incidents_response.go | 10 + model_list_real_time_dimensions_response.go | 10 + ...list_real_time_dimensions_response_data.go | 9 + model_list_real_time_metrics_response.go | 10 + model_list_related_incidents_response.go | 10 + model_notification_rule.go | 10 + model_real_time_breakdown_value.go | 12 + ...l_real_time_histogram_timeseries_bucket.go | 9 + ...time_histogram_timeseries_bucket_values.go | 9 + ...eal_time_histogram_timeseries_datapoint.go | 14 + model_real_time_timeseries_datapoint.go | 10 + 54 files changed, 1866 insertions(+), 2 deletions(-) create mode 100644 api_dimensions.go create mode 100644 api_incidents.go create mode 100644 api_real_time.go create mode 100644 docs/DimensionValue.md create mode 100644 docs/DimensionsApi.md create mode 100644 docs/GetRealTimeBreakdownResponse.md create mode 100644 docs/GetRealTimeHistogramTimeseriesResponse.md create mode 100644 docs/GetRealTimeHistogramTimeseriesResponseMeta.md create mode 100644 docs/GetRealTimeTimeseriesResponse.md create mode 100644 docs/Incident.md create mode 100644 docs/IncidentBreakdown.md create mode 100644 docs/IncidentNotification.md create mode 100644 docs/IncidentNotificationRule.md create mode 100644 docs/IncidentResponse.md create mode 100644 docs/IncidentsApi.md create mode 100644 docs/ListDimensionValuesResponse.md create mode 100644 docs/ListDimensionsResponse.md create mode 100644 docs/ListIncidentsResponse.md create mode 100644 docs/ListRealTimeDimensionsResponse.md create mode 100644 docs/ListRealTimeDimensionsResponseData.md create mode 100644 docs/ListRealTimeMetricsResponse.md create mode 100644 docs/ListRelatedIncidentsResponse.md create mode 100644 docs/NotificationRule.md create mode 100644 docs/RealTimeApi.md create mode 100644 docs/RealTimeBreakdownValue.md create mode 100644 docs/RealTimeHistogramTimeseriesBucket.md create mode 100644 docs/RealTimeHistogramTimeseriesBucketValues.md create mode 100644 docs/RealTimeHistogramTimeseriesDatapoint.md create mode 100644 docs/RealTimeTimeseriesDatapoint.md create mode 100644 model_dimension_value.go create mode 100644 model_get_real_time_breakdown_response.go create mode 100644 model_get_real_time_histogram_timeseries_response.go create mode 100644 model_get_real_time_histogram_timeseries_response_meta.go create mode 100644 model_get_real_time_timeseries_response.go create mode 100644 model_incident.go create mode 100644 model_incident_breakdown.go create mode 100644 model_incident_notification.go create mode 100644 model_incident_notification_rule.go create mode 100644 model_incident_response.go create mode 100644 model_list_dimension_values_response.go create mode 100644 model_list_dimensions_response.go create mode 100644 model_list_incidents_response.go create mode 100644 model_list_real_time_dimensions_response.go create mode 100644 model_list_real_time_dimensions_response_data.go create mode 100644 model_list_real_time_metrics_response.go create mode 100644 model_list_related_incidents_response.go create mode 100644 model_notification_rule.go create mode 100644 model_real_time_breakdown_value.go create mode 100644 model_real_time_histogram_timeseries_bucket.go create mode 100644 model_real_time_histogram_timeseries_bucket_values.go create mode 100644 model_real_time_histogram_timeseries_datapoint.go create mode 100644 model_real_time_timeseries_datapoint.go diff --git a/api_dimensions.go b/api_dimensions.go new file mode 100644 index 0000000..537e02f --- /dev/null +++ b/api_dimensions.go @@ -0,0 +1,195 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +import ( + "fmt" + "io/ioutil" + "net/url" + "strings" +) + +type DimensionsApiService service + +type ListDimensionValuesParams struct { + Limit int32 + Page int32 + Filters []string + Timeframe []string +} + +// ListDimensionValues optionally accepts the APIOption of WithParams(*ListDimensionValuesParams). +func (a *DimensionsApiService) ListDimensionValues(dIMENSIONID string, opts ...APIOption) (ListDimensionValuesResponse, error) { + var ( + localVarAPIOptions = new(APIOptions) + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ListDimensionValuesResponse + ) + + for _, opt := range opts { + opt(localVarAPIOptions) + } + + localVarOptionals, ok := localVarAPIOptions.params.(*ListDimensionValuesParams) + if localVarAPIOptions.params != nil && !ok { + return localVarReturnValue, reportError("provided params were not of type *ListDimensionValuesParams") + } + + // create path and map variables + localVarPath := a.client.cfg.basePath + "/data/v1/dimensions/{DIMENSION_ID}" + localVarPath = strings.Replace(localVarPath, "{"+"DIMENSION_ID"+"}", fmt.Sprintf("%v", dIMENSIONID), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && isSet(localVarOptionals.Limit) { + localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit, "")) + } + if localVarOptionals != nil && isSet(localVarOptionals.Page) { + localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page, "")) + } + if localVarOptionals != nil && isSet(localVarOptionals.Filters) { + // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. + // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. + for _, v := range localVarOptionals.Filters { + localVarQueryParams.Add("filters[]", v) + } + } + if localVarOptionals != nil && isSet(localVarOptionals.Timeframe) { + // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. + // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. + for _, v := range localVarOptionals.Timeframe { + localVarQueryParams.Add("timeframe[]", v) + } + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + + r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, err + } + + // Check for common HTTP error status codes + err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) + if err != nil { + return localVarReturnValue, err + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +func (a *DimensionsApiService) ListDimensions(opts ...APIOption) (ListDimensionsResponse, error) { + var ( + localVarAPIOptions = new(APIOptions) + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ListDimensionsResponse + ) + + for _, opt := range opts { + opt(localVarAPIOptions) + } + + // create path and map variables + localVarPath := a.client.cfg.basePath + "/data/v1/dimensions" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + + r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, err + } + + // Check for common HTTP error status codes + err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) + if err != nil { + return localVarReturnValue, err + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} diff --git a/api_incidents.go b/api_incidents.go new file mode 100644 index 0000000..0edea7f --- /dev/null +++ b/api_incidents.go @@ -0,0 +1,295 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +import ( + "fmt" + "io/ioutil" + "net/url" + "strings" +) + +type IncidentsApiService service + +func (a *IncidentsApiService) GetIncident(iNCIDENTID string, opts ...APIOption) (IncidentResponse, error) { + var ( + localVarAPIOptions = new(APIOptions) + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue IncidentResponse + ) + + for _, opt := range opts { + opt(localVarAPIOptions) + } + + // create path and map variables + localVarPath := a.client.cfg.basePath + "/data/v1/incidents/{INCIDENT_ID}" + localVarPath = strings.Replace(localVarPath, "{"+"INCIDENT_ID"+"}", fmt.Sprintf("%v", iNCIDENTID), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + + r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, err + } + + // Check for common HTTP error status codes + err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) + if err != nil { + return localVarReturnValue, err + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ListIncidentsParams struct { + Limit int32 + Page int32 + OrderBy string + OrderDirection string + Status string + Severity string +} + +// ListIncidents optionally accepts the APIOption of WithParams(*ListIncidentsParams). +func (a *IncidentsApiService) ListIncidents(opts ...APIOption) (ListIncidentsResponse, error) { + var ( + localVarAPIOptions = new(APIOptions) + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ListIncidentsResponse + ) + + for _, opt := range opts { + opt(localVarAPIOptions) + } + + localVarOptionals, ok := localVarAPIOptions.params.(*ListIncidentsParams) + if localVarAPIOptions.params != nil && !ok { + return localVarReturnValue, reportError("provided params were not of type *ListIncidentsParams") + } + + // create path and map variables + localVarPath := a.client.cfg.basePath + "/data/v1/incidents" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && isSet(localVarOptionals.Limit) { + localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit, "")) + } + if localVarOptionals != nil && isSet(localVarOptionals.Page) { + localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page, "")) + } + if localVarOptionals != nil && isSet(localVarOptionals.OrderBy) { + localVarQueryParams.Add("order_by", parameterToString(localVarOptionals.OrderBy, "")) + } + if localVarOptionals != nil && isSet(localVarOptionals.OrderDirection) { + localVarQueryParams.Add("order_direction", parameterToString(localVarOptionals.OrderDirection, "")) + } + if localVarOptionals != nil && isSet(localVarOptionals.Status) { + localVarQueryParams.Add("status", parameterToString(localVarOptionals.Status, "")) + } + if localVarOptionals != nil && isSet(localVarOptionals.Severity) { + localVarQueryParams.Add("severity", parameterToString(localVarOptionals.Severity, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + + r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, err + } + + // Check for common HTTP error status codes + err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) + if err != nil { + return localVarReturnValue, err + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ListRelatedIncidentsParams struct { + Limit int32 + Page int32 + OrderBy string + OrderDirection string +} + +// ListRelatedIncidents optionally accepts the APIOption of WithParams(*ListRelatedIncidentsParams). +func (a *IncidentsApiService) ListRelatedIncidents(iNCIDENTID string, opts ...APIOption) (ListRelatedIncidentsResponse, error) { + var ( + localVarAPIOptions = new(APIOptions) + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ListRelatedIncidentsResponse + ) + + for _, opt := range opts { + opt(localVarAPIOptions) + } + + localVarOptionals, ok := localVarAPIOptions.params.(*ListRelatedIncidentsParams) + if localVarAPIOptions.params != nil && !ok { + return localVarReturnValue, reportError("provided params were not of type *ListRelatedIncidentsParams") + } + + // create path and map variables + localVarPath := a.client.cfg.basePath + "/data/v1/incidents/{INCIDENT_ID}/related" + localVarPath = strings.Replace(localVarPath, "{"+"INCIDENT_ID"+"}", fmt.Sprintf("%v", iNCIDENTID), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && isSet(localVarOptionals.Limit) { + localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit, "")) + } + if localVarOptionals != nil && isSet(localVarOptionals.Page) { + localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page, "")) + } + if localVarOptionals != nil && isSet(localVarOptionals.OrderBy) { + localVarQueryParams.Add("order_by", parameterToString(localVarOptionals.OrderBy, "")) + } + if localVarOptionals != nil && isSet(localVarOptionals.OrderDirection) { + localVarQueryParams.Add("order_direction", parameterToString(localVarOptionals.OrderDirection, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + + r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, err + } + + // Check for common HTTP error status codes + err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) + if err != nil { + return localVarReturnValue, err + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} diff --git a/api_real_time.go b/api_real_time.go new file mode 100644 index 0000000..908916d --- /dev/null +++ b/api_real_time.go @@ -0,0 +1,453 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +import ( + "fmt" + "io/ioutil" + "net/url" + "strings" +) + +type RealTimeApiService service + +type GetRealtimeBreakdownParams struct { + Dimension string + Timestamp float64 + Filters []string + OrderBy string + OrderDirection string +} + +// GetRealtimeBreakdown optionally accepts the APIOption of WithParams(*GetRealtimeBreakdownParams). +func (a *RealTimeApiService) GetRealtimeBreakdown(rEALTIMEMETRICID string, opts ...APIOption) (GetRealTimeBreakdownResponse, error) { + var ( + localVarAPIOptions = new(APIOptions) + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue GetRealTimeBreakdownResponse + ) + + for _, opt := range opts { + opt(localVarAPIOptions) + } + + localVarOptionals, ok := localVarAPIOptions.params.(*GetRealtimeBreakdownParams) + if localVarAPIOptions.params != nil && !ok { + return localVarReturnValue, reportError("provided params were not of type *GetRealtimeBreakdownParams") + } + + // create path and map variables + localVarPath := a.client.cfg.basePath + "/data/v1/realtime/metrics/{REALTIME_METRIC_ID}/breakdown" + localVarPath = strings.Replace(localVarPath, "{"+"REALTIME_METRIC_ID"+"}", fmt.Sprintf("%v", rEALTIMEMETRICID), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && isSet(localVarOptionals.Dimension) { + localVarQueryParams.Add("dimension", parameterToString(localVarOptionals.Dimension, "")) + } + if localVarOptionals != nil && isSet(localVarOptionals.Timestamp) { + localVarQueryParams.Add("timestamp", parameterToString(localVarOptionals.Timestamp, "")) + } + if localVarOptionals != nil && isSet(localVarOptionals.Filters) { + // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. + // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. + for _, v := range localVarOptionals.Filters { + localVarQueryParams.Add("filters[]", v) + } + } + if localVarOptionals != nil && isSet(localVarOptionals.OrderBy) { + localVarQueryParams.Add("order_by", parameterToString(localVarOptionals.OrderBy, "")) + } + if localVarOptionals != nil && isSet(localVarOptionals.OrderDirection) { + localVarQueryParams.Add("order_direction", parameterToString(localVarOptionals.OrderDirection, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + + r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, err + } + + // Check for common HTTP error status codes + err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) + if err != nil { + return localVarReturnValue, err + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type GetRealtimeHistogramTimeseriesParams struct { + Filters []string +} + +// GetRealtimeHistogramTimeseries optionally accepts the APIOption of WithParams(*GetRealtimeHistogramTimeseriesParams). +func (a *RealTimeApiService) GetRealtimeHistogramTimeseries(rEALTIMEMETRICID string, opts ...APIOption) (GetRealTimeHistogramTimeseriesResponse, error) { + var ( + localVarAPIOptions = new(APIOptions) + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue GetRealTimeHistogramTimeseriesResponse + ) + + for _, opt := range opts { + opt(localVarAPIOptions) + } + + localVarOptionals, ok := localVarAPIOptions.params.(*GetRealtimeHistogramTimeseriesParams) + if localVarAPIOptions.params != nil && !ok { + return localVarReturnValue, reportError("provided params were not of type *GetRealtimeHistogramTimeseriesParams") + } + + // create path and map variables + localVarPath := a.client.cfg.basePath + "/data/v1/realtime/metrics/{REALTIME_METRIC_ID}/histogram-timeseries" + localVarPath = strings.Replace(localVarPath, "{"+"REALTIME_METRIC_ID"+"}", fmt.Sprintf("%v", rEALTIMEMETRICID), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && isSet(localVarOptionals.Filters) { + // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. + // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. + for _, v := range localVarOptionals.Filters { + localVarQueryParams.Add("filters[]", v) + } + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + + r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, err + } + + // Check for common HTTP error status codes + err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) + if err != nil { + return localVarReturnValue, err + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type GetRealtimeTimeseriesParams struct { + Filters []string +} + +// GetRealtimeTimeseries optionally accepts the APIOption of WithParams(*GetRealtimeTimeseriesParams). +func (a *RealTimeApiService) GetRealtimeTimeseries(rEALTIMEMETRICID string, opts ...APIOption) (GetRealTimeTimeseriesResponse, error) { + var ( + localVarAPIOptions = new(APIOptions) + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue GetRealTimeTimeseriesResponse + ) + + for _, opt := range opts { + opt(localVarAPIOptions) + } + + localVarOptionals, ok := localVarAPIOptions.params.(*GetRealtimeTimeseriesParams) + if localVarAPIOptions.params != nil && !ok { + return localVarReturnValue, reportError("provided params were not of type *GetRealtimeTimeseriesParams") + } + + // create path and map variables + localVarPath := a.client.cfg.basePath + "/data/v1/realtime/metrics/{REALTIME_METRIC_ID}/timeseries" + localVarPath = strings.Replace(localVarPath, "{"+"REALTIME_METRIC_ID"+"}", fmt.Sprintf("%v", rEALTIMEMETRICID), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && isSet(localVarOptionals.Filters) { + // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. + // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. + for _, v := range localVarOptionals.Filters { + localVarQueryParams.Add("filters[]", v) + } + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + + r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, err + } + + // Check for common HTTP error status codes + err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) + if err != nil { + return localVarReturnValue, err + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +func (a *RealTimeApiService) ListRealtimeDimensions(opts ...APIOption) (ListRealTimeDimensionsResponse, error) { + var ( + localVarAPIOptions = new(APIOptions) + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ListRealTimeDimensionsResponse + ) + + for _, opt := range opts { + opt(localVarAPIOptions) + } + + // create path and map variables + localVarPath := a.client.cfg.basePath + "/data/v1/realtime/dimensions" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + + r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, err + } + + // Check for common HTTP error status codes + err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) + if err != nil { + return localVarReturnValue, err + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +func (a *RealTimeApiService) ListRealtimeMetrics(opts ...APIOption) (ListRealTimeMetricsResponse, error) { + var ( + localVarAPIOptions = new(APIOptions) + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ListRealTimeMetricsResponse + ) + + for _, opt := range opts { + opt(localVarAPIOptions) + } + + // create path and map variables + localVarPath := a.client.cfg.basePath + "/data/v1/realtime/metrics" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + + r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, err + } + + // Check for common HTTP error status codes + err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) + if err != nil { + return localVarReturnValue, err + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} diff --git a/client.go b/client.go index 3134c5d..68d0543 100644 --- a/client.go +++ b/client.go @@ -39,12 +39,15 @@ type APIClient struct { // API Services AssetsApi *AssetsApiService DeliveryUsageApi *DeliveryUsageApiService + DimensionsApi *DimensionsApiService DirectUploadsApi *DirectUploadsApiService ErrorsApi *ErrorsApiService ExportsApi *ExportsApiService FiltersApi *FiltersApiService + IncidentsApi *IncidentsApiService LiveStreamsApi *LiveStreamsApiService MetricsApi *MetricsApiService + RealTimeApi *RealTimeApiService URLSigningKeysApi *URLSigningKeysApiService VideoViewsApi *VideoViewsApiService } @@ -65,12 +68,15 @@ func NewAPIClient(cfg *Configuration) *APIClient { // API Services c.AssetsApi = (*AssetsApiService)(&c.common) c.DeliveryUsageApi = (*DeliveryUsageApiService)(&c.common) + c.DimensionsApi = (*DimensionsApiService)(&c.common) c.DirectUploadsApi = (*DirectUploadsApiService)(&c.common) c.ErrorsApi = (*ErrorsApiService)(&c.common) c.ExportsApi = (*ExportsApiService)(&c.common) c.FiltersApi = (*FiltersApiService)(&c.common) + c.IncidentsApi = (*IncidentsApiService)(&c.common) c.LiveStreamsApi = (*LiveStreamsApiService)(&c.common) c.MetricsApi = (*MetricsApiService)(&c.common) + c.RealTimeApi = (*RealTimeApiService)(&c.common) c.URLSigningKeysApi = (*URLSigningKeysApiService)(&c.common) c.VideoViewsApi = (*VideoViewsApiService)(&c.common) diff --git a/docs/DimensionValue.md b/docs/DimensionValue.md new file mode 100644 index 0000000..a31d6ca --- /dev/null +++ b/docs/DimensionValue.md @@ -0,0 +1,11 @@ +# DimensionValue + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | [optional] +**TotalCount** | **int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DimensionsApi.md b/docs/DimensionsApi.md new file mode 100644 index 0000000..76e2e1e --- /dev/null +++ b/docs/DimensionsApi.md @@ -0,0 +1,74 @@ +# \DimensionsApi + +All URIs are relative to *https://api.mux.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListDimensionValues**](DimensionsApi.md#ListDimensionValues) | **Get** /data/v1/dimensions/{DIMENSION_ID} | Lists the values for a specific dimension +[**ListDimensions**](DimensionsApi.md#ListDimensions) | **Get** /data/v1/dimensions | List Dimensions + + +# **ListDimensionValues** +> ListDimensionValuesResponse ListDimensionValues(ctx, dIMENSIONID, optional) +Lists the values for a specific dimension + +Lists the values for a dimension along with a total count of related views. Note: This API replaces the list-filter-values API call. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **dIMENSIONID** | **string**| ID of the Dimension | + **optional** | ***ListDimensionValuesOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a ListDimensionValuesOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **limit** | **optional.Int32**| Number of items to include in the response | [default to 25] + **page** | **optional.Int32**| Offset by this many pages, of the size of `limit` | [default to 1] + **filters** | [**optional.Interface of []string**](string.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | + **timeframe** | [**optional.Interface of []string**](string.md)| Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. | + +### Return type + +[**ListDimensionValuesResponse**](ListDimensionValuesResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ListDimensions** +> ListDimensionsResponse ListDimensions(ctx, ) +List Dimensions + +List all available dimensions. Note: This API replaces the list-filters API call. + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**ListDimensionsResponse**](ListDimensionsResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/FiltersApi.md b/docs/FiltersApi.md index 4d590d9..dbafe70 100644 --- a/docs/FiltersApi.md +++ b/docs/FiltersApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description > ListFilterValuesResponse ListFilterValues(ctx, fILTERID, optional) Lists values for a specific filter -Lists the values for a filter along with a total count of related views +Deprecated: The API has been replaced by the list-dimension-values API call. Lists the values for a filter along with a total count of related views. ### Required Parameters @@ -52,7 +52,7 @@ Name | Type | Description | Notes > ListFiltersResponse ListFilters(ctx, ) List Filters -Lists all the filters broken out into basic and advanced +Deprecated: The API has been replaced by the list-dimensions API call. Lists all the filters broken out into basic and advanced. ### Required Parameters This endpoint does not need any parameter. diff --git a/docs/GetRealTimeBreakdownResponse.md b/docs/GetRealTimeBreakdownResponse.md new file mode 100644 index 0000000..b6fdc16 --- /dev/null +++ b/docs/GetRealTimeBreakdownResponse.md @@ -0,0 +1,12 @@ +# GetRealTimeBreakdownResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]RealTimeBreakdownValue**](RealTimeBreakdownValue.md) | | [optional] +**TotalRowCount** | **int64** | | [optional] +**Timeframe** | **[]int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetRealTimeHistogramTimeseriesResponse.md b/docs/GetRealTimeHistogramTimeseriesResponse.md new file mode 100644 index 0000000..680c501 --- /dev/null +++ b/docs/GetRealTimeHistogramTimeseriesResponse.md @@ -0,0 +1,13 @@ +# GetRealTimeHistogramTimeseriesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**GetRealTimeHistogramTimeseriesResponseMeta**](GetRealTimeHistogramTimeseriesResponse_meta.md) | | [optional] +**Data** | [**[]RealTimeHistogramTimeseriesDatapoint**](RealTimeHistogramTimeseriesDatapoint.md) | | [optional] +**TotalRowCount** | **int64** | | [optional] +**Timeframe** | **[]int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetRealTimeHistogramTimeseriesResponseMeta.md b/docs/GetRealTimeHistogramTimeseriesResponseMeta.md new file mode 100644 index 0000000..7a51c22 --- /dev/null +++ b/docs/GetRealTimeHistogramTimeseriesResponseMeta.md @@ -0,0 +1,10 @@ +# GetRealTimeHistogramTimeseriesResponseMeta + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Buckets** | [**[]RealTimeHistogramTimeseriesBucket**](RealTimeHistogramTimeseriesBucket.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetRealTimeTimeseriesResponse.md b/docs/GetRealTimeTimeseriesResponse.md new file mode 100644 index 0000000..0510fa8 --- /dev/null +++ b/docs/GetRealTimeTimeseriesResponse.md @@ -0,0 +1,12 @@ +# GetRealTimeTimeseriesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]RealTimeTimeseriesDatapoint**](RealTimeTimeseriesDatapoint.md) | | [optional] +**TotalRowCount** | **int64** | | [optional] +**Timeframe** | **[]int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Incident.md b/docs/Incident.md new file mode 100644 index 0000000..41d5416 --- /dev/null +++ b/docs/Incident.md @@ -0,0 +1,30 @@ +# Incident + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Threshold** | **float64** | | [optional] +**Status** | **string** | | [optional] +**StartedAt** | **string** | | [optional] +**Severity** | **string** | | [optional] +**SampleSizeUnit** | **string** | | [optional] +**SampleSize** | **int64** | | [optional] +**ResolvedAt** | **string** | | [optional] +**Notifications** | [**[]IncidentNotification**](IncidentNotification.md) | | [optional] +**NotificationRules** | [**[]IncidentNotificationRule**](IncidentNotificationRule.md) | | [optional] +**Measurement** | **string** | | [optional] +**MeasuredValueOnClose** | **float64** | | [optional] +**MeasuredValue** | **float64** | | [optional] +**IncidentKey** | **string** | | [optional] +**Impact** | **string** | | [optional] +**Id** | **string** | | [optional] +**ErrorDescription** | **string** | | [optional] +**Description** | **string** | | [optional] +**Breakdowns** | [**[]IncidentBreakdown**](IncidentBreakdown.md) | | [optional] +**AffectedViewsPerHourOnOpen** | **int64** | | [optional] +**AffectedViewsPerHour** | **int64** | | [optional] +**AffectedViews** | **int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IncidentBreakdown.md b/docs/IncidentBreakdown.md new file mode 100644 index 0000000..08ad0da --- /dev/null +++ b/docs/IncidentBreakdown.md @@ -0,0 +1,12 @@ +# IncidentBreakdown + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | [optional] +**Name** | **string** | | [optional] +**Id** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IncidentNotification.md b/docs/IncidentNotification.md new file mode 100644 index 0000000..b8fa797 --- /dev/null +++ b/docs/IncidentNotification.md @@ -0,0 +1,12 @@ +# IncidentNotification + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**QueuedAt** | **string** | | [optional] +**Id** | **int64** | | [optional] +**AttemptedAt** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IncidentNotificationRule.md b/docs/IncidentNotificationRule.md new file mode 100644 index 0000000..8d14acb --- /dev/null +++ b/docs/IncidentNotificationRule.md @@ -0,0 +1,14 @@ +# IncidentNotificationRule + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | **string** | | [optional] +**Rules** | [**[]NotificationRule**](NotificationRule.md) | | [optional] +**PropertyId** | **string** | | [optional] +**Id** | **string** | | [optional] +**Action** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IncidentResponse.md b/docs/IncidentResponse.md new file mode 100644 index 0000000..1cb1748 --- /dev/null +++ b/docs/IncidentResponse.md @@ -0,0 +1,11 @@ +# IncidentResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**Incident**](.md) | | [optional] +**Timeframe** | **[]int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IncidentsApi.md b/docs/IncidentsApi.md new file mode 100644 index 0000000..e0b3557 --- /dev/null +++ b/docs/IncidentsApi.md @@ -0,0 +1,119 @@ +# \IncidentsApi + +All URIs are relative to *https://api.mux.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetIncident**](IncidentsApi.md#GetIncident) | **Get** /data/v1/incidents/{INCIDENT_ID} | Get an Incident +[**ListIncidents**](IncidentsApi.md#ListIncidents) | **Get** /data/v1/incidents | List Incidents +[**ListRelatedIncidents**](IncidentsApi.md#ListRelatedIncidents) | **Get** /data/v1/incidents/{INCIDENT_ID}/related | List Related Incidents + + +# **GetIncident** +> IncidentResponse GetIncident(ctx, iNCIDENTID) +Get an Incident + +Returns the details of an incident + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **iNCIDENTID** | **string**| ID of the Incident | + +### Return type + +[**IncidentResponse**](IncidentResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ListIncidents** +> ListIncidentsResponse ListIncidents(ctx, optional) +List Incidents + +Returns a list of incidents + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListIncidentsOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a ListIncidentsOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **optional.Int32**| Number of items to include in the response | [default to 25] + **page** | **optional.Int32**| Offset by this many pages, of the size of `limit` | [default to 1] + **orderBy** | **optional.String**| Value to order the results by | + **orderDirection** | **optional.String**| Sort order. | + **status** | **optional.String**| Status to filter incidents by | + **severity** | **optional.String**| Severity to filter incidents by | + +### Return type + +[**ListIncidentsResponse**](ListIncidentsResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ListRelatedIncidents** +> ListRelatedIncidentsResponse ListRelatedIncidents(ctx, iNCIDENTID, optional) +List Related Incidents + +Returns all the incidents that seem related to a specific incident + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **iNCIDENTID** | **string**| ID of the Incident | + **optional** | ***ListRelatedIncidentsOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a ListRelatedIncidentsOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **limit** | **optional.Int32**| Number of items to include in the response | [default to 25] + **page** | **optional.Int32**| Offset by this many pages, of the size of `limit` | [default to 1] + **orderBy** | **optional.String**| Value to order the results by | + **orderDirection** | **optional.String**| Sort order. | + +### Return type + +[**ListRelatedIncidentsResponse**](ListRelatedIncidentsResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ListDimensionValuesResponse.md b/docs/ListDimensionValuesResponse.md new file mode 100644 index 0000000..55d1021 --- /dev/null +++ b/docs/ListDimensionValuesResponse.md @@ -0,0 +1,12 @@ +# ListDimensionValuesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]DimensionValue**](DimensionValue.md) | | [optional] +**TotalRowCount** | **int64** | | [optional] +**Timeframe** | **[]int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListDimensionsResponse.md b/docs/ListDimensionsResponse.md new file mode 100644 index 0000000..0aa9fe1 --- /dev/null +++ b/docs/ListDimensionsResponse.md @@ -0,0 +1,12 @@ +# ListDimensionsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**ListFiltersResponseData**](ListFiltersResponse_data.md) | | [optional] +**TotalRowCount** | **int64** | | [optional] +**Timeframe** | **[]int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListIncidentsResponse.md b/docs/ListIncidentsResponse.md new file mode 100644 index 0000000..acfaf31 --- /dev/null +++ b/docs/ListIncidentsResponse.md @@ -0,0 +1,12 @@ +# ListIncidentsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]Incident**](Incident.md) | | [optional] +**TotalRowCount** | **int64** | | [optional] +**Timeframe** | **[]int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListRealTimeDimensionsResponse.md b/docs/ListRealTimeDimensionsResponse.md new file mode 100644 index 0000000..fed007c --- /dev/null +++ b/docs/ListRealTimeDimensionsResponse.md @@ -0,0 +1,12 @@ +# ListRealTimeDimensionsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]ListRealTimeDimensionsResponseData**](ListRealTimeDimensionsResponse_data.md) | | [optional] +**TotalRowCount** | **int64** | | [optional] +**Timeframe** | **[]int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListRealTimeDimensionsResponseData.md b/docs/ListRealTimeDimensionsResponseData.md new file mode 100644 index 0000000..ebae1b3 --- /dev/null +++ b/docs/ListRealTimeDimensionsResponseData.md @@ -0,0 +1,11 @@ +# ListRealTimeDimensionsResponseData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | [optional] +**DisplayName** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListRealTimeMetricsResponse.md b/docs/ListRealTimeMetricsResponse.md new file mode 100644 index 0000000..532de6c --- /dev/null +++ b/docs/ListRealTimeMetricsResponse.md @@ -0,0 +1,12 @@ +# ListRealTimeMetricsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]ListRealTimeDimensionsResponseData**](ListRealTimeDimensionsResponse_data.md) | | [optional] +**TotalRowCount** | **int64** | | [optional] +**Timeframe** | **[]int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListRelatedIncidentsResponse.md b/docs/ListRelatedIncidentsResponse.md new file mode 100644 index 0000000..c60872e --- /dev/null +++ b/docs/ListRelatedIncidentsResponse.md @@ -0,0 +1,12 @@ +# ListRelatedIncidentsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]Incident**](Incident.md) | | [optional] +**TotalRowCount** | **int64** | | [optional] +**Timeframe** | **[]int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NotificationRule.md b/docs/NotificationRule.md new file mode 100644 index 0000000..5f2ca8b --- /dev/null +++ b/docs/NotificationRule.md @@ -0,0 +1,12 @@ +# NotificationRule + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | [optional] +**Name** | **string** | | [optional] +**Id** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RealTimeApi.md b/docs/RealTimeApi.md new file mode 100644 index 0000000..6219d88 --- /dev/null +++ b/docs/RealTimeApi.md @@ -0,0 +1,176 @@ +# \RealTimeApi + +All URIs are relative to *https://api.mux.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetRealtimeBreakdown**](RealTimeApi.md#GetRealtimeBreakdown) | **Get** /data/v1/realtime/metrics/{REALTIME_METRIC_ID}/breakdown | Get Real-Time Breakdown +[**GetRealtimeHistogramTimeseries**](RealTimeApi.md#GetRealtimeHistogramTimeseries) | **Get** /data/v1/realtime/metrics/{REALTIME_METRIC_ID}/histogram-timeseries | Get Real-Time Histogram Timeseries +[**GetRealtimeTimeseries**](RealTimeApi.md#GetRealtimeTimeseries) | **Get** /data/v1/realtime/metrics/{REALTIME_METRIC_ID}/timeseries | Get Real-Time Timeseries +[**ListRealtimeDimensions**](RealTimeApi.md#ListRealtimeDimensions) | **Get** /data/v1/realtime/dimensions | List Real-Time Dimensions +[**ListRealtimeMetrics**](RealTimeApi.md#ListRealtimeMetrics) | **Get** /data/v1/realtime/metrics | List Real-Time Metrics + + +# **GetRealtimeBreakdown** +> GetRealTimeBreakdownResponse GetRealtimeBreakdown(ctx, rEALTIMEMETRICID, optional) +Get Real-Time Breakdown + +Gets breakdown information for a specific dimension and metric along with the number of concurrent viewers and negative impact score. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **rEALTIMEMETRICID** | **string**| ID of the Realtime Metric | + **optional** | ***GetRealtimeBreakdownOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a GetRealtimeBreakdownOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **dimension** | **optional.String**| Dimension the specified value belongs to | + **timestamp** | **optional.Float64**| Timestamp to limit results by. This value must be provided as a unix timestamp. Defaults to the current unix timestamp. | + **filters** | [**optional.Interface of []string**](string.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | + **orderBy** | **optional.String**| Value to order the results by | + **orderDirection** | **optional.String**| Sort order. | + +### Return type + +[**GetRealTimeBreakdownResponse**](GetRealTimeBreakdownResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetRealtimeHistogramTimeseries** +> GetRealTimeHistogramTimeseriesResponse GetRealtimeHistogramTimeseries(ctx, rEALTIMEMETRICID, optional) +Get Real-Time Histogram Timeseries + +Gets histogram timeseries information for a specific metric. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **rEALTIMEMETRICID** | **string**| ID of the Realtime Metric | + **optional** | ***GetRealtimeHistogramTimeseriesOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a GetRealtimeHistogramTimeseriesOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **filters** | [**optional.Interface of []string**](string.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | + +### Return type + +[**GetRealTimeHistogramTimeseriesResponse**](GetRealTimeHistogramTimeseriesResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetRealtimeTimeseries** +> GetRealTimeTimeseriesResponse GetRealtimeTimeseries(ctx, rEALTIMEMETRICID, optional) +Get Real-Time Timeseries + +Gets Time series information for a specific metric along with the number of concurrent viewers. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **rEALTIMEMETRICID** | **string**| ID of the Realtime Metric | + **optional** | ***GetRealtimeTimeseriesOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a GetRealtimeTimeseriesOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **filters** | [**optional.Interface of []string**](string.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | + +### Return type + +[**GetRealTimeTimeseriesResponse**](GetRealTimeTimeseriesResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ListRealtimeDimensions** +> ListRealTimeDimensionsResponse ListRealtimeDimensions(ctx, ) +List Real-Time Dimensions + +Lists availiable real-time dimensions + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**ListRealTimeDimensionsResponse**](ListRealTimeDimensionsResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ListRealtimeMetrics** +> ListRealTimeMetricsResponse ListRealtimeMetrics(ctx, ) +List Real-Time Metrics + +Lists availiable real-time metrics. + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**ListRealTimeMetricsResponse**](ListRealTimeMetricsResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/RealTimeBreakdownValue.md b/docs/RealTimeBreakdownValue.md new file mode 100644 index 0000000..7a0146c --- /dev/null +++ b/docs/RealTimeBreakdownValue.md @@ -0,0 +1,14 @@ +# RealTimeBreakdownValue + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | [optional] +**NegativeImpact** | **int64** | | [optional] +**MetricValue** | **float64** | | [optional] +**DisplayValue** | **string** | | [optional] +**ConcurentViewers** | **int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RealTimeHistogramTimeseriesBucket.md b/docs/RealTimeHistogramTimeseriesBucket.md new file mode 100644 index 0000000..82a3dae --- /dev/null +++ b/docs/RealTimeHistogramTimeseriesBucket.md @@ -0,0 +1,11 @@ +# RealTimeHistogramTimeseriesBucket + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Start** | **int64** | | [optional] +**End** | **int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RealTimeHistogramTimeseriesBucketValues.md b/docs/RealTimeHistogramTimeseriesBucketValues.md new file mode 100644 index 0000000..001fc43 --- /dev/null +++ b/docs/RealTimeHistogramTimeseriesBucketValues.md @@ -0,0 +1,11 @@ +# RealTimeHistogramTimeseriesBucketValues + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Percentage** | **float64** | | [optional] +**Count** | **int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RealTimeHistogramTimeseriesDatapoint.md b/docs/RealTimeHistogramTimeseriesDatapoint.md new file mode 100644 index 0000000..8ea4e02 --- /dev/null +++ b/docs/RealTimeHistogramTimeseriesDatapoint.md @@ -0,0 +1,16 @@ +# RealTimeHistogramTimeseriesDatapoint + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Timestamp** | **string** | | [optional] +**Sum** | **int64** | | [optional] +**P95** | **int64** | | [optional] +**Median** | **int64** | | [optional] +**MaxPercentage** | **float64** | | [optional] +**BucketValues** | [**[]RealTimeHistogramTimeseriesBucketValues**](RealTimeHistogramTimeseriesBucketValues.md) | | [optional] +**Average** | **float64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RealTimeTimeseriesDatapoint.md b/docs/RealTimeTimeseriesDatapoint.md new file mode 100644 index 0000000..ad000bd --- /dev/null +++ b/docs/RealTimeTimeseriesDatapoint.md @@ -0,0 +1,12 @@ +# RealTimeTimeseriesDatapoint + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **float64** | | [optional] +**Date** | **string** | | [optional] +**ConcurentViewers** | **int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/model_dimension_value.go b/model_dimension_value.go new file mode 100644 index 0000000..03559ba --- /dev/null +++ b/model_dimension_value.go @@ -0,0 +1,9 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type DimensionValue struct { + Value string `json:"value,omitempty"` + TotalCount int64 `json:"total_count,omitempty"` +} diff --git a/model_get_real_time_breakdown_response.go b/model_get_real_time_breakdown_response.go new file mode 100644 index 0000000..bfeefb9 --- /dev/null +++ b/model_get_real_time_breakdown_response.go @@ -0,0 +1,10 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type GetRealTimeBreakdownResponse struct { + Data []RealTimeBreakdownValue `json:"data,omitempty"` + TotalRowCount int64 `json:"total_row_count,omitempty"` + Timeframe []int64 `json:"timeframe,omitempty"` +} diff --git a/model_get_real_time_histogram_timeseries_response.go b/model_get_real_time_histogram_timeseries_response.go new file mode 100644 index 0000000..b6d4117 --- /dev/null +++ b/model_get_real_time_histogram_timeseries_response.go @@ -0,0 +1,11 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type GetRealTimeHistogramTimeseriesResponse struct { + Meta GetRealTimeHistogramTimeseriesResponseMeta `json:"meta,omitempty"` + Data []RealTimeHistogramTimeseriesDatapoint `json:"data,omitempty"` + TotalRowCount int64 `json:"total_row_count,omitempty"` + Timeframe []int64 `json:"timeframe,omitempty"` +} diff --git a/model_get_real_time_histogram_timeseries_response_meta.go b/model_get_real_time_histogram_timeseries_response_meta.go new file mode 100644 index 0000000..f12c3ec --- /dev/null +++ b/model_get_real_time_histogram_timeseries_response_meta.go @@ -0,0 +1,8 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type GetRealTimeHistogramTimeseriesResponseMeta struct { + Buckets []RealTimeHistogramTimeseriesBucket `json:"buckets,omitempty"` +} diff --git a/model_get_real_time_timeseries_response.go b/model_get_real_time_timeseries_response.go new file mode 100644 index 0000000..be4344e --- /dev/null +++ b/model_get_real_time_timeseries_response.go @@ -0,0 +1,10 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type GetRealTimeTimeseriesResponse struct { + Data []RealTimeTimeseriesDatapoint `json:"data,omitempty"` + TotalRowCount int64 `json:"total_row_count,omitempty"` + Timeframe []int64 `json:"timeframe,omitempty"` +} diff --git a/model_incident.go b/model_incident.go new file mode 100644 index 0000000..3d76c35 --- /dev/null +++ b/model_incident.go @@ -0,0 +1,28 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type Incident struct { + Threshold float64 `json:"threshold,omitempty"` + Status string `json:"status,omitempty"` + StartedAt string `json:"started_at,omitempty"` + Severity string `json:"severity,omitempty"` + SampleSizeUnit string `json:"sample_size_unit,omitempty"` + SampleSize int64 `json:"sample_size,omitempty"` + ResolvedAt string `json:"resolved_at,omitempty"` + Notifications []IncidentNotification `json:"notifications,omitempty"` + NotificationRules []IncidentNotificationRule `json:"notification_rules,omitempty"` + Measurement string `json:"measurement,omitempty"` + MeasuredValueOnClose float64 `json:"measured_value_on_close,omitempty"` + MeasuredValue float64 `json:"measured_value,omitempty"` + IncidentKey string `json:"incident_key,omitempty"` + Impact string `json:"impact,omitempty"` + Id string `json:"id,omitempty"` + ErrorDescription string `json:"error_description,omitempty"` + Description string `json:"description,omitempty"` + Breakdowns []IncidentBreakdown `json:"breakdowns,omitempty"` + AffectedViewsPerHourOnOpen int64 `json:"affected_views_per_hour_on_open,omitempty"` + AffectedViewsPerHour int64 `json:"affected_views_per_hour,omitempty"` + AffectedViews int64 `json:"affected_views,omitempty"` +} diff --git a/model_incident_breakdown.go b/model_incident_breakdown.go new file mode 100644 index 0000000..c30f65f --- /dev/null +++ b/model_incident_breakdown.go @@ -0,0 +1,10 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type IncidentBreakdown struct { + Value string `json:"value,omitempty"` + Name string `json:"name,omitempty"` + Id string `json:"id,omitempty"` +} diff --git a/model_incident_notification.go b/model_incident_notification.go new file mode 100644 index 0000000..ccdfe83 --- /dev/null +++ b/model_incident_notification.go @@ -0,0 +1,10 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type IncidentNotification struct { + QueuedAt string `json:"queued_at,omitempty"` + Id int64 `json:"id,omitempty"` + AttemptedAt string `json:"attempted_at,omitempty"` +} diff --git a/model_incident_notification_rule.go b/model_incident_notification_rule.go new file mode 100644 index 0000000..fdd9e38 --- /dev/null +++ b/model_incident_notification_rule.go @@ -0,0 +1,12 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type IncidentNotificationRule struct { + Status string `json:"status,omitempty"` + Rules []NotificationRule `json:"rules,omitempty"` + PropertyId string `json:"property_id,omitempty"` + Id string `json:"id,omitempty"` + Action string `json:"action,omitempty"` +} diff --git a/model_incident_response.go b/model_incident_response.go new file mode 100644 index 0000000..64c4670 --- /dev/null +++ b/model_incident_response.go @@ -0,0 +1,9 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type IncidentResponse struct { + Data Incident `json:"data,omitempty"` + Timeframe []int64 `json:"timeframe,omitempty"` +} diff --git a/model_list_dimension_values_response.go b/model_list_dimension_values_response.go new file mode 100644 index 0000000..5549ee5 --- /dev/null +++ b/model_list_dimension_values_response.go @@ -0,0 +1,10 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type ListDimensionValuesResponse struct { + Data []DimensionValue `json:"data,omitempty"` + TotalRowCount int64 `json:"total_row_count,omitempty"` + Timeframe []int64 `json:"timeframe,omitempty"` +} diff --git a/model_list_dimensions_response.go b/model_list_dimensions_response.go new file mode 100644 index 0000000..1bfc2e1 --- /dev/null +++ b/model_list_dimensions_response.go @@ -0,0 +1,10 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type ListDimensionsResponse struct { + Data ListFiltersResponseData `json:"data,omitempty"` + TotalRowCount int64 `json:"total_row_count,omitempty"` + Timeframe []int64 `json:"timeframe,omitempty"` +} diff --git a/model_list_incidents_response.go b/model_list_incidents_response.go new file mode 100644 index 0000000..f584447 --- /dev/null +++ b/model_list_incidents_response.go @@ -0,0 +1,10 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type ListIncidentsResponse struct { + Data []Incident `json:"data,omitempty"` + TotalRowCount int64 `json:"total_row_count,omitempty"` + Timeframe []int64 `json:"timeframe,omitempty"` +} diff --git a/model_list_real_time_dimensions_response.go b/model_list_real_time_dimensions_response.go new file mode 100644 index 0000000..5e811ee --- /dev/null +++ b/model_list_real_time_dimensions_response.go @@ -0,0 +1,10 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type ListRealTimeDimensionsResponse struct { + Data []ListRealTimeDimensionsResponseData `json:"data,omitempty"` + TotalRowCount int64 `json:"total_row_count,omitempty"` + Timeframe []int64 `json:"timeframe,omitempty"` +} diff --git a/model_list_real_time_dimensions_response_data.go b/model_list_real_time_dimensions_response_data.go new file mode 100644 index 0000000..5a951a8 --- /dev/null +++ b/model_list_real_time_dimensions_response_data.go @@ -0,0 +1,9 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type ListRealTimeDimensionsResponseData struct { + Name string `json:"name,omitempty"` + DisplayName string `json:"display_name,omitempty"` +} diff --git a/model_list_real_time_metrics_response.go b/model_list_real_time_metrics_response.go new file mode 100644 index 0000000..a534c83 --- /dev/null +++ b/model_list_real_time_metrics_response.go @@ -0,0 +1,10 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type ListRealTimeMetricsResponse struct { + Data []ListRealTimeDimensionsResponseData `json:"data,omitempty"` + TotalRowCount int64 `json:"total_row_count,omitempty"` + Timeframe []int64 `json:"timeframe,omitempty"` +} diff --git a/model_list_related_incidents_response.go b/model_list_related_incidents_response.go new file mode 100644 index 0000000..a5ce0c1 --- /dev/null +++ b/model_list_related_incidents_response.go @@ -0,0 +1,10 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type ListRelatedIncidentsResponse struct { + Data []Incident `json:"data,omitempty"` + TotalRowCount int64 `json:"total_row_count,omitempty"` + Timeframe []int64 `json:"timeframe,omitempty"` +} diff --git a/model_notification_rule.go b/model_notification_rule.go new file mode 100644 index 0000000..cd986d8 --- /dev/null +++ b/model_notification_rule.go @@ -0,0 +1,10 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type NotificationRule struct { + Value string `json:"value,omitempty"` + Name string `json:"name,omitempty"` + Id string `json:"id,omitempty"` +} diff --git a/model_real_time_breakdown_value.go b/model_real_time_breakdown_value.go new file mode 100644 index 0000000..51885cc --- /dev/null +++ b/model_real_time_breakdown_value.go @@ -0,0 +1,12 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type RealTimeBreakdownValue struct { + Value string `json:"value,omitempty"` + NegativeImpact int64 `json:"negative_impact,omitempty"` + MetricValue float64 `json:"metric_value,omitempty"` + DisplayValue string `json:"display_value,omitempty"` + ConcurentViewers int64 `json:"concurent_viewers,omitempty"` +} diff --git a/model_real_time_histogram_timeseries_bucket.go b/model_real_time_histogram_timeseries_bucket.go new file mode 100644 index 0000000..f3354c3 --- /dev/null +++ b/model_real_time_histogram_timeseries_bucket.go @@ -0,0 +1,9 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type RealTimeHistogramTimeseriesBucket struct { + Start int64 `json:"start,omitempty"` + End int64 `json:"end,omitempty"` +} diff --git a/model_real_time_histogram_timeseries_bucket_values.go b/model_real_time_histogram_timeseries_bucket_values.go new file mode 100644 index 0000000..735ee68 --- /dev/null +++ b/model_real_time_histogram_timeseries_bucket_values.go @@ -0,0 +1,9 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type RealTimeHistogramTimeseriesBucketValues struct { + Percentage float64 `json:"percentage,omitempty"` + Count int64 `json:"count,omitempty"` +} diff --git a/model_real_time_histogram_timeseries_datapoint.go b/model_real_time_histogram_timeseries_datapoint.go new file mode 100644 index 0000000..6741e64 --- /dev/null +++ b/model_real_time_histogram_timeseries_datapoint.go @@ -0,0 +1,14 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type RealTimeHistogramTimeseriesDatapoint struct { + Timestamp string `json:"timestamp,omitempty"` + Sum int64 `json:"sum,omitempty"` + P95 int64 `json:"p95,omitempty"` + Median int64 `json:"median,omitempty"` + MaxPercentage float64 `json:"max_percentage,omitempty"` + BucketValues []RealTimeHistogramTimeseriesBucketValues `json:"bucket_values,omitempty"` + Average float64 `json:"average,omitempty"` +} diff --git a/model_real_time_timeseries_datapoint.go b/model_real_time_timeseries_datapoint.go new file mode 100644 index 0000000..e594621 --- /dev/null +++ b/model_real_time_timeseries_datapoint.go @@ -0,0 +1,10 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type RealTimeTimeseriesDatapoint struct { + Value float64 `json:"value,omitempty"` + Date string `json:"date,omitempty"` + ConcurentViewers int64 `json:"concurent_viewers,omitempty"` +} From 074658c684d2d003131867ae67a738d19d77f1d8 Mon Sep 17 00:00:00 2001 From: Phil Cluff <578330+GeneticGenesis@users.noreply.github.com> Date: Fri, 8 Jan 2021 11:52:23 +0000 Subject: [PATCH 2/3] Fix type issue with realtime API --- docs/RealTimeHistogramTimeseriesDatapoint.md | 4 ++-- model_real_time_histogram_timeseries_datapoint.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/RealTimeHistogramTimeseriesDatapoint.md b/docs/RealTimeHistogramTimeseriesDatapoint.md index 8ea4e02..e7c3f2c 100644 --- a/docs/RealTimeHistogramTimeseriesDatapoint.md +++ b/docs/RealTimeHistogramTimeseriesDatapoint.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Timestamp** | **string** | | [optional] **Sum** | **int64** | | [optional] -**P95** | **int64** | | [optional] -**Median** | **int64** | | [optional] +**P95** | **float64** | | [optional] +**Median** | **float64** | | [optional] **MaxPercentage** | **float64** | | [optional] **BucketValues** | [**[]RealTimeHistogramTimeseriesBucketValues**](RealTimeHistogramTimeseriesBucketValues.md) | | [optional] **Average** | **float64** | | [optional] diff --git a/model_real_time_histogram_timeseries_datapoint.go b/model_real_time_histogram_timeseries_datapoint.go index 6741e64..9ebc405 100644 --- a/model_real_time_histogram_timeseries_datapoint.go +++ b/model_real_time_histogram_timeseries_datapoint.go @@ -6,8 +6,8 @@ package muxgo type RealTimeHistogramTimeseriesDatapoint struct { Timestamp string `json:"timestamp,omitempty"` Sum int64 `json:"sum,omitempty"` - P95 int64 `json:"p95,omitempty"` - Median int64 `json:"median,omitempty"` + P95 float64 `json:"p95,omitempty"` + Median float64 `json:"median,omitempty"` MaxPercentage float64 `json:"max_percentage,omitempty"` BucketValues []RealTimeHistogramTimeseriesBucketValues `json:"bucket_values,omitempty"` Average float64 `json:"average,omitempty"` From b3ee6eab7a95d24f67f8db1d1ac30aa7a3b32a7f Mon Sep 17 00:00:00 2001 From: Phil Cluff <578330+GeneticGenesis@users.noreply.github.com> Date: Fri, 8 Jan 2021 12:19:23 +0000 Subject: [PATCH 3/3] Test Incidents, RealTime and Dimensions --- examples/common/lazytest.go | 7 ++ .../data/dimensions/exercise-dimensions.go | 33 ++++++++++ examples/data/incidents/exercise-incidents.go | 32 +++++++++ examples/data/realtime/exercise-realtime.go | 65 +++++++++++++++++++ 4 files changed, 137 insertions(+) create mode 100644 examples/data/dimensions/exercise-dimensions.go create mode 100644 examples/data/incidents/exercise-incidents.go create mode 100644 examples/data/realtime/exercise-realtime.go diff --git a/examples/common/lazytest.go b/examples/common/lazytest.go index fcdce00..7b99c1d 100644 --- a/examples/common/lazytest.go +++ b/examples/common/lazytest.go @@ -90,3 +90,10 @@ func AssertIntEqualsValue(a int, b int) { os.Exit(255) } } + +func AssertIntGreaterThanZero(a int) { + if a <= 0 { + fmt.Println("Int was <= 0!") + os.Exit(255) + } +} diff --git a/examples/data/dimensions/exercise-dimensions.go b/examples/data/dimensions/exercise-dimensions.go new file mode 100644 index 0000000..340967f --- /dev/null +++ b/examples/data/dimensions/exercise-dimensions.go @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "os" + + muxgo "github.com/muxinc/mux-go" + "github.com/muxinc/mux-go/examples/common" +) + +func main() { + + // API Client Initialization + client := muxgo.NewAPIClient( + muxgo.NewConfiguration( + muxgo.WithBasicAuth(os.Getenv("MUX_TOKEN_ID"), os.Getenv("MUX_TOKEN_SECRET")), + )) + + // ========== list-dimensions ========== + d, err := client.DimensionsApi.ListDimensions() + common.AssertNoError(err) + common.AssertNotNil(d.Data) + common.AssertNotNil(d.Data.Basic) + common.AssertNotNil(d.Data.Advanced) + fmt.Println("list-dimensions ✅") + + // ========== list-dimension-values ========== + ldp := muxgo.ListDimensionValuesParams{Timeframe: []string{"7:days"}} + dv, err := client.DimensionsApi.ListDimensionValues("browser", muxgo.WithParams(&ldp)) + common.AssertNoError(err) + common.AssertNotNil(dv.Data) + fmt.Println("list-dimension-values ✅") +} diff --git a/examples/data/incidents/exercise-incidents.go b/examples/data/incidents/exercise-incidents.go new file mode 100644 index 0000000..0f81019 --- /dev/null +++ b/examples/data/incidents/exercise-incidents.go @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "os" + + muxgo "github.com/muxinc/mux-go" + "github.com/muxinc/mux-go/examples/common" +) + +func main() { + + // API Client Initialization + client := muxgo.NewAPIClient( + muxgo.NewConfiguration( + muxgo.WithBasicAuth(os.Getenv("MUX_TOKEN_ID"), os.Getenv("MUX_TOKEN_SECRET")), + )) + + // Test coverage here is poor due to not knowning if the account we're testing against has any incidents. + + // ========== list-incidents ========== + i, err := client.IncidentsApi.ListIncidents() + common.AssertNoError(err) + common.AssertNotNil(i.Data) + fmt.Println("list-incidents ✅") + + // ========== get-incident ========== + fmt.Println("get-incident SKIP ⚠️") + + // ========== list-related-incidents ========== + fmt.Println("list-related-incidents SKIP ⚠️") +} diff --git a/examples/data/realtime/exercise-realtime.go b/examples/data/realtime/exercise-realtime.go new file mode 100644 index 0000000..f25499c --- /dev/null +++ b/examples/data/realtime/exercise-realtime.go @@ -0,0 +1,65 @@ +package main + +import ( + "fmt" + "os" + + muxgo "github.com/muxinc/mux-go" + "github.com/muxinc/mux-go/examples/common" +) + +func main() { + + // API Client Initialization + client := muxgo.NewAPIClient( + muxgo.NewConfiguration( + muxgo.WithBasicAuth(os.Getenv("MUX_TOKEN_ID"), os.Getenv("MUX_TOKEN_SECRET")), + )) + + // Test coverage here isn't fantastic due to not knowning if the account we're testing against has + // any real-time data. The behaviour has been manually verified against real-world data. + + // ========== list-realtime-dimensions ========== + d, err := client.RealTimeApi.ListRealtimeDimensions() + common.AssertNoError(err) + common.AssertNotNil(d.Data) + common.AssertIntGreaterThanZero(len(d.Data)) + common.AssertStringNotEqualsValue(d.Data[0].Name, "") + common.AssertStringNotEqualsValue(d.Data[0].DisplayName, "") + fmt.Println("list-realtime-dimensions ✅") + + // ========== list-realtime-metrics ========== + m, err := client.RealTimeApi.ListRealtimeMetrics() + common.AssertNoError(err) + common.AssertNotNil(m.Data) + common.AssertIntGreaterThanZero(len(m.Data)) + common.AssertStringNotEqualsValue(m.Data[0].Name, "") + common.AssertStringNotEqualsValue(m.Data[0].DisplayName, "") + fmt.Println("list-realtime-metrics ✅") + + // ========== get-realtime-breakdown ========== + rbp := muxgo.GetRealtimeBreakdownParams{Dimension: "asn"} + b, err := client.RealTimeApi.GetRealtimeBreakdown("current-rebuffering-percentage", muxgo.WithParams(&rbp)) + common.AssertNoError(err) + common.AssertNotNil(b.Data) + fmt.Println("get-realtime-breakdown ✅") + + // ========== get-realtime-histogram-timeseries ========== + ht, err := client.RealTimeApi.GetRealtimeHistogramTimeseries("video-startup-time") + common.AssertNoError(err) + common.AssertNotNil(ht.Meta) + common.AssertNotNil(ht.Meta.Buckets) + common.AssertIntGreaterThanZero(len(ht.Meta.Buckets)) + common.AssertNotNil(ht.Data) + common.AssertIntGreaterThanZero(len(ht.Data)) + fmt.Println("get-realtime-histogram-timeseries ✅") + + // ========== get-realtime-timeseries ========== + t, err := client.RealTimeApi.GetRealtimeTimeseries("current-rebuffering-percentage") + common.AssertNoError(err) + common.AssertNotNil(t.Data) + common.AssertIntGreaterThanZero(len(t.Data)) + common.AssertStringNotEqualsValue(t.Data[0].Date, "") + fmt.Println("get-realtime-timeseries ✅") + +}