muxgo

package module
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2020 License: MIT Imports: 19 Imported by: 0

README

Mux Go Banner

Mux Go

Official Mux API wrapper for golang projects, supporting both Mux Data and Mux Video.

Mux Video is an API-first platform, powered by data and designed by video experts to make beautiful video possible for every development team.

Mux Data is a platform for monitoring your video streaming performance with just a few lines of code. Get in-depth quality of service analytics on web, mobile, and OTT devices.

Not familiar with Mux? Check out https://mux.com/ for more information.

Installation

go get github.com/muxinc/mux-go

Getting Started

Overview

Mux Go is a code generated lightweight wrapper around the Mux REST API and reflects them accurately. This has a few consequences you should watch out for:

  1. For almost all API responses, the object you're looking for will be in the data field on the API response object, as in the example below. This is because we designed our APIs with similar concepts to the JSON:API standard. This means we'll be able to return more metadata from our API calls (such as related entities) without the need to make breaking changes to our APIs. We've decided not to hide that in this library.

  2. We don't use a lot of object orientation. For example API calls that happen on a single asset don't exist in the asset class, but are API calls in the AssetsApi which require an asset ID.

Authentication

To use the Mux API, you'll need an access token and a secret. Details on obtaining these can be found here in the Mux documentation.

Its up to you to manage your token and secret. In our examples, we read them from MUX_TOKEN_ID and MUX_TOKEN_SECRET in your environment.

Example Usage

Below is a quick example of using mux-go to list the Video assets stored in your Mux account.

Be sure to also checkout the exmples directory.

package main

import (
	"fmt"
	"os"

	"github.com/muxinc/mux-go"
)

func main() {
	// API Client Init
	client := muxgo.NewAPIClient(
		muxgo.NewConfiguration(
			muxgo.WithBasicAuth(os.Getenv("MUX_TOKEN_ID"), os.Getenv("MUX_TOKEN_SECRET")),
		))

	// List Assets
	fmt.Println("Listing Assets...\n")
	r, err := client.AssetsApi.ListAssets()
	if err != nil {
		fmt.Printf("err: %s \n\n", err)
		os.Exit(255)
	}
	for _, asset := range r.Data {
		fmt.Printf("Asset ID: %s\n", asset.Id)
		fmt.Printf("Status: %s\n", asset.Status)
		fmt.Printf("Duration: %f\n\n", asset.Duration)
	}
}

Errors & Error Handling

All API calls return an err as their final return value. Below is documented the errors you might want to check for. You can check error.Body on all errors to see the full HTTP response.

BadRequestError

BadRequestError is returned when a you make a bad request to Mux, this likely means you've passed in an invalid parameter to the API call.

UnauthorizedError

UnauthorizedError is returned when Mux cannot authenticate your request. You should check you have configured your credentials correctly.

ForbiddenError

ForbiddenError is returned you don't have permission to access that resource. You should check you have configured your credentials correctly.

NotFoundError

NotFoundError is returned when a resource is not found. This is useful when trying to get an entity by its ID.

TooManyRequestsError

TooManyRequestsError is returned when you exceed the manimum request that Mux allows. Please get in touch with support@mux.com if you need to talk about this limit.

ServiceError

ServiceError is returned when Mux returns a HTTP 5XX Status Code. If you encounter this reproducibly, please get in touch with support@mux.com.

GenericOpenAPIError

GenericOpenAPIError is a fallback Error which may be returned in some edge cases. This will be deprecated in a later release but remains present for API compatibility.

Documentation

Be sure to check out the documentation in the docs directory.

Issues

If you run into problems, please raise a GitHub issue, filling in the issue template. We'll take a look as soon as possible.

Contributing

Please do not submit PRs against this package. It is generated from our OpenAPI definitions - Please open an issue instead!

License

MIT License. Copyright 2019 Mux, Inc.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckForHttpError added in v0.3.0

func CheckForHttpError(code int, body []byte) error

Helper to check for common non-200 errors

Types

type APIClient

type APIClient struct {

	// API Services
	AssetsApi         *AssetsApiService
	DeliveryUsageApi  *DeliveryUsageApiService
	DirectUploadsApi  *DirectUploadsApiService
	ErrorsApi         *ErrorsApiService
	ExportsApi        *ExportsApiService
	FiltersApi        *FiltersApiService
	LiveStreamsApi    *LiveStreamsApiService
	MetricsApi        *MetricsApiService
	URLSigningKeysApi *URLSigningKeysApiService
	VideoViewsApi     *VideoViewsApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Mux API API vv1 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client.

type APIOption

type APIOption func(*APIOptions)

APIOption sets options for API calls.

func WithContext

func WithContext(ctx context.Context) APIOption

WithContext returns an APIOption that sets the context for an API call.

func WithParams

func WithParams(params interface{}) APIOption

WithParams returns an APIOption that sets the params for an API call. The params provided must be the correct type for the call or an error will be thrown by the call.

type APIOptions

type APIOptions struct {
	// contains filtered or unexported fields
}

APIOptions wraps internal API call options.

type AbridgedVideoView

type AbridgedVideoView struct {
	Id                    string `json:"id,omitempty"`
	ViewerOsFamily        string `json:"viewer_os_family,omitempty"`
	ViewerApplicationName string `json:"viewer_application_name,omitempty"`
	VideoTitle            string `json:"video_title,omitempty"`
	TotalRowCount         int64  `json:"total_row_count,omitempty"`
	PlayerErrorMessage    string `json:"player_error_message,omitempty"`
	PlayerErrorCode       string `json:"player_error_code,omitempty"`
	ErrorTypeId           int32  `json:"error_type_id,omitempty"`
	CountryCode           string `json:"country_code,omitempty"`
	ViewStart             string `json:"view_start,omitempty"`
	ViewEnd               string `json:"view_end,omitempty"`
}

type Asset

type Asset struct {
	Id                  string                `json:"id,omitempty"`
	CreatedAt           string                `json:"created_at,omitempty"`
	DeletedAt           string                `json:"deleted_at,omitempty"`
	Status              string                `json:"status,omitempty"`
	Duration            float64               `json:"duration,omitempty"`
	MaxStoredResolution string                `json:"max_stored_resolution,omitempty"`
	MaxStoredFrameRate  float64               `json:"max_stored_frame_rate,omitempty"`
	AspectRatio         string                `json:"aspect_ratio,omitempty"`
	PlaybackIds         []PlaybackId          `json:"playback_ids,omitempty"`
	Tracks              []Track               `json:"tracks,omitempty"`
	Errors              AssetErrors           `json:"errors,omitempty"`
	PerTitleEncode      bool                  `json:"per_title_encode,omitempty"`
	IsLive              bool                  `json:"is_live,omitempty"`
	Passthrough         string                `json:"passthrough,omitempty"`
	LiveStreamId        string                `json:"live_stream_id,omitempty"`
	Master              AssetMaster           `json:"master,omitempty"`
	MasterAccess        string                `json:"master_access,omitempty"`
	Mp4Support          string                `json:"mp4_support,omitempty"`
	NormalizeAudio      bool                  `json:"normalize_audio,omitempty"`
	StaticRenditions    AssetStaticRenditions `json:"static_renditions,omitempty"`
	Test                bool                  `json:"test,omitempty"`
}

type AssetErrors

type AssetErrors struct {
	Type     string   `json:"type,omitempty"`
	Messages []string `json:"messages,omitempty"`
}

type AssetMaster

type AssetMaster struct {
	Status string `json:"status,omitempty"`
	Url    string `json:"url,omitempty"`
}

type AssetResponse

type AssetResponse struct {
	Data Asset `json:"data,omitempty"`
}

type AssetStaticRenditions

type AssetStaticRenditions struct {
	// * `ready`: All MP4s are downloadable * `preparing`: We are preparing the MP4s * `disabled`: MP4 support was not requested or has been removed * `errored`: There was a Mux internal error that prevented the MP4s from being created
	Status string                       `json:"status,omitempty"`
	Files  []AssetStaticRenditionsFiles `json:"files,omitempty"`
}

type AssetStaticRenditionsFiles

type AssetStaticRenditionsFiles struct {
	Name string `json:"name,omitempty"`
	// Extension of the static rendition file
	Ext string `json:"ext,omitempty"`
	// The height of the static rendition's file in pixels
	Height int32 `json:"height,omitempty"`
	// The width of the static rendition's file in pixels
	Width int32 `json:"width,omitempty"`
	// The bitrate in bits per second
	Bitrate  int64  `json:"bitrate,omitempty"`
	Filesize string `json:"filesize,omitempty"`
}

type AssetsApiService

type AssetsApiService service

func (*AssetsApiService) CreateAsset

func (a *AssetsApiService) CreateAsset(createAssetRequest CreateAssetRequest, opts ...APIOption) (AssetResponse, error)

func (*AssetsApiService) CreateAssetPlaybackId

func (a *AssetsApiService) CreateAssetPlaybackId(aSSETID string, createPlaybackIdRequest CreatePlaybackIdRequest, opts ...APIOption) (CreatePlaybackIdResponse, error)

func (*AssetsApiService) CreateAssetTrack added in v0.6.0

func (a *AssetsApiService) CreateAssetTrack(aSSETID string, createTrackRequest CreateTrackRequest, opts ...APIOption) (CreateTrackResponse, error)

func (*AssetsApiService) DeleteAsset

func (a *AssetsApiService) DeleteAsset(aSSETID string, opts ...APIOption) error

func (*AssetsApiService) DeleteAssetPlaybackId

func (a *AssetsApiService) DeleteAssetPlaybackId(aSSETID string, pLAYBACKID string, opts ...APIOption) error

func (*AssetsApiService) DeleteAssetTrack added in v0.6.0

func (a *AssetsApiService) DeleteAssetTrack(aSSETID string, tRACKID string, opts ...APIOption) error

func (*AssetsApiService) GetAsset

func (a *AssetsApiService) GetAsset(aSSETID string, opts ...APIOption) (AssetResponse, error)

func (*AssetsApiService) GetAssetInputInfo

func (a *AssetsApiService) GetAssetInputInfo(aSSETID string, opts ...APIOption) (GetAssetInputInfoResponse, error)

func (*AssetsApiService) GetAssetPlaybackId

func (a *AssetsApiService) GetAssetPlaybackId(aSSETID string, pLAYBACKID string, opts ...APIOption) (GetAssetPlaybackIdResponse, error)

func (*AssetsApiService) ListAssets

func (a *AssetsApiService) ListAssets(opts ...APIOption) (ListAssetsResponse, error)

ListAssets optionally accepts the APIOption of WithParams(*ListAssetsParams).

func (*AssetsApiService) UpdateAssetMasterAccess added in v0.7.0

func (a *AssetsApiService) UpdateAssetMasterAccess(aSSETID string, updateAssetMasterAccessRequest UpdateAssetMasterAccessRequest, opts ...APIOption) (AssetResponse, error)

func (*AssetsApiService) UpdateAssetMp4Support

func (a *AssetsApiService) UpdateAssetMp4Support(aSSETID string, updateAssetMp4SupportRequest UpdateAssetMp4SupportRequest, opts ...APIOption) (AssetResponse, error)

type BadRequestError added in v0.3.0

type BadRequestError struct {
	// contains filtered or unexported fields
}

Generic 400 error

func (BadRequestError) Error added in v0.3.0

func (e BadRequestError) Error() string

type BreakdownValue

type BreakdownValue struct {
	Views          int64   `json:"views,omitempty"`
	Value          float64 `json:"value,omitempty"`
	TotalWatchTime int64   `json:"total_watch_time,omitempty"`
	NegativeImpact int32   `json:"negative_impact,omitempty"`
	Field          string  `json:"field,omitempty"`
}

type Configuration

type Configuration struct {
	// contains filtered or unexported fields
}

func NewConfiguration

func NewConfiguration(opts ...ConfigurationOption) *Configuration

type ConfigurationOption

type ConfigurationOption func(*Configuration)

ConfigurationOption configures the Mux API Client.

func WithBasicAuth

func WithBasicAuth(username, password string) ConfigurationOption

func WithHost

func WithHost(host string) ConfigurationOption

func WithTimeout

func WithTimeout(t time.Duration) ConfigurationOption

type CreateAssetRequest

type CreateAssetRequest struct {
	Input          []InputSettings  `json:"input,omitempty"`
	PlaybackPolicy []PlaybackPolicy `json:"playback_policy,omitempty"`
	PerTitleEncode bool             `json:"per_title_encode,omitempty"`
	Passthrough    string           `json:"passthrough,omitempty"`
	Mp4Support     string           `json:"mp4_support,omitempty"`
	// Normalize the audio track loudness level. This parameter is only applicable to on-demand (not live) assets.
	NormalizeAudio bool   `json:"normalize_audio,omitempty"`
	MasterAccess   string `json:"master_access,omitempty"`
	Test           bool   `json:"test,omitempty"`
}

type CreateLiveStreamRequest

type CreateLiveStreamRequest struct {
	PlaybackPolicy   []PlaybackPolicy   `json:"playback_policy,omitempty"`
	NewAssetSettings CreateAssetRequest `json:"new_asset_settings,omitempty"`
	// When live streaming software disconnects from Mux, either intentionally or due to a drop in the network, the Reconnect Window is the time in seconds that Mux should wait for the streaming software to reconnect before considering the live stream finished and completing the recorded asset. Defaults to 60 seconds on the API if not specified.
	ReconnectWindow float32 `json:"reconnect_window,omitempty"`
	Passthrough     string  `json:"passthrough,omitempty"`
	// Latency is the time from when the streamer does something in real life to when you see it happen in the player. Set this if you want lower latency for your live stream. Note: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/reduced-latency-for-mux-live-streaming-now-available/
	ReducedLatency bool `json:"reduced_latency,omitempty"`
	Test           bool `json:"test,omitempty"`
}

type CreatePlaybackIdRequest

type CreatePlaybackIdRequest struct {
	Policy PlaybackPolicy `json:"policy,omitempty"`
}

type CreatePlaybackIdResponse

type CreatePlaybackIdResponse struct {
	Data PlaybackId `json:"data,omitempty"`
}

type CreateSimulcastTargetRequest added in v0.4.0

type CreateSimulcastTargetRequest struct {
	// Arbitrary metadata set by you when creating a simulcast target.
	Passthrough string `json:"passthrough,omitempty"`
	// Stream Key represents a stream identifier on the third party live streaming service to send the parent live stream to.
	StreamKey string `json:"stream_key,omitempty"`
	// RTMP hostname including application name for the third party live streaming service. Example: 'rtmp://live.example.com/app'.
	Url string `json:"url"`
}

type CreateTrackRequest added in v0.6.0

type CreateTrackRequest struct {
	Url            string `json:"url"`
	Type           string `json:"type"`
	TextType       string `json:"text_type"`
	LanguageCode   string `json:"language_code"`
	Name           string `json:"name,omitempty"`
	ClosedCaptions bool   `json:"closed_captions,omitempty"`
	Passthrough    string `json:"passthrough,omitempty"`
}

type CreateTrackResponse added in v0.6.0

type CreateTrackResponse struct {
	Data Track `json:"data,omitempty"`
}

type CreateUploadRequest

type CreateUploadRequest struct {
	// Max time in seconds for the signed upload URL to be valid. If a successful upload has not occurred before the timeout limit, the direct upload is marked `timed_out`
	Timeout int32 `json:"timeout,omitempty"`
	// If the upload URL will be used in a browser, you must specify the origin in order for the signed URL to have the correct CORS headers.
	CorsOrigin       string             `json:"cors_origin,omitempty"`
	NewAssetSettings CreateAssetRequest `json:"new_asset_settings"`
	Test             bool               `json:"test,omitempty"`
}

type DeliveryReport added in v0.4.0

type DeliveryReport struct {
	LiveStreamId     string  `json:"live_stream_id,omitempty"`
	AssetId          string  `json:"asset_id,omitempty"`
	Passthrough      string  `json:"passthrough,omitempty"`
	CreatedAt        string  `json:"created_at,omitempty"`
	AssetState       string  `json:"asset_state,omitempty"`
	AssetDuration    float64 `json:"asset_duration,omitempty"`
	DeliveredSeconds float64 `json:"delivered_seconds,omitempty"`
}

type DeliveryUsageApiService added in v0.4.0

type DeliveryUsageApiService service

func (*DeliveryUsageApiService) ListDeliveryUsage added in v0.4.0

func (a *DeliveryUsageApiService) ListDeliveryUsage(opts ...APIOption) (ListDeliveryUsageResponse, error)

ListDeliveryUsage optionally accepts the APIOption of WithParams(*ListDeliveryUsageParams).

type DirectUploadsApiService

type DirectUploadsApiService service

func (*DirectUploadsApiService) CancelDirectUpload

func (a *DirectUploadsApiService) CancelDirectUpload(uPLOADID string, opts ...APIOption) (UploadResponse, error)

func (*DirectUploadsApiService) CreateDirectUpload

func (a *DirectUploadsApiService) CreateDirectUpload(createUploadRequest CreateUploadRequest, opts ...APIOption) (UploadResponse, error)

func (*DirectUploadsApiService) GetDirectUpload

func (a *DirectUploadsApiService) GetDirectUpload(uPLOADID string, opts ...APIOption) (UploadResponse, error)

func (*DirectUploadsApiService) ListDirectUploads

func (a *DirectUploadsApiService) ListDirectUploads(opts ...APIOption) (ListUploadsResponse, error)

ListDirectUploads optionally accepts the APIOption of WithParams(*ListDirectUploadsParams).

type Error

type Error struct {
	Id          int64   `json:"id,omitempty"`
	Percentage  float64 `json:"percentage,omitempty"`
	Notes       string  `json:"notes,omitempty"`
	Message     string  `json:"message,omitempty"`
	LastSeen    string  `json:"last_seen,omitempty"`
	Description string  `json:"description,omitempty"`
	Count       int64   `json:"count,omitempty"`
	Code        int64   `json:"code,omitempty"`
}

type ErrorsApiService

type ErrorsApiService service

func (*ErrorsApiService) ListErrors

func (a *ErrorsApiService) ListErrors(opts ...APIOption) (ListErrorsResponse, error)

ListErrors optionally accepts the APIOption of WithParams(*ListErrorsParams).

type ExportsApiService

type ExportsApiService service

func (*ExportsApiService) ListExports

func (a *ExportsApiService) ListExports(opts ...APIOption) (ListExportsResponse, error)

type FilterValue

type FilterValue struct {
	Value      string `json:"value,omitempty"`
	TotalCount int64  `json:"total_count,omitempty"`
}

type FiltersApiService

type FiltersApiService service

func (*FiltersApiService) ListFilterValues

func (a *FiltersApiService) ListFilterValues(fILTERID string, opts ...APIOption) (ListFilterValuesResponse, error)

ListFilterValues optionally accepts the APIOption of WithParams(*ListFilterValuesParams).

func (*FiltersApiService) ListFilters

func (a *FiltersApiService) ListFilters(opts ...APIOption) (ListFiltersResponse, error)

type ForbiddenError added in v0.3.0

type ForbiddenError struct {
	// contains filtered or unexported fields
}

403 Error

func (ForbiddenError) Body added in v0.3.0

func (e ForbiddenError) Body() []byte

func (ForbiddenError) Error added in v0.3.0

func (e ForbiddenError) Error() string

type GenericOpenAPIError

type GenericOpenAPIError struct {
	// contains filtered or unexported fields
}

GenericOpenAPIError Provides access to the body, error and model on returned errors.

func (GenericOpenAPIError) Body

func (e GenericOpenAPIError) Body() []byte

Body returns the raw bytes of the response

func (GenericOpenAPIError) Error

func (e GenericOpenAPIError) Error() string

Error returns non-empty string if there was an error.

func (GenericOpenAPIError) Model

func (e GenericOpenAPIError) Model() interface{}

Model returns the unpacked model of the error

type GetAssetInputInfoResponse

type GetAssetInputInfoResponse struct {
	Data []InputInfo `json:"data,omitempty"`
}

type GetAssetPlaybackIdResponse

type GetAssetPlaybackIdResponse struct {
	Data PlaybackId `json:"data,omitempty"`
}

type GetMetricTimeseriesDataParams

type GetMetricTimeseriesDataParams struct {
	Timeframe      []string
	Filters        []string
	Measurement    string
	OrderDirection string
	GroupBy        string
}

type GetMetricTimeseriesDataResponse

type GetMetricTimeseriesDataResponse struct {
	Data          [][]string `json:"data,omitempty"`
	TotalRowCount int64      `json:"total_row_count,omitempty"`
	Timeframe     []int64    `json:"timeframe,omitempty"`
}

func (*GetMetricTimeseriesDataResponse) UnmarshalJSON added in v0.2.0

func (this *GetMetricTimeseriesDataResponse) UnmarshalJSON(data []byte) error

!!! 🐉 Here be dragons 🐉 !!! We use a custom Unmarshal to work around one awkward API call where we can't model the response from the API elegantly since go doesn't have heterogeneous arrays. This isn't perfect, or memory friendly, but it works.

type GetOverallValuesParams

type GetOverallValuesParams struct {
	Timeframe   []string
	Filters     []string
	Measurement string
}

type GetOverallValuesResponse

type GetOverallValuesResponse struct {
	Data          OverallValues `json:"data,omitempty"`
	TotalRowCount int64         `json:"total_row_count,omitempty"`
	Timeframe     []int64       `json:"timeframe,omitempty"`
}

type InputFile

type InputFile struct {
	ContainerFormat string       `json:"container_format,omitempty"`
	Tracks          []InputTrack `json:"tracks,omitempty"`
}

type InputInfo

type InputInfo struct {
	Settings InputSettings `json:"settings,omitempty"`
	File     InputFile     `json:"file,omitempty"`
}

type InputSettings

type InputSettings struct {
	Url             string                       `json:"url,omitempty"`
	OverlaySettings InputSettingsOverlaySettings `json:"overlay_settings,omitempty"`
	Type            string                       `json:"type,omitempty"`
	TextType        string                       `json:"text_type,omitempty"`
	LanguageCode    string                       `json:"language_code,omitempty"`
	Name            string                       `json:"name,omitempty"`
	ClosedCaptions  bool                         `json:"closed_captions,omitempty"`
	Passthrough     string                       `json:"passthrough,omitempty"`
}

Input object with additional configuration

type InputSettingsOverlaySettings

type InputSettingsOverlaySettings struct {
	VerticalAlign    string `json:"vertical_align,omitempty"`
	VerticalMargin   string `json:"vertical_margin,omitempty"`
	HorizontalAlign  string `json:"horizontal_align,omitempty"`
	HorizontalMargin string `json:"horizontal_margin,omitempty"`
	Width            string `json:"width,omitempty"`
	Height           string `json:"height,omitempty"`
	Opacity          string `json:"opacity,omitempty"`
}

type InputTrack

type InputTrack struct {
	Type       string  `json:"type,omitempty"`
	Duration   float64 `json:"duration,omitempty"`
	Encoding   string  `json:"encoding,omitempty"`
	Width      int64   `json:"width,omitempty"`
	Height     int64   `json:"height,omitempty"`
	FrameRate  float64 `json:"frame_rate,omitempty"`
	SampleRate int64   `json:"sample_rate,omitempty"`
	SampleSize int64   `json:"sample_size,omitempty"`
	Channels   int64   `json:"channels,omitempty"`
}

type Insight

type Insight struct {
	TotalWatchTime      int64   `json:"total_watch_time,omitempty"`
	TotalViews          int64   `json:"total_views,omitempty"`
	NegativeImpactScore float32 `json:"negative_impact_score,omitempty"`
	Metric              float64 `json:"metric,omitempty"`
	FilterValue         string  `json:"filter_value,omitempty"`
	FilterColumn        string  `json:"filter_column,omitempty"`
}

type ListAllMetricValuesParams

type ListAllMetricValuesParams struct {
	Timeframe []string
	Filters   []string
	Dimension string
	Value     string
}

type ListAllMetricValuesResponse

type ListAllMetricValuesResponse struct {
	Data          []Score `json:"data,omitempty"`
	TotalRowCount int64   `json:"total_row_count,omitempty"`
	Timeframe     []int64 `json:"timeframe,omitempty"`
}

type ListAssetsParams

type ListAssetsParams struct {
	Limit int32
	Page  int32
}

type ListAssetsResponse

type ListAssetsResponse struct {
	Data []Asset `json:"data,omitempty"`
}

type ListBreakdownValuesParams

type ListBreakdownValuesParams struct {
	GroupBy        string
	Measurement    string
	Filters        []string
	Limit          int32
	Page           int32
	OrderBy        string
	OrderDirection string
	Timeframe      []string
}

type ListBreakdownValuesResponse

type ListBreakdownValuesResponse struct {
	Data          []BreakdownValue `json:"data,omitempty"`
	TotalRowCount int64            `json:"total_row_count,omitempty"`
	Timeframe     []int64          `json:"timeframe,omitempty"`
}

type ListDeliveryUsageParams added in v0.4.0

type ListDeliveryUsageParams struct {
	Page      int32
	Limit     int32
	AssetId   string
	Timeframe []string
}

type ListDeliveryUsageResponse added in v0.4.0

type ListDeliveryUsageResponse struct {
	Data          []DeliveryReport `json:"data,omitempty"`
	TotalRowCount int64            `json:"total_row_count,omitempty"`
	Timeframe     []int64          `json:"timeframe,omitempty"`
	// Number of assets returned in this response. Default value is 100.
	Limit int64 `json:"limit,omitempty"`
}

type ListDirectUploadsParams

type ListDirectUploadsParams struct {
	Limit int32
	Page  int32
}

type ListErrorsParams

type ListErrorsParams struct {
	Filters   []string
	Timeframe []string
}

type ListErrorsResponse

type ListErrorsResponse struct {
	Data          []Error `json:"data,omitempty"`
	TotalRowCount int64   `json:"total_row_count,omitempty"`
	Timeframe     []int64 `json:"timeframe,omitempty"`
}

type ListExportsResponse

type ListExportsResponse struct {
	Data          []string `json:"data,omitempty"`
	TotalRowCount int64    `json:"total_row_count,omitempty"`
	Timeframe     []int64  `json:"timeframe,omitempty"`
}

type ListFilterValuesParams

type ListFilterValuesParams struct {
	Limit     int32
	Page      int32
	Filters   []string
	Timeframe []string
}

type ListFilterValuesResponse

type ListFilterValuesResponse struct {
	Data          []FilterValue `json:"data,omitempty"`
	TotalRowCount int64         `json:"total_row_count,omitempty"`
	Timeframe     []int64       `json:"timeframe,omitempty"`
}

type ListFiltersResponse

type ListFiltersResponse struct {
	Data          ListFiltersResponseData `json:"data,omitempty"`
	TotalRowCount int64                   `json:"total_row_count,omitempty"`
	Timeframe     []int64                 `json:"timeframe,omitempty"`
}

type ListFiltersResponseData

type ListFiltersResponseData struct {
	Basic    []string `json:"basic,omitempty"`
	Advanced []string `json:"advanced,omitempty"`
}

type ListInsightsParams

type ListInsightsParams struct {
	Measurement    string
	OrderDirection string
	Timeframe      []string
}

type ListInsightsResponse

type ListInsightsResponse struct {
	Data          []Insight `json:"data,omitempty"`
	TotalRowCount int64     `json:"total_row_count,omitempty"`
	Timeframe     []int64   `json:"timeframe,omitempty"`
}

type ListLiveStreamsParams

type ListLiveStreamsParams struct {
	Limit int32
	Page  int32
}

type ListLiveStreamsResponse

type ListLiveStreamsResponse struct {
	Data []LiveStream `json:"data,omitempty"`
}

type ListSigningKeysResponse

type ListSigningKeysResponse struct {
	Data []SigningKey `json:"data,omitempty"`
}

type ListUploadsResponse

type ListUploadsResponse struct {
	Data []Upload `json:"data,omitempty"`
}

type ListUrlSigningKeysParams

type ListUrlSigningKeysParams struct {
	Limit int32
	Page  int32
}

type ListVideoViewsParams

type ListVideoViewsParams struct {
	Limit          int32
	Page           int32
	ViewerId       string
	ErrorId        int32
	OrderDirection string
	Filters        []string
	Timeframe      []string
}

type ListVideoViewsResponse

type ListVideoViewsResponse struct {
	Data          []AbridgedVideoView `json:"data,omitempty"`
	TotalRowCount int64               `json:"total_row_count,omitempty"`
	Timeframe     []int64             `json:"timeframe,omitempty"`
}

type LiveStream

type LiveStream struct {
	Id               string            `json:"id,omitempty"`
	CreatedAt        string            `json:"created_at,omitempty"`
	StreamKey        string            `json:"stream_key,omitempty"`
	ActiveAssetId    string            `json:"active_asset_id,omitempty"`
	RecentAssetIds   []string          `json:"recent_asset_ids,omitempty"`
	Status           string            `json:"status,omitempty"`
	PlaybackIds      []PlaybackId      `json:"playback_ids,omitempty"`
	NewAssetSettings Asset             `json:"new_asset_settings,omitempty"`
	Passthrough      string            `json:"passthrough,omitempty"`
	ReconnectWindow  float32           `json:"reconnect_window,omitempty"`
	ReducedLatency   bool              `json:"reduced_latency,omitempty"`
	SimulcastTargets []SimulcastTarget `json:"simulcast_targets,omitempty"`
	Test             bool              `json:"test,omitempty"`
}

type LiveStreamResponse

type LiveStreamResponse struct {
	Data LiveStream `json:"data,omitempty"`
}

type LiveStreamsApiService

type LiveStreamsApiService service

func (*LiveStreamsApiService) CreateLiveStream

func (a *LiveStreamsApiService) CreateLiveStream(createLiveStreamRequest CreateLiveStreamRequest, opts ...APIOption) (LiveStreamResponse, error)

func (*LiveStreamsApiService) CreateLiveStreamPlaybackId

func (a *LiveStreamsApiService) CreateLiveStreamPlaybackId(lIVESTREAMID string, createPlaybackIdRequest CreatePlaybackIdRequest, opts ...APIOption) (CreatePlaybackIdResponse, error)

func (*LiveStreamsApiService) CreateLiveStreamSimulcastTarget added in v0.4.0

func (a *LiveStreamsApiService) CreateLiveStreamSimulcastTarget(lIVESTREAMID string, createSimulcastTargetRequest CreateSimulcastTargetRequest, opts ...APIOption) (SimulcastTargetResponse, error)

func (*LiveStreamsApiService) DeleteLiveStream

func (a *LiveStreamsApiService) DeleteLiveStream(lIVESTREAMID string, opts ...APIOption) error

func (*LiveStreamsApiService) DeleteLiveStreamPlaybackId

func (a *LiveStreamsApiService) DeleteLiveStreamPlaybackId(lIVESTREAMID string, pLAYBACKID string, opts ...APIOption) error

func (*LiveStreamsApiService) DeleteLiveStreamSimulcastTarget added in v0.4.0

func (a *LiveStreamsApiService) DeleteLiveStreamSimulcastTarget(lIVESTREAMID string, sIMULCASTTARGETID string, opts ...APIOption) error

func (*LiveStreamsApiService) GetLiveStream

func (a *LiveStreamsApiService) GetLiveStream(lIVESTREAMID string, opts ...APIOption) (LiveStreamResponse, error)

func (*LiveStreamsApiService) GetLiveStreamSimulcastTarget added in v0.4.0

func (a *LiveStreamsApiService) GetLiveStreamSimulcastTarget(lIVESTREAMID string, sIMULCASTTARGETID string, opts ...APIOption) (SimulcastTargetResponse, error)

func (*LiveStreamsApiService) ListLiveStreams

func (a *LiveStreamsApiService) ListLiveStreams(opts ...APIOption) (ListLiveStreamsResponse, error)

ListLiveStreams optionally accepts the APIOption of WithParams(*ListLiveStreamsParams).

func (*LiveStreamsApiService) ResetStreamKey

func (a *LiveStreamsApiService) ResetStreamKey(lIVESTREAMID string, opts ...APIOption) (LiveStreamResponse, error)

func (*LiveStreamsApiService) SignalLiveStreamComplete

func (a *LiveStreamsApiService) SignalLiveStreamComplete(lIVESTREAMID string, opts ...APIOption) (SignalLiveStreamCompleteResponse, error)

type Metric

type Metric struct {
	Value       float64 `json:"value,omitempty"`
	Type        string  `json:"type,omitempty"`
	Name        string  `json:"name,omitempty"`
	Metric      string  `json:"metric,omitempty"`
	Measurement string  `json:"measurement,omitempty"`
}

type MetricsApiService

type MetricsApiService service

func (*MetricsApiService) GetMetricTimeseriesData

func (a *MetricsApiService) GetMetricTimeseriesData(mETRICID string, opts ...APIOption) (GetMetricTimeseriesDataResponse, error)

GetMetricTimeseriesData optionally accepts the APIOption of WithParams(*GetMetricTimeseriesDataParams).

func (*MetricsApiService) GetOverallValues

func (a *MetricsApiService) GetOverallValues(mETRICID string, opts ...APIOption) (GetOverallValuesResponse, error)

GetOverallValues optionally accepts the APIOption of WithParams(*GetOverallValuesParams).

func (*MetricsApiService) ListAllMetricValues

func (a *MetricsApiService) ListAllMetricValues(opts ...APIOption) (ListAllMetricValuesResponse, error)

ListAllMetricValues optionally accepts the APIOption of WithParams(*ListAllMetricValuesParams).

func (*MetricsApiService) ListBreakdownValues

func (a *MetricsApiService) ListBreakdownValues(mETRICID string, opts ...APIOption) (ListBreakdownValuesResponse, error)

ListBreakdownValues optionally accepts the APIOption of WithParams(*ListBreakdownValuesParams).

func (*MetricsApiService) ListInsights

func (a *MetricsApiService) ListInsights(mETRICID string, opts ...APIOption) (ListInsightsResponse, error)

ListInsights optionally accepts the APIOption of WithParams(*ListInsightsParams).

type NotFoundError added in v0.3.0

type NotFoundError struct {
	// contains filtered or unexported fields
}

404 Error

func (NotFoundError) Body added in v0.3.0

func (e NotFoundError) Body() []byte

func (NotFoundError) Error added in v0.3.0

func (e NotFoundError) Error() string

type OverallValues

type OverallValues struct {
	Value          float64 `json:"value,omitempty"`
	TotalWatchTime int64   `json:"total_watch_time,omitempty"`
	TotalViews     int64   `json:"total_views,omitempty"`
	GlobalValue    float64 `json:"global_value,omitempty"`
}

type PlaybackId

type PlaybackId struct {
	Id     string         `json:"id,omitempty"`
	Policy PlaybackPolicy `json:"policy,omitempty"`
}

type PlaybackPolicy

type PlaybackPolicy string
const (
	PUBLIC PlaybackPolicy = "public"
	SIGNED PlaybackPolicy = "signed"
)

List of PlaybackPolicy

type Score

type Score struct {
	WatchTime int64    `json:"watch_time,omitempty"`
	ViewCount int64    `json:"view_count,omitempty"`
	Name      string   `json:"name,omitempty"`
	Value     float64  `json:"value,omitempty"`
	Metric    string   `json:"metric,omitempty"`
	Items     []Metric `json:"items,omitempty"`
}

type ServiceError added in v0.3.0

type ServiceError struct {
	// contains filtered or unexported fields
}

5XX Error

func (ServiceError) Body added in v0.3.0

func (e ServiceError) Body() []byte

func (ServiceError) Code added in v0.3.0

func (e ServiceError) Code() int

func (ServiceError) Error added in v0.3.0

func (e ServiceError) Error() string

type SignalLiveStreamCompleteResponse

type SignalLiveStreamCompleteResponse struct {
	Data map[string]interface{} `json:"data,omitempty"`
}

type SigningKey

type SigningKey struct {
	Id         string `json:"id,omitempty"`
	CreatedAt  string `json:"created_at,omitempty"`
	PrivateKey string `json:"private_key,omitempty"`
}

type SigningKeyResponse

type SigningKeyResponse struct {
	Data SigningKey `json:"data,omitempty"`
}

type SimulcastTarget added in v0.4.0

type SimulcastTarget struct {
	// ID of the Simulcast Target
	Id string `json:"id,omitempty"`
	// Arbitrary Metadata set when creating a simulcast target.
	Passthrough string `json:"passthrough,omitempty"`
	// The current status of the simulcast target. See Statuses below for detailed description.   * `idle`: Default status. When the parent live stream is in disconnected status, simulcast targets will be idle state.   * `starting`: The simulcast target transitions into this state when the parent live stream transition into connected state.   * `broadcasting`: The simulcast target has successfully connected to the third party live streaming service and is pushing video to that service.   * `errored`: The simulcast target encountered an error either while attempting to connect to the third party live streaming service, or mid-broadcasting. Compared to other errored statuses in the Mux Video API, a simulcast may transition back into the broadcasting state if a connection with the service can be re-established.
	Status string `json:"status,omitempty"`
	// Stream Key represents an stream identifier for the third party live streaming service to simulcast the parent live stream too.
	StreamKey string `json:"stream_key,omitempty"`
	// RTMP hostname including the application name for the third party live streaming service.
	Url string `json:"url,omitempty"`
}

type SimulcastTargetResponse added in v0.4.0

type SimulcastTargetResponse struct {
	Data SimulcastTarget `json:"data,omitempty"`
}

type TooManyRequestsError added in v0.3.0

type TooManyRequestsError struct {
	// contains filtered or unexported fields
}

429 Error

func (TooManyRequestsError) Body added in v0.3.0

func (e TooManyRequestsError) Body() []byte

func (TooManyRequestsError) Error added in v0.3.0

func (e TooManyRequestsError) Error() string

type Track

type Track struct {
	Id               string  `json:"id,omitempty"`
	Type             string  `json:"type,omitempty"`
	Duration         float64 `json:"duration,omitempty"`
	MaxWidth         int64   `json:"max_width,omitempty"`
	MaxHeight        int64   `json:"max_height,omitempty"`
	MaxFrameRate     float64 `json:"max_frame_rate,omitempty"`
	MaxChannels      int64   `json:"max_channels,omitempty"`
	MaxChannelLayout string  `json:"max_channel_layout,omitempty"`
	TextType         string  `json:"text_type,omitempty"`
	LanguageCode     string  `json:"language_code,omitempty"`
	Name             string  `json:"name,omitempty"`
	ClosedCaptions   bool    `json:"closed_captions,omitempty"`
	Passthrough      string  `json:"passthrough,omitempty"`
}

type URLSigningKeysApiService

type URLSigningKeysApiService service

func (*URLSigningKeysApiService) CreateUrlSigningKey

func (a *URLSigningKeysApiService) CreateUrlSigningKey(opts ...APIOption) (SigningKeyResponse, error)

func (*URLSigningKeysApiService) DeleteUrlSigningKey

func (a *URLSigningKeysApiService) DeleteUrlSigningKey(sIGNINGKEYID string, opts ...APIOption) error

func (*URLSigningKeysApiService) GetUrlSigningKey

func (a *URLSigningKeysApiService) GetUrlSigningKey(sIGNINGKEYID string, opts ...APIOption) (SigningKeyResponse, error)

func (*URLSigningKeysApiService) ListUrlSigningKeys

func (a *URLSigningKeysApiService) ListUrlSigningKeys(opts ...APIOption) (ListSigningKeysResponse, error)

ListUrlSigningKeys optionally accepts the APIOption of WithParams(*ListUrlSigningKeysParams).

type UnauthorizedError added in v0.3.0

type UnauthorizedError struct {
	// contains filtered or unexported fields
}

401 Error

func (UnauthorizedError) Body added in v0.3.0

func (e UnauthorizedError) Body() []byte

func (UnauthorizedError) Error added in v0.3.0

func (e UnauthorizedError) Error() string

type UpdateAssetMasterAccessRequest added in v0.7.0

type UpdateAssetMasterAccessRequest struct {
	// Add or remove access to the master version of the video.
	MasterAccess string `json:"master_access,omitempty"`
}

type UpdateAssetMp4SupportRequest

type UpdateAssetMp4SupportRequest struct {
	// String value for the level of mp4 support
	Mp4Support string `json:"mp4_support,omitempty"`
}

type Upload

type Upload struct {
	Id string `json:"id,omitempty"`
	// Max time in seconds for the signed upload URL to be valid. If a successful upload has not occurred before the timeout limit, the direct upload is marked `timed_out`
	Timeout          int32  `json:"timeout,omitempty"`
	Status           string `json:"status,omitempty"`
	NewAssetSettings Asset  `json:"new_asset_settings,omitempty"`
	// Only set once the upload is in the `asset_created` state.
	AssetId string      `json:"asset_id,omitempty"`
	Error   UploadError `json:"error,omitempty"`
	// If the upload URL will be used in a browser, you must specify the origin in order for the signed URL to have the correct CORS headers.
	CorsOrigin string `json:"cors_origin,omitempty"`
	// The URL to upload the associated source media to.
	Url  string `json:"url,omitempty"`
	Test bool   `json:"test,omitempty"`
}

type UploadError

type UploadError struct {
	Type    string `json:"type,omitempty"`
	Message string `json:"message,omitempty"`
}

Only set if an error occurred during asset creation.

type UploadResponse

type UploadResponse struct {
	Data Upload `json:"data,omitempty"`
}

type VideoView

type VideoView struct {
	ViewTotalUpscaling             string           `json:"view_total_upscaling,omitempty"`
	PrerollAdAssetHostname         string           `json:"preroll_ad_asset_hostname,omitempty"`
	PlayerSourceDomain             string           `json:"player_source_domain,omitempty"`
	Region                         string           `json:"region,omitempty"`
	ViewerUserAgent                string           `json:"viewer_user_agent,omitempty"`
	PrerollRequested               bool             `json:"preroll_requested,omitempty"`
	PageType                       string           `json:"page_type,omitempty"`
	StartupScore                   string           `json:"startup_score,omitempty"`
	ViewSeekDuration               string           `json:"view_seek_duration,omitempty"`
	CountryName                    string           `json:"country_name,omitempty"`
	PlayerSourceHeight             int32            `json:"player_source_height,omitempty"`
	Longitude                      string           `json:"longitude,omitempty"`
	BufferingCount                 string           `json:"buffering_count,omitempty"`
	VideoDuration                  string           `json:"video_duration,omitempty"`
	PlayerSourceType               string           `json:"player_source_type,omitempty"`
	City                           string           `json:"city,omitempty"`
	ViewId                         string           `json:"view_id,omitempty"`
	PlatformDescription            string           `json:"platform_description,omitempty"`
	VideoStartupPrerollRequestTime string           `json:"video_startup_preroll_request_time,omitempty"`
	ViewerDeviceName               string           `json:"viewer_device_name,omitempty"`
	VideoSeries                    string           `json:"video_series,omitempty"`
	ViewerApplicationName          string           `json:"viewer_application_name,omitempty"`
	UpdatedAt                      string           `json:"updated_at,omitempty"`
	ViewTotalContentPlaybackTime   string           `json:"view_total_content_playback_time,omitempty"`
	Cdn                            string           `json:"cdn,omitempty"`
	PlayerInstanceId               string           `json:"player_instance_id,omitempty"`
	VideoLanguage                  string           `json:"video_language,omitempty"`
	PlayerSourceWidth              int32            `json:"player_source_width,omitempty"`
	PlayerErrorMessage             string           `json:"player_error_message,omitempty"`
	PlayerMuxPluginVersion         string           `json:"player_mux_plugin_version,omitempty"`
	Watched                        bool             `json:"watched,omitempty"`
	PlaybackScore                  string           `json:"playback_score,omitempty"`
	PageUrl                        string           `json:"page_url,omitempty"`
	Metro                          string           `json:"metro,omitempty"`
	ViewMaxRequestLatency          string           `json:"view_max_request_latency,omitempty"`
	RequestsForFirstPreroll        string           `json:"requests_for_first_preroll,omitempty"`
	ViewTotalDownscaling           string           `json:"view_total_downscaling,omitempty"`
	Latitude                       string           `json:"latitude,omitempty"`
	PlayerSourceHostName           string           `json:"player_source_host_name,omitempty"`
	InsertedAt                     string           `json:"inserted_at,omitempty"`
	ViewEnd                        string           `json:"view_end,omitempty"`
	MuxEmbedVersion                string           `json:"mux_embed_version,omitempty"`
	PlayerLanguage                 string           `json:"player_language,omitempty"`
	PageLoadTime                   int32            `json:"page_load_time,omitempty"`
	ViewerDeviceCategory           string           `json:"viewer_device_category,omitempty"`
	VideoStartupPrerollLoadTime    string           `json:"video_startup_preroll_load_time,omitempty"`
	PlayerVersion                  string           `json:"player_version,omitempty"`
	WatchTime                      int32            `json:"watch_time,omitempty"`
	PlayerSourceStreamType         string           `json:"player_source_stream_type,omitempty"`
	PrerollAdTagHostname           string           `json:"preroll_ad_tag_hostname,omitempty"`
	ViewerDeviceManufacturer       string           `json:"viewer_device_manufacturer,omitempty"`
	RebufferingScore               string           `json:"rebuffering_score,omitempty"`
	ExperimentName                 string           `json:"experiment_name,omitempty"`
	ViewerOsVersion                string           `json:"viewer_os_version,omitempty"`
	PlayerPreload                  bool             `json:"player_preload,omitempty"`
	BufferingDuration              string           `json:"buffering_duration,omitempty"`
	PlayerViewCount                int32            `json:"player_view_count,omitempty"`
	PlayerSoftware                 string           `json:"player_software,omitempty"`
	PlayerLoadTime                 string           `json:"player_load_time,omitempty"`
	PlatformSummary                string           `json:"platform_summary,omitempty"`
	VideoEncodingVariant           string           `json:"video_encoding_variant,omitempty"`
	PlayerWidth                    int32            `json:"player_width,omitempty"`
	ViewSeekCount                  string           `json:"view_seek_count,omitempty"`
	ViewerExperienceScore          string           `json:"viewer_experience_score,omitempty"`
	ViewErrorId                    int32            `json:"view_error_id,omitempty"`
	VideoVariantName               string           `json:"video_variant_name,omitempty"`
	PrerollPlayed                  bool             `json:"preroll_played,omitempty"`
	ViewerApplicationEngine        string           `json:"viewer_application_engine,omitempty"`
	ViewerOsArchitecture           string           `json:"viewer_os_architecture,omitempty"`
	PlayerErrorCode                string           `json:"player_error_code,omitempty"`
	BufferingRate                  string           `json:"buffering_rate,omitempty"`
	Events                         []VideoViewEvent `json:"events,omitempty"`
	PlayerName                     string           `json:"player_name,omitempty"`
	ViewStart                      string           `json:"view_start,omitempty"`
	ViewAverageRequestThroughput   string           `json:"view_average_request_throughput,omitempty"`
	VideoProducer                  string           `json:"video_producer,omitempty"`
	ErrorTypeId                    int32            `json:"error_type_id,omitempty"`
	MuxViewerId                    string           `json:"mux_viewer_id,omitempty"`
	VideoId                        string           `json:"video_id,omitempty"`
	ContinentCode                  string           `json:"continent_code,omitempty"`
	SessionId                      string           `json:"session_id,omitempty"`
	ExitBeforeVideoStart           bool             `json:"exit_before_video_start,omitempty"`
	VideoContentType               string           `json:"video_content_type,omitempty"`
	ViewerOsFamily                 string           `json:"viewer_os_family,omitempty"`
	PlayerPoster                   string           `json:"player_poster,omitempty"`
	ViewAverageRequestLatency      string           `json:"view_average_request_latency,omitempty"`
	VideoVariantId                 string           `json:"video_variant_id,omitempty"`
	PlayerSourceDuration           int32            `json:"player_source_duration,omitempty"`
	PlayerSourceUrl                string           `json:"player_source_url,omitempty"`
	MuxApiVersion                  string           `json:"mux_api_version,omitempty"`
	VideoTitle                     string           `json:"video_title,omitempty"`
	Id                             string           `json:"id,omitempty"`
	ShortTime                      string           `json:"short_time,omitempty"`
	RebufferPercentage             string           `json:"rebuffer_percentage,omitempty"`
	TimeToFirstFrame               string           `json:"time_to_first_frame,omitempty"`
	ViewerUserId                   string           `json:"viewer_user_id,omitempty"`
	VideoStreamType                string           `json:"video_stream_type,omitempty"`
	PlayerStartupTime              int32            `json:"player_startup_time,omitempty"`
	ViewerApplicationVersion       string           `json:"viewer_application_version,omitempty"`
	ViewMaxDownscalePercentage     string           `json:"view_max_downscale_percentage,omitempty"`
	ViewMaxUpscalePercentage       string           `json:"view_max_upscale_percentage,omitempty"`
	CountryCode                    string           `json:"country_code,omitempty"`
	UsedFullscreen                 bool             `json:"used_fullscreen,omitempty"`
	Isp                            string           `json:"isp,omitempty"`
	PropertyId                     int32            `json:"property_id,omitempty"`
	PlayerAutoplay                 bool             `json:"player_autoplay,omitempty"`
	PlayerHeight                   int32            `json:"player_height,omitempty"`
	Asn                            int32            `json:"asn,omitempty"`
	QualityScore                   string           `json:"quality_score,omitempty"`
	PlayerSoftwareVersion          string           `json:"player_software_version,omitempty"`
}

type VideoViewEvent

type VideoViewEvent struct {
	ViewerTime   int64  `json:"viewer_time,omitempty"`
	PlaybackTime int64  `json:"playback_time,omitempty"`
	Name         string `json:"name,omitempty"`
	EventTime    int64  `json:"event_time,omitempty"`
}

type VideoViewResponse

type VideoViewResponse struct {
	Data      VideoView `json:"data,omitempty"`
	Timeframe []int64   `json:"timeframe,omitempty"`
}

type VideoViewsApiService

type VideoViewsApiService service

func (*VideoViewsApiService) GetVideoView

func (a *VideoViewsApiService) GetVideoView(vIDEOVIEWID string, opts ...APIOption) (VideoViewResponse, error)

func (*VideoViewsApiService) ListVideoViews

func (a *VideoViewsApiService) ListVideoViews(opts ...APIOption) (ListVideoViewsResponse, error)

ListVideoViews optionally accepts the APIOption of WithParams(*ListVideoViewsParams).

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL