From 7c875c278d334a980dc2c1f570c30d86d16a9a39 Mon Sep 17 00:00:00 2001 From: olivierapivideo Date: Mon, 29 Jul 2024 15:47:12 +0000 Subject: [PATCH] Add new analytics endpoints & livestream complete() --- .openapi-generator/FILES | 78 +-- .../oas_apivideo.yaml-defaut-cli.sha256 | 2 +- CHANGELOG.md | 4 + README.md | 32 +- ... => AnalyticsAggregatedMetricsResponse.md} | 7 +- ...alyticsAggregatedMetricsResponseContext.md | 12 + ...gregatedMetricsResponseContextTimeframe.md | 12 + docs/AnalyticsApi.md | 164 +++-- docs/AnalyticsMetricsBreakdownResponse.md | 12 + ...nalyticsMetricsBreakdownResponseContext.md | 12 + docs/AnalyticsMetricsBreakdownResponseData.md | 11 + docs/AnalyticsMetricsOverTimeResponse.md | 12 + ...AnalyticsMetricsOverTimeResponseContext.md | 12 + docs/AnalyticsMetricsOverTimeResponseData.md | 11 + docs/FilterBy.md | 17 + docs/FilterBy1.md | 17 + docs/FilterBy2.md | 17 + docs/LiveStream.md | 4 +- docs/LiveStreamCreationPayload.md | 4 +- docs/LiveStreamSession.md | 15 - docs/LiveStreamSessionClient.md | 13 - docs/LiveStreamSessionDevice.md | 13 - docs/LiveStreamSessionReferrer.md | 13 - docs/LiveStreamSessionSession.md | 12 - docs/LiveStreamUpdatePayload.md | 4 +- docs/LiveStreamsApi.md | 68 ++ docs/RestreamsRequestObject.md | 2 +- docs/RestreamsResponseObject.md | 2 +- ...nLocation.md => UnrecognizedRequestUrl.md} | 8 +- docs/VideoCreationPayload.md | 2 +- docs/VideoSession.md | 15 - docs/VideoSessionClient.md | 13 - docs/VideoSessionDevice.md | 13 - docs/VideoSessionOs.md | 13 - docs/VideoSessionReferrer.md | 13 - docs/VideoSessionSession.md | 13 - src/Api/AnalyticsApi.cs | 661 +++++++++++++----- src/Api/CaptionsApi.cs | 4 +- src/Api/ChaptersApi.cs | 4 +- src/Api/LiveStreamsApi.cs | 142 +++- src/Api/PlayerThemesApi.cs | 8 +- src/Api/UploadTokensApi.cs | 4 +- src/Api/VideosApi.cs | 4 +- src/Api/WatermarksApi.cs | 4 +- src/Api/WebhooksApi.cs | 4 +- src/ApiVideo.csproj | 2 +- src/Client/ApiClient.cs | 26 +- src/Model/AccessToken.cs | 2 +- src/Model/AdditionalBadRequestErrors.cs | 2 +- ... => AnalyticsAggregatedMetricsResponse.cs} | 28 +- ...alyticsAggregatedMetricsResponseContext.cs | 60 ++ ...gregatedMetricsResponseContextTimeframe.cs | 53 ++ src/Model/AnalyticsData.cs | 2 +- .../AnalyticsMetricsBreakdownResponse.cs | 59 ++ ...nalyticsMetricsBreakdownResponseContext.cs | 60 ++ .../AnalyticsMetricsBreakdownResponseData.cs | 53 ++ src/Model/AnalyticsMetricsOverTimeResponse.cs | 59 ++ ...AnalyticsMetricsOverTimeResponseContext.cs | 60 ++ .../AnalyticsMetricsOverTimeResponseData.cs | 53 ++ src/Model/AnalyticsPlays400Error.cs | 2 +- src/Model/AnalyticsPlaysResponse.cs | 2 +- src/Model/AuthenticatePayload.cs | 2 +- src/Model/BadRequest.cs | 2 +- src/Model/BytesRange.cs | 2 +- src/Model/Caption.cs | 2 +- src/Model/CaptionsListResponse.cs | 2 +- src/Model/CaptionsUpdatePayload.cs | 2 +- src/Model/Chapter.cs | 2 +- src/Model/ChaptersListResponse.cs | 2 +- src/Model/DeepObject.cs | 4 + src/Model/FilterBy.cs | 100 +++ src/Model/FilterBy1.cs | 100 +++ src/Model/FilterBy2.cs | 100 +++ src/Model/Link.cs | 2 +- src/Model/LiveStream.cs | 10 +- src/Model/LiveStreamAssets.cs | 2 +- src/Model/LiveStreamCreationPayload.cs | 10 +- src/Model/LiveStreamListResponse.cs | 2 +- src/Model/LiveStreamSession.cs | 79 --- src/Model/LiveStreamSessionClient.cs | 61 -- src/Model/LiveStreamSessionDevice.cs | 61 -- src/Model/LiveStreamSessionLocation.cs | 53 -- src/Model/LiveStreamSessionReferrer.cs | 69 -- src/Model/LiveStreamSessionSession.cs | 61 -- src/Model/LiveStreamUpdatePayload.cs | 10 +- src/Model/Metadata.cs | 2 +- src/Model/Model403ErrorSchema.cs | 2 +- src/Model/NotFound.cs | 2 +- src/Model/Pagination.cs | 2 +- src/Model/PaginationLink.cs | 2 +- src/Model/PlayerSessionEvent.cs | 2 +- src/Model/PlayerTheme.cs | 2 +- src/Model/PlayerThemeAssets.cs | 2 +- src/Model/PlayerThemeCreationPayload.cs | 2 +- src/Model/PlayerThemeUpdatePayload.cs | 2 +- src/Model/PlayerThemesListResponse.cs | 2 +- src/Model/Quality.cs | 2 +- src/Model/RefreshTokenPayload.cs | 2 +- src/Model/RestreamsRequestObject.cs | 6 +- src/Model/RestreamsResponseObject.cs | 6 +- src/Model/TokenCreationPayload.cs | 2 +- src/Model/TokenListResponse.cs | 2 +- src/Model/TooManyRequests.cs | 2 +- ...ionDevice.cs => UnrecognizedRequestUrl.cs} | 34 +- src/Model/UploadToken.cs | 2 +- src/Model/Video.cs | 2 +- src/Model/VideoAssets.cs | 2 +- src/Model/VideoClip.cs | 2 +- src/Model/VideoCreationPayload.cs | 6 +- src/Model/VideoSession.cs | 79 --- src/Model/VideoSessionClient.cs | 61 -- src/Model/VideoSessionOs.cs | 61 -- src/Model/VideoSessionReferrer.cs | 69 -- src/Model/VideoSessionSession.cs | 69 -- src/Model/VideoSource.cs | 2 +- src/Model/VideoSourceLiveStream.cs | 2 +- src/Model/VideoSourceLiveStreamLink.cs | 2 +- src/Model/VideoStatus.cs | 2 +- src/Model/VideoStatusEncoding.cs | 2 +- src/Model/VideoStatusEncodingMetadata.cs | 2 +- src/Model/VideoStatusIngest.cs | 2 +- src/Model/VideoStatusIngestReceivedParts.cs | 2 +- src/Model/VideoThumbnailPickPayload.cs | 2 +- src/Model/VideoUpdatePayload.cs | 2 +- src/Model/VideoWatermark.cs | 2 +- src/Model/VideosListResponse.cs | 2 +- src/Model/Watermark.cs | 2 +- src/Model/WatermarksListResponse.cs | 2 +- src/Model/Webhook.cs | 2 +- src/Model/WebhooksCreationPayload.cs | 2 +- src/Model/WebhooksListResponse.cs | 2 +- .../authenticate/responses/400.json | 2 +- .../refresh/responses/400.json | 2 +- .../getAggregatedMetrics/responses/200.json | 11 + .../responses/400-0.json | 2 +- .../responses/400-1.json} | 4 +- .../getAggregatedMetrics/responses/404.json | 5 + .../responses/429.json | 0 .../getLiveStreamsPlays/responses/200-0.json | 29 - .../getLiveStreamsPlays/responses/200-1.json | 29 - .../getLiveStreamsPlays/responses/200-2.json | 29 - .../getLiveStreamsPlays/responses/400-1.json | 7 - .../getLiveStreamsPlays/responses/400-2.json | 7 - .../getLiveStreamsPlays/responses/400-3.json | 7 - .../getLiveStreamsPlays/responses/400-4.json | 7 - .../getLiveStreamsPlays/responses/403.json | 5 - .../getLiveStreamsPlays/responses/404.json | 3 - .../getMetricsBreakdown/responses/200.json | 31 + .../responses/400-0.json | 2 +- .../responses/400-1.json} | 4 +- .../getMetricsBreakdown/responses/404.json | 5 + .../responses/429.json | 0 .../getMetricsOverTime/responses/200.json | 37 + .../getMetricsOverTime/responses/400-0.json | 7 + .../responses/400-1.json | 4 +- .../getMetricsOverTime/responses/404.json | 5 + .../getMetricsOverTime/responses/429.json | 5 + .../getVideosPlays/responses/200-0.json | 29 - .../getVideosPlays/responses/200-1.json | 32 - .../getVideosPlays/responses/200-2.json | 29 - .../getVideosPlays/responses/400-2.json | 7 - .../getVideosPlays/responses/400-3.json | 7 - .../getVideosPlays/responses/400-4.json | 7 - .../getVideosPlays/responses/403.json | 5 - .../getVideosPlays/responses/404.json | 3 - .../livestreams/complete/responses/404.json | 6 + .../livestreams/complete/responses/429.json | 5 + .../livestreams/create/responses/400-1.json | 2 +- .../livestreams/create/responses/400-2.json | 2 +- .../deleteThumbnail/responses/404.json | 2 +- .../livestreams/update/responses/400-1.json | 2 +- .../livestreams/update/responses/400-2.json | 2 +- .../uploadThumbnail/responses/400.json | 2 +- .../uploadThumbnail/responses/404.json | 2 +- .../playerthemes/delete/responses/404.json | 2 +- .../deleteLogo/responses/404.json | 2 +- .../playerthemes/get/responses/404.json | 2 +- .../playerthemes/update/responses/404.json | 2 +- .../uploadLogo/responses/400.json | 2 +- .../uploadLogo/responses/404.json | 2 +- .../payloads/videos/create/responses/400.json | 10 +- .../payloads/videos/delete/responses/404.json | 2 +- .../payloads/videos/get/responses/404.json | 2 +- .../videos/getStatus/responses/404.json | 2 +- .../videos/pickThumbnail/responses/404.json | 2 +- .../payloads/videos/update/responses/400.json | 8 +- .../payloads/videos/update/responses/404.json | 2 +- .../payloads/videos/upload/responses/400.json | 10 +- .../payloads/videos/upload/responses/404.json | 2 +- .../videos/uploadThumbnail/responses/400.json | 2 +- .../videos/uploadThumbnail/responses/404.json | 2 +- .../watermarks/delete/responses/404.json | 2 +- .../watermarks/upload/responses/400.json | 2 +- .../webhooks/create/responses/400.json | 8 +- .../webhooks/delete/responses/404.json | 2 +- 195 files changed, 2112 insertions(+), 1586 deletions(-) rename docs/{VideoSessionLocation.md => AnalyticsAggregatedMetricsResponse.md} (58%) create mode 100644 docs/AnalyticsAggregatedMetricsResponseContext.md create mode 100644 docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md create mode 100644 docs/AnalyticsMetricsBreakdownResponse.md create mode 100644 docs/AnalyticsMetricsBreakdownResponseContext.md create mode 100644 docs/AnalyticsMetricsBreakdownResponseData.md create mode 100644 docs/AnalyticsMetricsOverTimeResponse.md create mode 100644 docs/AnalyticsMetricsOverTimeResponseContext.md create mode 100644 docs/AnalyticsMetricsOverTimeResponseData.md create mode 100644 docs/FilterBy.md create mode 100644 docs/FilterBy1.md create mode 100644 docs/FilterBy2.md delete mode 100644 docs/LiveStreamSession.md delete mode 100644 docs/LiveStreamSessionClient.md delete mode 100644 docs/LiveStreamSessionDevice.md delete mode 100644 docs/LiveStreamSessionReferrer.md delete mode 100644 docs/LiveStreamSessionSession.md rename docs/{LiveStreamSessionLocation.md => UnrecognizedRequestUrl.md} (51%) delete mode 100644 docs/VideoSession.md delete mode 100644 docs/VideoSessionClient.md delete mode 100644 docs/VideoSessionDevice.md delete mode 100644 docs/VideoSessionOs.md delete mode 100644 docs/VideoSessionReferrer.md delete mode 100644 docs/VideoSessionSession.md rename src/Model/{VideoSessionLocation.cs => AnalyticsAggregatedMetricsResponse.cs} (56%) create mode 100644 src/Model/AnalyticsAggregatedMetricsResponseContext.cs create mode 100644 src/Model/AnalyticsAggregatedMetricsResponseContextTimeframe.cs create mode 100644 src/Model/AnalyticsMetricsBreakdownResponse.cs create mode 100644 src/Model/AnalyticsMetricsBreakdownResponseContext.cs create mode 100644 src/Model/AnalyticsMetricsBreakdownResponseData.cs create mode 100644 src/Model/AnalyticsMetricsOverTimeResponse.cs create mode 100644 src/Model/AnalyticsMetricsOverTimeResponseContext.cs create mode 100644 src/Model/AnalyticsMetricsOverTimeResponseData.cs create mode 100644 src/Model/DeepObject.cs create mode 100644 src/Model/FilterBy.cs create mode 100644 src/Model/FilterBy1.cs create mode 100644 src/Model/FilterBy2.cs delete mode 100644 src/Model/LiveStreamSession.cs delete mode 100644 src/Model/LiveStreamSessionClient.cs delete mode 100644 src/Model/LiveStreamSessionDevice.cs delete mode 100644 src/Model/LiveStreamSessionLocation.cs delete mode 100644 src/Model/LiveStreamSessionReferrer.cs delete mode 100644 src/Model/LiveStreamSessionSession.cs rename src/Model/{VideoSessionDevice.cs => UnrecognizedRequestUrl.cs} (53%) delete mode 100644 src/Model/VideoSession.cs delete mode 100644 src/Model/VideoSessionClient.cs delete mode 100644 src/Model/VideoSessionOs.cs delete mode 100644 src/Model/VideoSessionReferrer.cs delete mode 100644 src/Model/VideoSessionSession.cs create mode 100644 tests/resources/payloads/analytics/getAggregatedMetrics/responses/200.json rename tests/resources/payloads/analytics/{getLiveStreamsPlays => getAggregatedMetrics}/responses/400-0.json (88%) rename tests/resources/payloads/analytics/{getVideosPlays/responses/400-5.json => getAggregatedMetrics/responses/400-1.json} (61%) create mode 100644 tests/resources/payloads/analytics/getAggregatedMetrics/responses/404.json rename tests/resources/payloads/analytics/{getLiveStreamsPlays => getAggregatedMetrics}/responses/429.json (100%) delete mode 100644 tests/resources/payloads/analytics/getLiveStreamsPlays/responses/200-0.json delete mode 100644 tests/resources/payloads/analytics/getLiveStreamsPlays/responses/200-1.json delete mode 100644 tests/resources/payloads/analytics/getLiveStreamsPlays/responses/200-2.json delete mode 100644 tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-1.json delete mode 100644 tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-2.json delete mode 100644 tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-3.json delete mode 100644 tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-4.json delete mode 100644 tests/resources/payloads/analytics/getLiveStreamsPlays/responses/403.json delete mode 100644 tests/resources/payloads/analytics/getLiveStreamsPlays/responses/404.json create mode 100644 tests/resources/payloads/analytics/getMetricsBreakdown/responses/200.json rename tests/resources/payloads/analytics/{getVideosPlays => getMetricsBreakdown}/responses/400-0.json (88%) rename tests/resources/payloads/analytics/{getLiveStreamsPlays/responses/400-5.json => getMetricsBreakdown/responses/400-1.json} (61%) create mode 100644 tests/resources/payloads/analytics/getMetricsBreakdown/responses/404.json rename tests/resources/payloads/analytics/{getVideosPlays => getMetricsBreakdown}/responses/429.json (100%) create mode 100644 tests/resources/payloads/analytics/getMetricsOverTime/responses/200.json create mode 100644 tests/resources/payloads/analytics/getMetricsOverTime/responses/400-0.json rename tests/resources/payloads/analytics/{getVideosPlays => getMetricsOverTime}/responses/400-1.json (58%) create mode 100644 tests/resources/payloads/analytics/getMetricsOverTime/responses/404.json create mode 100644 tests/resources/payloads/analytics/getMetricsOverTime/responses/429.json delete mode 100644 tests/resources/payloads/analytics/getVideosPlays/responses/200-0.json delete mode 100644 tests/resources/payloads/analytics/getVideosPlays/responses/200-1.json delete mode 100644 tests/resources/payloads/analytics/getVideosPlays/responses/200-2.json delete mode 100644 tests/resources/payloads/analytics/getVideosPlays/responses/400-2.json delete mode 100644 tests/resources/payloads/analytics/getVideosPlays/responses/400-3.json delete mode 100644 tests/resources/payloads/analytics/getVideosPlays/responses/400-4.json delete mode 100644 tests/resources/payloads/analytics/getVideosPlays/responses/403.json delete mode 100644 tests/resources/payloads/analytics/getVideosPlays/responses/404.json create mode 100644 tests/resources/payloads/livestreams/complete/responses/404.json create mode 100644 tests/resources/payloads/livestreams/complete/responses/429.json diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 5243e11..5866009 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -7,8 +7,17 @@ build.sh docs/AccessToken.md docs/AdditionalBadRequestErrors.md docs/AdvancedAuthenticationApi.md +docs/AnalyticsAggregatedMetricsResponse.md +docs/AnalyticsAggregatedMetricsResponseContext.md +docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md docs/AnalyticsApi.md docs/AnalyticsData.md +docs/AnalyticsMetricsBreakdownResponse.md +docs/AnalyticsMetricsBreakdownResponseContext.md +docs/AnalyticsMetricsBreakdownResponseData.md +docs/AnalyticsMetricsOverTimeResponse.md +docs/AnalyticsMetricsOverTimeResponseContext.md +docs/AnalyticsMetricsOverTimeResponseData.md docs/AnalyticsPlays400Error.md docs/AnalyticsPlaysResponse.md docs/AuthenticatePayload.md @@ -21,17 +30,14 @@ docs/CaptionsUpdatePayload.md docs/Chapter.md docs/ChaptersApi.md docs/ChaptersListResponse.md +docs/FilterBy.md +docs/FilterBy1.md +docs/FilterBy2.md docs/Link.md docs/LiveStream.md docs/LiveStreamAssets.md docs/LiveStreamCreationPayload.md docs/LiveStreamListResponse.md -docs/LiveStreamSession.md -docs/LiveStreamSessionClient.md -docs/LiveStreamSessionDevice.md -docs/LiveStreamSessionLocation.md -docs/LiveStreamSessionReferrer.md -docs/LiveStreamSessionSession.md docs/LiveStreamUpdatePayload.md docs/LiveStreamsApi.md docs/Metadata.md @@ -54,19 +60,13 @@ docs/RestreamsResponseObject.md docs/TokenCreationPayload.md docs/TokenListResponse.md docs/TooManyRequests.md +docs/UnrecognizedRequestUrl.md docs/UploadToken.md docs/UploadTokensApi.md docs/Video.md docs/VideoAssets.md docs/VideoClip.md docs/VideoCreationPayload.md -docs/VideoSession.md -docs/VideoSessionClient.md -docs/VideoSessionDevice.md -docs/VideoSessionLocation.md -docs/VideoSessionOs.md -docs/VideoSessionReferrer.md -docs/VideoSessionSession.md docs/VideoSource.md docs/VideoSourceLiveStream.md docs/VideoSourceLiveStreamLink.md @@ -103,7 +103,16 @@ src/ApiVideo.Test/Api/WebhooksApiTests.cs src/ApiVideo.Test/ApiVideo.Test.csproj src/ApiVideo.Test/Model/AccessTokenTests.cs src/ApiVideo.Test/Model/AdditionalBadRequestErrorsTests.cs +src/ApiVideo.Test/Model/AnalyticsAggregatedMetricsResponseContextTests.cs +src/ApiVideo.Test/Model/AnalyticsAggregatedMetricsResponseContextTimeframeTests.cs +src/ApiVideo.Test/Model/AnalyticsAggregatedMetricsResponseTests.cs src/ApiVideo.Test/Model/AnalyticsDataTests.cs +src/ApiVideo.Test/Model/AnalyticsMetricsBreakdownResponseContextTests.cs +src/ApiVideo.Test/Model/AnalyticsMetricsBreakdownResponseDataTests.cs +src/ApiVideo.Test/Model/AnalyticsMetricsBreakdownResponseTests.cs +src/ApiVideo.Test/Model/AnalyticsMetricsOverTimeResponseContextTests.cs +src/ApiVideo.Test/Model/AnalyticsMetricsOverTimeResponseDataTests.cs +src/ApiVideo.Test/Model/AnalyticsMetricsOverTimeResponseTests.cs src/ApiVideo.Test/Model/AnalyticsPlays400ErrorTests.cs src/ApiVideo.Test/Model/AnalyticsPlaysResponseTests.cs src/ApiVideo.Test/Model/AuthenticatePayloadTests.cs @@ -114,16 +123,13 @@ src/ApiVideo.Test/Model/CaptionsListResponseTests.cs src/ApiVideo.Test/Model/CaptionsUpdatePayloadTests.cs src/ApiVideo.Test/Model/ChapterTests.cs src/ApiVideo.Test/Model/ChaptersListResponseTests.cs +src/ApiVideo.Test/Model/FilterBy1Tests.cs +src/ApiVideo.Test/Model/FilterBy2Tests.cs +src/ApiVideo.Test/Model/FilterByTests.cs src/ApiVideo.Test/Model/LinkTests.cs src/ApiVideo.Test/Model/LiveStreamAssetsTests.cs src/ApiVideo.Test/Model/LiveStreamCreationPayloadTests.cs src/ApiVideo.Test/Model/LiveStreamListResponseTests.cs -src/ApiVideo.Test/Model/LiveStreamSessionClientTests.cs -src/ApiVideo.Test/Model/LiveStreamSessionDeviceTests.cs -src/ApiVideo.Test/Model/LiveStreamSessionLocationTests.cs -src/ApiVideo.Test/Model/LiveStreamSessionReferrerTests.cs -src/ApiVideo.Test/Model/LiveStreamSessionSessionTests.cs -src/ApiVideo.Test/Model/LiveStreamSessionTests.cs src/ApiVideo.Test/Model/LiveStreamTests.cs src/ApiVideo.Test/Model/LiveStreamUpdatePayloadTests.cs src/ApiVideo.Test/Model/MetadataTests.cs @@ -144,17 +150,11 @@ src/ApiVideo.Test/Model/RestreamsResponseObjectTests.cs src/ApiVideo.Test/Model/TokenCreationPayloadTests.cs src/ApiVideo.Test/Model/TokenListResponseTests.cs src/ApiVideo.Test/Model/TooManyRequestsTests.cs +src/ApiVideo.Test/Model/UnrecognizedRequestUrlTests.cs src/ApiVideo.Test/Model/UploadTokenTests.cs src/ApiVideo.Test/Model/VideoAssetsTests.cs src/ApiVideo.Test/Model/VideoClipTests.cs src/ApiVideo.Test/Model/VideoCreationPayloadTests.cs -src/ApiVideo.Test/Model/VideoSessionClientTests.cs -src/ApiVideo.Test/Model/VideoSessionDeviceTests.cs -src/ApiVideo.Test/Model/VideoSessionLocationTests.cs -src/ApiVideo.Test/Model/VideoSessionOsTests.cs -src/ApiVideo.Test/Model/VideoSessionReferrerTests.cs -src/ApiVideo.Test/Model/VideoSessionSessionTests.cs -src/ApiVideo.Test/Model/VideoSessionTests.cs src/ApiVideo.Test/Model/VideoSourceLiveStreamLinkTests.cs src/ApiVideo.Test/Model/VideoSourceLiveStreamTests.cs src/ApiVideo.Test/Model/VideoSourceTests.cs @@ -195,7 +195,16 @@ src/ApiVideo/Client/EmptyArrayFixTypeConverter.cs src/ApiVideo/Client/NullableStringTypeConverter.cs src/ApiVideo/Model/AccessToken.cs src/ApiVideo/Model/AdditionalBadRequestErrors.cs +src/ApiVideo/Model/AnalyticsAggregatedMetricsResponse.cs +src/ApiVideo/Model/AnalyticsAggregatedMetricsResponseContext.cs +src/ApiVideo/Model/AnalyticsAggregatedMetricsResponseContextTimeframe.cs src/ApiVideo/Model/AnalyticsData.cs +src/ApiVideo/Model/AnalyticsMetricsBreakdownResponse.cs +src/ApiVideo/Model/AnalyticsMetricsBreakdownResponseContext.cs +src/ApiVideo/Model/AnalyticsMetricsBreakdownResponseData.cs +src/ApiVideo/Model/AnalyticsMetricsOverTimeResponse.cs +src/ApiVideo/Model/AnalyticsMetricsOverTimeResponseContext.cs +src/ApiVideo/Model/AnalyticsMetricsOverTimeResponseData.cs src/ApiVideo/Model/AnalyticsPlays400Error.cs src/ApiVideo/Model/AnalyticsPlaysResponse.cs src/ApiVideo/Model/AuthenticatePayload.cs @@ -206,6 +215,9 @@ src/ApiVideo/Model/CaptionsListResponse.cs src/ApiVideo/Model/CaptionsUpdatePayload.cs src/ApiVideo/Model/Chapter.cs src/ApiVideo/Model/ChaptersListResponse.cs +src/ApiVideo/Model/FilterBy.cs +src/ApiVideo/Model/FilterBy1.cs +src/ApiVideo/Model/FilterBy2.cs src/ApiVideo/Model/IUploadPartProgressListener.cs src/ApiVideo/Model/IUploadProgressListener.cs src/ApiVideo/Model/Link.cs @@ -213,12 +225,6 @@ src/ApiVideo/Model/LiveStream.cs src/ApiVideo/Model/LiveStreamAssets.cs src/ApiVideo/Model/LiveStreamCreationPayload.cs src/ApiVideo/Model/LiveStreamListResponse.cs -src/ApiVideo/Model/LiveStreamSession.cs -src/ApiVideo/Model/LiveStreamSessionClient.cs -src/ApiVideo/Model/LiveStreamSessionDevice.cs -src/ApiVideo/Model/LiveStreamSessionLocation.cs -src/ApiVideo/Model/LiveStreamSessionReferrer.cs -src/ApiVideo/Model/LiveStreamSessionSession.cs src/ApiVideo/Model/LiveStreamUpdatePayload.cs src/ApiVideo/Model/Metadata.cs src/ApiVideo/Model/Model403ErrorSchema.cs @@ -240,18 +246,12 @@ src/ApiVideo/Model/RestreamsResponseObject.cs src/ApiVideo/Model/TokenCreationPayload.cs src/ApiVideo/Model/TokenListResponse.cs src/ApiVideo/Model/TooManyRequests.cs +src/ApiVideo/Model/UnrecognizedRequestUrl.cs src/ApiVideo/Model/UploadToken.cs src/ApiVideo/Model/Video.cs src/ApiVideo/Model/VideoAssets.cs src/ApiVideo/Model/VideoClip.cs src/ApiVideo/Model/VideoCreationPayload.cs -src/ApiVideo/Model/VideoSession.cs -src/ApiVideo/Model/VideoSessionClient.cs -src/ApiVideo/Model/VideoSessionDevice.cs -src/ApiVideo/Model/VideoSessionLocation.cs -src/ApiVideo/Model/VideoSessionOs.cs -src/ApiVideo/Model/VideoSessionReferrer.cs -src/ApiVideo/Model/VideoSessionSession.cs src/ApiVideo/Model/VideoSource.cs src/ApiVideo/Model/VideoSourceLiveStream.cs src/ApiVideo/Model/VideoSourceLiveStreamLink.cs diff --git a/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 b/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 index 644fa0c..8370c20 100644 --- a/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 +++ b/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 @@ -1 +1 @@ -d7b342ceb1a4805da9e3d6355384e34c1a99e1300d01cac3ae3218c5738f11f1 \ No newline at end of file +3637a70fc3b7f045b2927373115f2132767e3ea4ee8f19f7ffd324bb9f8eb7bf \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index c47cd13..9ed6f36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog All changes to this project will be documented in this file. +## [1.6.0] - 2024-07-29 +- Add new analytics methods +- Add livestream complete() method + ## [1.5.0] - 2024-07-19 - fix nuget package (closes \#131) - add *Async() methods (closes \#132) diff --git a/README.md b/README.md index cd8ecb4..20d35b7 100644 --- a/README.md +++ b/README.md @@ -169,8 +169,9 @@ AnalyticsApi analytics = client.Analytics() Method | HTTP request | Description ------------- | ------------- | ------------- -[**getLiveStreamsPlays**](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsApi.md#getLiveStreamsPlays) | **GET** `/analytics/live-streams/plays` | Get play events for live stream -[**getVideosPlays**](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsApi.md#getVideosPlays) | **GET** `/analytics/videos/plays` | Get play events for video +[**getAggregatedMetrics**](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsApi.md#getAggregatedMetrics) | **GET** `/data/metrics/{metric}/{aggregation}` | Retrieve aggregated metrics +[**getMetricsBreakdown**](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsApi.md#getMetricsBreakdown) | **GET** `/data/buckets/{metric}/{breakdown}` | Retrieve metrics in a breakdown of dimensions +[**getMetricsOverTime**](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsApi.md#getMetricsOverTime) | **GET** `/data/timeseries/{metric}` | Retrieve metrics over time #### CaptionsApi @@ -232,6 +233,7 @@ Method | HTTP request | Description [**list**](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamsApi.md#list) | **GET** `/live-streams` | List all live streams [**uploadThumbnail**](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamsApi.md#uploadThumbnail) | **POST** `/live-streams/{liveStreamId}/thumbnail` | Upload a thumbnail [**deleteThumbnail**](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamsApi.md#deleteThumbnail) | **DELETE** `/live-streams/{liveStreamId}/thumbnail` | Delete a thumbnail +[**complete**](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamsApi.md#complete) | **PUT** `/live-streams/{liveStreamId}/complete` | Complete a live stream #### PlayerThemesApi @@ -342,7 +344,16 @@ Method | HTTP request | Description - [AccessToken](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AccessToken.md) - [AdditionalBadRequestErrors](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AdditionalBadRequestErrors.md) + - [AnalyticsAggregatedMetricsResponse](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsAggregatedMetricsResponse.md) + - [AnalyticsAggregatedMetricsResponseContext](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsAggregatedMetricsResponseContext.md) + - [AnalyticsAggregatedMetricsResponseContextTimeframe](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md) - [AnalyticsData](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsData.md) + - [AnalyticsMetricsBreakdownResponse](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsMetricsBreakdownResponse.md) + - [AnalyticsMetricsBreakdownResponseContext](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsMetricsBreakdownResponseContext.md) + - [AnalyticsMetricsBreakdownResponseData](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsMetricsBreakdownResponseData.md) + - [AnalyticsMetricsOverTimeResponse](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsMetricsOverTimeResponse.md) + - [AnalyticsMetricsOverTimeResponseContext](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsMetricsOverTimeResponseContext.md) + - [AnalyticsMetricsOverTimeResponseData](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsMetricsOverTimeResponseData.md) - [AnalyticsPlays400Error](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsPlays400Error.md) - [AnalyticsPlaysResponse](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsPlaysResponse.md) - [AuthenticatePayload](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AuthenticatePayload.md) @@ -353,17 +364,14 @@ Method | HTTP request | Description - [CaptionsUpdatePayload](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/CaptionsUpdatePayload.md) - [Chapter](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/Chapter.md) - [ChaptersListResponse](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/ChaptersListResponse.md) + - [FilterBy](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/FilterBy.md) + - [FilterBy1](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/FilterBy1.md) + - [FilterBy2](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/FilterBy2.md) - [Link](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/Link.md) - [LiveStream](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStream.md) - [LiveStreamAssets](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamAssets.md) - [LiveStreamCreationPayload](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamCreationPayload.md) - [LiveStreamListResponse](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamListResponse.md) - - [LiveStreamSession](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamSession.md) - - [LiveStreamSessionClient](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamSessionClient.md) - - [LiveStreamSessionDevice](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamSessionDevice.md) - - [LiveStreamSessionLocation](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamSessionLocation.md) - - [LiveStreamSessionReferrer](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamSessionReferrer.md) - - [LiveStreamSessionSession](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamSessionSession.md) - [LiveStreamUpdatePayload](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamUpdatePayload.md) - [Metadata](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/Metadata.md) - [Model403ErrorSchema](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/Model403ErrorSchema.md) @@ -383,18 +391,12 @@ Method | HTTP request | Description - [TokenCreationPayload](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/TokenCreationPayload.md) - [TokenListResponse](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/TokenListResponse.md) - [TooManyRequests](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/TooManyRequests.md) + - [UnrecognizedRequestUrl](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/UnrecognizedRequestUrl.md) - [UploadToken](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/UploadToken.md) - [Video](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/Video.md) - [VideoAssets](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoAssets.md) - [VideoClip](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoClip.md) - [VideoCreationPayload](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoCreationPayload.md) - - [VideoSession](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoSession.md) - - [VideoSessionClient](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoSessionClient.md) - - [VideoSessionDevice](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoSessionDevice.md) - - [VideoSessionLocation](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoSessionLocation.md) - - [VideoSessionOs](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoSessionOs.md) - - [VideoSessionReferrer](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoSessionReferrer.md) - - [VideoSessionSession](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoSessionSession.md) - [VideoSource](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoSource.md) - [VideoSourceLiveStream](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoSourceLiveStream.md) - [VideoSourceLiveStreamLink](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoSourceLiveStreamLink.md) diff --git a/docs/VideoSessionLocation.md b/docs/AnalyticsAggregatedMetricsResponse.md similarity index 58% rename from docs/VideoSessionLocation.md rename to docs/AnalyticsAggregatedMetricsResponse.md index 2284d65..44864ec 100644 --- a/docs/VideoSessionLocation.md +++ b/docs/AnalyticsAggregatedMetricsResponse.md @@ -1,12 +1,11 @@ -# ApiVideo.Model.VideoSessionLocation -The location of the viewer. +# ApiVideo.Model.AnalyticsAggregatedMetricsResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Country** | **string** | The country of the viewer. | [optional] -**City** | **string** | The city of the viewer. | [optional] +**Context** | [**AnalyticsAggregatedMetricsResponseContext**](AnalyticsAggregatedMetricsResponseContext.md) | | +**Data** | **float** | | [[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/AnalyticsAggregatedMetricsResponseContext.md b/docs/AnalyticsAggregatedMetricsResponseContext.md new file mode 100644 index 0000000..cfcfb0d --- /dev/null +++ b/docs/AnalyticsAggregatedMetricsResponseContext.md @@ -0,0 +1,12 @@ +# ApiVideo.Model.AnalyticsAggregatedMetricsResponseContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Metric** | **string** | Returns the metric you selected. | [optional] +**Aggregation** | **string** | Returns the aggregation you selected. | [optional] +**Timeframe** | [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.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/AnalyticsAggregatedMetricsResponseContextTimeframe.md b/docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md new file mode 100644 index 0000000..52b4286 --- /dev/null +++ b/docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md @@ -0,0 +1,12 @@ +# ApiVideo.Model.AnalyticsAggregatedMetricsResponseContextTimeframe +Returns the starting and ending date-times of the period you want analytics for. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**From** | **DateTime** | Returns the starting date-time of the period you want analytics for in ATOM date-time format. | [optional] +**To** | **DateTime** | Returns the starting date-time of the period you want analytics for in ATOM date-time format. | [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/AnalyticsApi.md b/docs/AnalyticsApi.md index 1cb0b8d..815dad1 100644 --- a/docs/AnalyticsApi.md +++ b/docs/AnalyticsApi.md @@ -4,17 +4,18 @@ All URIs are relative to *https://ws.api.video* Method | HTTP request | Description ------------- | ------------- | ------------- -[**getLiveStreamsPlays**](AnalyticsApi.md#getanalyticslivestreamsplays) | **GET** /analytics/live-streams/plays | Get play events for live stream -[**getVideosPlays**](AnalyticsApi.md#getanalyticsvideosplays) | **GET** /analytics/videos/plays | Get play events for video +[**getAggregatedMetrics**](AnalyticsApi.md#getaggregatedmetrics) | **GET** /data/metrics/{metric}/{aggregation} | Retrieve aggregated metrics +[**getMetricsBreakdown**](AnalyticsApi.md#getmetricsbreakdown) | **GET** /data/buckets/{metric}/{breakdown} | Retrieve metrics in a breakdown of dimensions +[**getMetricsOverTime**](AnalyticsApi.md#getmetricsovertime) | **GET** /data/timeseries/{metric} | Retrieve metrics over time - -# **getLiveStreamsPlays** -> AnalyticsPlaysResponse getLiveStreamsPlays (DateTime from, string dimension, DateTime? to = null, string filter = null, int? currentPage = null, int? pageSize = null) + +# **getAggregatedMetrics** +> AnalyticsAggregatedMetricsResponse getAggregatedMetrics (string metric, string aggregation, DateTime? from = null, DateTime? to = null, FilterBy2 filterBy = null) -Get play events for live stream +Retrieve aggregated metrics -Retrieve filtered analytics about the number of plays for your live streams in a project. +Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain period of time. ### Example ```csharp @@ -23,7 +24,7 @@ using ApiVideo.Client; namespace Example { - public class getLiveStreamsPlaysExample + public class getAggregatedMetricsExample { public static void Main() { @@ -32,22 +33,100 @@ namespace Example var apiInstance = new ApiVideoClient(apiKey,basePath); - var from = 2023-06-01; // DateTime | Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. - var dimension = browser; // string | Use this query parameter to define the dimension that you want analytics for. - `liveStreamId`: Returns analytics based on the public live stream identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. - var to = 2023-06-10; // DateTime? | Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) - var filter = liveStreamId:li3q7HxhApxRF1c8F8r6VeaI; // string | Use this query parameter to filter your results to a specific live stream in a project that you want analytics for. You must use the `liveStreamId:` prefix when specifying a live stream ID. (optional) + var metric = metric_example; // string | Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. + var aggregation = aggregation_example; // string | Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric. + var from = 2024-02-05T00:00:00+01:00; // DateTime? | Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` - The API ignores this parameter when you call `/data/metrics/play/total`. (optional) + var to = 2024-02-06T00:00:00+01:00; // DateTime? | Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) + var filterBy = new FilterBy2(); // FilterBy2 | Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). (optional) + var apiAnalyticsInstance = apiInstance.Analytics(); + try + { + // Retrieve aggregated metrics + AnalyticsAggregatedMetricsResponse result = apiAnalyticsInstance.getAggregatedMetrics(metric, aggregation, from, to, filterBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AnalyticsApi.getAggregatedMetrics: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **metric** | **string**| Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. | + **aggregation** | **string**| Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric. | + **from** | **DateTime?**| Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` - The API ignores this parameter when you call `/data/metrics/play/total`. | [optional] + **to** | **DateTime?**| Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. | [optional] + **filterBy** | [**FilterBy2**](FilterBy2.md)| Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). | [optional] + +### Return type + +[**AnalyticsAggregatedMetricsResponse**](AnalyticsAggregatedMetricsResponse.md) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| +| **400** | Bad request error | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| +| **404** | Unrecognized request URL | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| +| **429** | Too Many Requests | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| + +[[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) + + +# **getMetricsBreakdown** +> AnalyticsMetricsBreakdownResponse getMetricsBreakdown (string metric, string breakdown, DateTime? from = null, DateTime? to = null, FilterBy2 filterBy = null, int? currentPage = null, int? pageSize = null) + +Retrieve metrics in a breakdown of dimensions + +Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device type. + +### Example +```csharp +using System.Diagnostics; +using ApiVideo.Client; + +namespace Example +{ + public class getMetricsBreakdownExample + { + public static void Main() + { + var basePath = ApiVideoClient.Client.Environment.SANDBOX; + var apiKey = "YOUR_API_KEY"; + + var apiInstance = new ApiVideoClient(apiKey,basePath); + + var metric = metric_example; // string | Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `play-total` is the total number of times a specific content has been played. You can only use the `media-id` breakdown with this metric. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. + var breakdown = breakdown_example; // string | Use this path parameter to define a dimension for segmenting analytics data. You must use `kebab-case` for path parameters. These are the available dimensions: - `media-id`: Returns analytics based on the unique identifiers of a video or a live stream. - `media-type`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `device-type`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operating-system`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. + var from = 2024-02-05T00:00:00+01:00; // DateTime? | Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) + var to = 2024-02-06T00:00:00+01:00; // DateTime? | Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) + var filterBy = new FilterBy2(); // FilterBy2 | Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). (optional) var currentPage = 2; // int? | Choose the number of search results to return per page. Minimum value: 1 (optional) (default to 1) var pageSize = 30; // int? | Results per page. Allowed values 1-100, default is 25. (optional) (default to 25) var apiAnalyticsInstance = apiInstance.Analytics(); try { - // Get play events for live stream - AnalyticsPlaysResponse result = apiAnalyticsInstance.getLiveStreamsPlays(from, dimension, to, filter, currentPage, pageSize); + // Retrieve metrics in a breakdown of dimensions + AnalyticsMetricsBreakdownResponse result = apiAnalyticsInstance.getMetricsBreakdown(metric, breakdown, from, to, filterBy, currentPage, pageSize); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling AnalyticsApi.getLiveStreamsPlays: " + e.Message ); + Debug.Print("Exception when calling AnalyticsApi.getMetricsBreakdown: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -60,16 +139,17 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **from** | **DateTime**| Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. | - **dimension** | **string**| Use this query parameter to define the dimension that you want analytics for. - `liveStreamId`: Returns analytics based on the public live stream identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. | - **to** | **DateTime?**| Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. | [optional] - **filter** | **string**| Use this query parameter to filter your results to a specific live stream in a project that you want analytics for. You must use the `liveStreamId:` prefix when specifying a live stream ID. | [optional] + **metric** | **string**| Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `play-total` is the total number of times a specific content has been played. You can only use the `media-id` breakdown with this metric. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. | + **breakdown** | **string**| Use this path parameter to define a dimension for segmenting analytics data. You must use `kebab-case` for path parameters. These are the available dimensions: - `media-id`: Returns analytics based on the unique identifiers of a video or a live stream. - `media-type`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `device-type`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operating-system`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. | + **from** | **DateTime?**| Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` | [optional] + **to** | **DateTime?**| Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. | [optional] + **filterBy** | [**FilterBy2**](FilterBy2.md)| Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). | [optional] **currentPage** | **int?**| Choose the number of search results to return per page. Minimum value: 1 | [optional] [default to 1] **pageSize** | **int?**| Results per page. Allowed values 1-100, default is 25. | [optional] [default to 25] ### Return type -[**AnalyticsPlaysResponse**](AnalyticsPlaysResponse.md) +[**AnalyticsMetricsBreakdownResponse**](AnalyticsMetricsBreakdownResponse.md) ### HTTP request headers @@ -82,19 +162,18 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | Success | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| | **400** | Bad request error | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| -| **403** | Forbidden - Disabled Analytics | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| -| **404** | Not Found | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| +| **404** | Unrecognized request URL | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| | **429** | Too Many Requests | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| [[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) - -# **getVideosPlays** -> AnalyticsPlaysResponse getVideosPlays (DateTime from, string dimension, DateTime? to = null, string filter = null, int? currentPage = null, int? pageSize = null) + +# **getMetricsOverTime** +> AnalyticsMetricsOverTimeResponse getMetricsOverTime (string metric, DateTime? from = null, DateTime? to = null, string interval = null, FilterBy2 filterBy = null, int? currentPage = null, int? pageSize = null) -Get play events for video +Retrieve metrics over time -Retrieve filtered analytics about the number of plays for your videos in a project. +Retrieve countable metrics like the number of plays or impressions, grouped by the time at which they occurred ### Example ```csharp @@ -103,7 +182,7 @@ using ApiVideo.Client; namespace Example { - public class getVideosPlaysExample + public class getMetricsOverTimeExample { public static void Main() { @@ -112,22 +191,23 @@ namespace Example var apiInstance = new ApiVideoClient(apiKey,basePath); - var from = 2023-06-01; // DateTime | Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. - var dimension = browser; // string | Use this query parameter to define the dimension that you want analytics for. - `videoId`: Returns analytics based on the public video identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. - var to = 2023-06-10; // DateTime? | Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) - var filter = videoId:vi3q7HxhApxRF1c8F8r6VeaI; // string | Use this query parameter to filter your results to a specific video in a project that you want analytics for. You must use the `videoId:` prefix when specifying a video ID. (optional) + var metric = metric_example; // string | Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. + var from = 2024-02-05T00:00:00+01:00; // DateTime? | Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) + var to = 2024-02-06T00:00:00+01:00; // DateTime? | Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) + var interval = hour; // string | Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. (optional) + var filterBy = new FilterBy2(); // FilterBy2 | Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). (optional) var currentPage = 2; // int? | Choose the number of search results to return per page. Minimum value: 1 (optional) (default to 1) var pageSize = 30; // int? | Results per page. Allowed values 1-100, default is 25. (optional) (default to 25) var apiAnalyticsInstance = apiInstance.Analytics(); try { - // Get play events for video - AnalyticsPlaysResponse result = apiAnalyticsInstance.getVideosPlays(from, dimension, to, filter, currentPage, pageSize); + // Retrieve metrics over time + AnalyticsMetricsOverTimeResponse result = apiAnalyticsInstance.getMetricsOverTime(metric, from, to, interval, filterBy, currentPage, pageSize); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling AnalyticsApi.getVideosPlays: " + e.Message ); + Debug.Print("Exception when calling AnalyticsApi.getMetricsOverTime: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -140,16 +220,17 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **from** | **DateTime**| Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. | - **dimension** | **string**| Use this query parameter to define the dimension that you want analytics for. - `videoId`: Returns analytics based on the public video identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. | - **to** | **DateTime?**| Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. | [optional] - **filter** | **string**| Use this query parameter to filter your results to a specific video in a project that you want analytics for. You must use the `videoId:` prefix when specifying a video ID. | [optional] + **metric** | **string**| Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. | + **from** | **DateTime?**| Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` | [optional] + **to** | **DateTime?**| Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. | [optional] + **interval** | **string**| Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. | [optional] + **filterBy** | [**FilterBy2**](FilterBy2.md)| Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). | [optional] **currentPage** | **int?**| Choose the number of search results to return per page. Minimum value: 1 | [optional] [default to 1] **pageSize** | **int?**| Results per page. Allowed values 1-100, default is 25. | [optional] [default to 25] ### Return type -[**AnalyticsPlaysResponse**](AnalyticsPlaysResponse.md) +[**AnalyticsMetricsOverTimeResponse**](AnalyticsMetricsOverTimeResponse.md) ### HTTP request headers @@ -162,8 +243,7 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | Success | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| | **400** | Bad request error | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| -| **403** | Forbidden - Disabled Analytics | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| -| **404** | Not Found | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| +| **404** | Unrecognized request URL | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| | **429** | Too Many Requests | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| [[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/AnalyticsMetricsBreakdownResponse.md b/docs/AnalyticsMetricsBreakdownResponse.md new file mode 100644 index 0000000..bdb2767 --- /dev/null +++ b/docs/AnalyticsMetricsBreakdownResponse.md @@ -0,0 +1,12 @@ +# ApiVideo.Model.AnalyticsMetricsBreakdownResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Context** | [**AnalyticsMetricsBreakdownResponseContext**](AnalyticsMetricsBreakdownResponseContext.md) | | +**Data** | [**List<AnalyticsMetricsBreakdownResponseData>**](AnalyticsMetricsBreakdownResponseData.md) | Returns an array of dimensions and their respective metrics. | +**Pagination** | [**Pagination**](Pagination.md) | | + +[[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/AnalyticsMetricsBreakdownResponseContext.md b/docs/AnalyticsMetricsBreakdownResponseContext.md new file mode 100644 index 0000000..da2d7d9 --- /dev/null +++ b/docs/AnalyticsMetricsBreakdownResponseContext.md @@ -0,0 +1,12 @@ +# ApiVideo.Model.AnalyticsMetricsBreakdownResponseContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Metric** | **string** | Returns the metric you selected. | [optional] +**Breakdown** | **string** | Returns the dimension you selected. | [optional] +**Timeframe** | [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.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/AnalyticsMetricsBreakdownResponseData.md b/docs/AnalyticsMetricsBreakdownResponseData.md new file mode 100644 index 0000000..44f48d3 --- /dev/null +++ b/docs/AnalyticsMetricsBreakdownResponseData.md @@ -0,0 +1,11 @@ +# ApiVideo.Model.AnalyticsMetricsBreakdownResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DimensionValue** | **string** | Returns a specific value for the dimension you selected, based on the data. For example if you select `continent` as a dimension, then `dimensionValue` returns values like `EU` or \"AZ\". | [optional] +**MetricValue** | **float** | Returns the data for a specific dimension value. | [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/AnalyticsMetricsOverTimeResponse.md b/docs/AnalyticsMetricsOverTimeResponse.md new file mode 100644 index 0000000..0e76ac2 --- /dev/null +++ b/docs/AnalyticsMetricsOverTimeResponse.md @@ -0,0 +1,12 @@ +# ApiVideo.Model.AnalyticsMetricsOverTimeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Context** | [**AnalyticsMetricsOverTimeResponseContext**](AnalyticsMetricsOverTimeResponseContext.md) | | +**Data** | [**List<AnalyticsMetricsOverTimeResponseData>**](AnalyticsMetricsOverTimeResponseData.md) | Returns an array of metrics and the timestamps . | +**Pagination** | [**Pagination**](Pagination.md) | | + +[[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/AnalyticsMetricsOverTimeResponseContext.md b/docs/AnalyticsMetricsOverTimeResponseContext.md new file mode 100644 index 0000000..c44d7e8 --- /dev/null +++ b/docs/AnalyticsMetricsOverTimeResponseContext.md @@ -0,0 +1,12 @@ +# ApiVideo.Model.AnalyticsMetricsOverTimeResponseContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Metric** | **string** | Returns the metric you selected. | [optional] +**Interval** | **string** | Returns the interval you selected. | [optional] +**Timeframe** | [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.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/AnalyticsMetricsOverTimeResponseData.md b/docs/AnalyticsMetricsOverTimeResponseData.md new file mode 100644 index 0000000..6dcb5e5 --- /dev/null +++ b/docs/AnalyticsMetricsOverTimeResponseData.md @@ -0,0 +1,11 @@ +# ApiVideo.Model.AnalyticsMetricsOverTimeResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmittedAt** | **string** | Returns the timestamp of the event that belongs to a specific metric in ATOM date-time format. For example, if you set `play` with an `hour` interval in your request, then `emittedAt` returns the hourly timestamps of every play event within the timeframe you defined. | [optional] +**MetricValue** | **float** | Returns the data for a specific metric value. | [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/FilterBy.md b/docs/FilterBy.md new file mode 100644 index 0000000..4915107 --- /dev/null +++ b/docs/FilterBy.md @@ -0,0 +1,17 @@ +# ApiVideo.Model.FilterBy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MediaId** | **List<string>** | Returns analytics based on the unique identifiers of a video or a live stream. | [optional] +**MediaType** | **string** | | [optional] +**Continent** | **List<string>** | Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. | [optional] +**Country** | **List<string>** | Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. | [optional] +**DeviceType** | **List<string>** | Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. | [optional] +**OperatingSystem** | **List<string>** | Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. | [optional] +**Browser** | **List<string>** | Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. | [optional] +**Tag** | **string** | Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). | [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/FilterBy1.md b/docs/FilterBy1.md new file mode 100644 index 0000000..647684d --- /dev/null +++ b/docs/FilterBy1.md @@ -0,0 +1,17 @@ +# ApiVideo.Model.FilterBy1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MediaId** | **List<string>** | Returns analytics based on the unique identifiers of a video or a live stream. | [optional] +**MediaType** | **string** | | [optional] +**Continent** | **List<string>** | Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. | [optional] +**Country** | **List<string>** | Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. | [optional] +**DeviceType** | **List<string>** | Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. | [optional] +**OperatingSystem** | **List<string>** | Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. | [optional] +**Browser** | **List<string>** | Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. | [optional] +**Tag** | **string** | Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). | [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/FilterBy2.md b/docs/FilterBy2.md new file mode 100644 index 0000000..b155a36 --- /dev/null +++ b/docs/FilterBy2.md @@ -0,0 +1,17 @@ +# ApiVideo.Model.FilterBy2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MediaId** | **List<string>** | Returns analytics based on the unique identifiers of a video or a live stream. | [optional] +**MediaType** | **string** | | [optional] +**Continent** | **List<string>** | Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. | [optional] +**Country** | **List<string>** | Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. | [optional] +**DeviceType** | **List<string>** | Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. | [optional] +**OperatingSystem** | **List<string>** | Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. | [optional] +**Browser** | **List<string>** | Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. | [optional] +**Tag** | **string** | Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). | [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/LiveStream.md b/docs/LiveStream.md index 4ea9838..7612913 100644 --- a/docs/LiveStream.md +++ b/docs/LiveStream.md @@ -7,11 +7,11 @@ Name | Type | Description | Notes **LiveStreamId** | **string** | The unique identifier for the live stream. Live stream IDs begin with \"li.\" | **Name** | **string** | The name of your live stream. | [optional] **StreamKey** | **string** | The unique, private stream key that you use to begin streaming. | [optional] -**Public** | **bool** | Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management). | [optional] +**Public** | **bool** | Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management). | [optional] **Assets** | [**LiveStreamAssets**](LiveStreamAssets.md) | | [optional] **PlayerId** | **string** | The unique identifier for the player. | [optional] **Broadcasting** | **bool** | Whether or not you are broadcasting the live video you recorded for others to see. True means you are broadcasting to viewers, false means you are not. | [optional] -**Restreams** | [**List<RestreamsResponseObject>**](RestreamsResponseObject.md) | Returns the list of RTMP restream destinations. | +**Restreams** | [**List<RestreamsResponseObject>**](RestreamsResponseObject.md) | Returns the list of restream destinations. | **CreatedAt** | **DateTime** | When the player was created, presented in ISO-8601 format. | [optional] **UpdatedAt** | **DateTime** | When the player was last updated, presented in ISO-8601 format. | [optional] diff --git a/docs/LiveStreamCreationPayload.md b/docs/LiveStreamCreationPayload.md index 9591570..2e13618 100644 --- a/docs/LiveStreamCreationPayload.md +++ b/docs/LiveStreamCreationPayload.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | Add a name for your live stream here. | -**Public** | **bool** | Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management). | [optional] +**Public** | **bool** | Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management). | [optional] **PlayerId** | **string** | The unique identifier for the player. | [optional] -**Restreams** | [**List<RestreamsRequestObject>**](RestreamsRequestObject.md) | Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations. | [optional] +**Restreams** | [**List<RestreamsRequestObject>**](RestreamsRequestObject.md) | Use this parameter to add, edit, or remove `RTMPS` or `RTMP` services where you want to restream a live stream. The list can only contain up to 5 destinations. | [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/LiveStreamSession.md b/docs/LiveStreamSession.md deleted file mode 100644 index 9f305fa..0000000 --- a/docs/LiveStreamSession.md +++ /dev/null @@ -1,15 +0,0 @@ -# ApiVideo.Model.LiveStreamSession - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Session** | [**LiveStreamSessionSession**](LiveStreamSessionSession.md) | | [optional] -**Location** | [**LiveStreamSessionLocation**](LiveStreamSessionLocation.md) | | [optional] -**Referrer** | [**LiveStreamSessionReferrer**](LiveStreamSessionReferrer.md) | | [optional] -**Device** | [**LiveStreamSessionDevice**](LiveStreamSessionDevice.md) | | [optional] -**Os** | [**VideoSessionOs**](VideoSessionOs.md) | | [optional] -**_Client** | [**LiveStreamSessionClient**](LiveStreamSessionClient.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/LiveStreamSessionClient.md b/docs/LiveStreamSessionClient.md deleted file mode 100644 index da01352..0000000 --- a/docs/LiveStreamSessionClient.md +++ /dev/null @@ -1,13 +0,0 @@ -# ApiVideo.Model.LiveStreamSessionClient -What kind of browser the viewer is using for the live stream session. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the browser used to view the live stream session. | [optional] -**Version** | **string** | The version of the browser used to view the live stream session. | [optional] -**Type** | **string** | The type of client used to view the live stream session. | [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/LiveStreamSessionDevice.md b/docs/LiveStreamSessionDevice.md deleted file mode 100644 index 449bc90..0000000 --- a/docs/LiveStreamSessionDevice.md +++ /dev/null @@ -1,13 +0,0 @@ -# ApiVideo.Model.LiveStreamSessionDevice -What type of device the user is on when in the live stream session. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | What the type is like desktop, laptop, mobile. | [optional] -**Vendor** | **string** | If known, what the brand of the device is, like Apple, Dell, etc. | [optional] -**Model** | **string** | The specific model of the device, if known. | [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/LiveStreamSessionReferrer.md b/docs/LiveStreamSessionReferrer.md deleted file mode 100644 index d618371..0000000 --- a/docs/LiveStreamSessionReferrer.md +++ /dev/null @@ -1,13 +0,0 @@ -# ApiVideo.Model.LiveStreamSessionReferrer - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Url** | **string** | The website the viewer of the live stream was referred to in order to view the live stream. | [optional] -**Medium** | **string** | The type of search that brought the viewer to the live stream. Organic would be they found it on their own, paid would be they found it via an advertisement. | [optional] -**Source** | **string** | Where the viewer came from to see the live stream (usually where they searched from). | [optional] -**SearchTerm** | **string** | What term they searched for that led them to the live stream. | [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/LiveStreamSessionSession.md b/docs/LiveStreamSessionSession.md deleted file mode 100644 index 84422fb..0000000 --- a/docs/LiveStreamSessionSession.md +++ /dev/null @@ -1,12 +0,0 @@ -# ApiVideo.Model.LiveStreamSessionSession - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SessionId** | **string** | A unique identifier for your session. You can use this to track what happens during a specific session. | [optional] -**LoadedAt** | **DateTime** | When the session started, with the date and time presented in ISO-8601 format. | [optional] -**EndedAt** | **DateTime** | When the session ended, with the date and time presented in ISO-8601 format. | [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/LiveStreamUpdatePayload.md b/docs/LiveStreamUpdatePayload.md index 73a6e7c..97d6dc4 100644 --- a/docs/LiveStreamUpdatePayload.md +++ b/docs/LiveStreamUpdatePayload.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | The name you want to use for your live stream. | [optional] -**Public** | **bool** | Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management). | [optional] +**Public** | **bool** | Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management). | [optional] **PlayerId** | **string** | The unique ID for the player associated with a live stream that you want to update. | [optional] -**Restreams** | [**List<RestreamsRequestObject>**](RestreamsRequestObject.md) | Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is removed. | [optional] +**Restreams** | [**List<RestreamsRequestObject>**](RestreamsRequestObject.md) | Use this parameter to add, edit, or remove `RTMPS` or `RTMP` services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is removed. | [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/LiveStreamsApi.md b/docs/LiveStreamsApi.md index 91d56a9..8346f97 100644 --- a/docs/LiveStreamsApi.md +++ b/docs/LiveStreamsApi.md @@ -11,6 +11,7 @@ Method | HTTP request | Description [**list**](LiveStreamsApi.md#getlivestreams) | **GET** /live-streams | List all live streams [**uploadThumbnail**](LiveStreamsApi.md#postlivestreamslivestreamidthumbnail) | **POST** /live-streams/{liveStreamId}/thumbnail | Upload a thumbnail [**deleteThumbnail**](LiveStreamsApi.md#deletelivestreamslivestreamidthumbnail) | **DELETE** /live-streams/{liveStreamId}/thumbnail | Delete a thumbnail +[**complete**](LiveStreamsApi.md#putlivestreamslivestreamidcomplete) | **PUT** /live-streams/{liveStreamId}/complete | Complete a live stream @@ -500,3 +501,70 @@ Name | Type | Description | Notes [[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) + +# **complete** +> void complete (string liveStreamId) + +Complete a live stream + +Request the completion of a live stream that is currently running. This operation is asynchronous and the live stream will stop after a few seconds. The API adds the `EXT-X-ENDLIST` tag to the live stream's HLS manifest. This stops the live stream on the player and also stops the recording of the live stream. The API keeps the incoming connection from the streamer open for at most 1 minute, which can be used to terminate the stream. + +### Example +```csharp +using System.Diagnostics; +using ApiVideo.Client; + +namespace Example +{ + public class completeExample + { + public static void Main() + { + var basePath = ApiVideoClient.Client.Environment.SANDBOX; + var apiKey = "YOUR_API_KEY"; + + var apiInstance = new ApiVideoClient(apiKey,basePath); + + var liveStreamId = vi4k0jvEUuaTdRAEjQ4Jfrgz; // string | The unique ID for the live stream you want to complete. + var apiLiveStreamsInstance = apiInstance.LiveStreams(); + try + { + // Complete a live stream + apiLiveStreamsInstance.complete(liveStreamId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling LiveStreamsApi.complete: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **liveStreamId** | **string**| The unique ID for the live stream you want to complete. | + +### Return type + +void (empty response body) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Accepted | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| +| **404** | Not Found | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| +| **429** | Too Many Requests | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| + +[[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/RestreamsRequestObject.md b/docs/RestreamsRequestObject.md index cc6e0d5..a757034 100644 --- a/docs/RestreamsRequestObject.md +++ b/docs/RestreamsRequestObject.md @@ -6,7 +6,7 @@ Adding restream destinations is optional. However, if you set a restream destina Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | Use this parameter to define a name for the restream destination. | -**ServerUrl** | **string** | Use this parameter to set the RTMP URL of the restream destination. | +**ServerUrl** | **string** | Use this parameter to set the `RTMPS` or `RTMP` server URL of the restream destination. | **StreamKey** | **string** | Use this parameter to provide the unique key of the live stream that you want to restream. | [[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/RestreamsResponseObject.md b/docs/RestreamsResponseObject.md index c627dfa..8fb916c 100644 --- a/docs/RestreamsResponseObject.md +++ b/docs/RestreamsResponseObject.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | Returns the name of a restream destination. | [optional] -**ServerUrl** | **string** | Returns the RTMP URL of a restream destination. | [optional] +**ServerUrl** | **string** | Returns the server URL of a restream destination. | [optional] **StreamKey** | **string** | Returns the unique key of the live stream that is set up for restreaming. | [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/LiveStreamSessionLocation.md b/docs/UnrecognizedRequestUrl.md similarity index 51% rename from docs/LiveStreamSessionLocation.md rename to docs/UnrecognizedRequestUrl.md index 3e73072..a1817ca 100644 --- a/docs/LiveStreamSessionLocation.md +++ b/docs/UnrecognizedRequestUrl.md @@ -1,12 +1,12 @@ -# ApiVideo.Model.LiveStreamSessionLocation -The location of the viewer of the live stream. +# ApiVideo.Model.UnrecognizedRequestUrl ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Country** | **string** | The country of the viewer of the live stream. | [optional] -**City** | **string** | The city of the viewer of the live stream. | [optional] +**Type** | **string** | A link to the error documentation. | [optional] +**Title** | **string** | A description of the error that occurred. | [optional] +**Status** | **int** | The HTTP status code. | [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/VideoCreationPayload.md b/docs/VideoCreationPayload.md index 9711666..398233a 100644 --- a/docs/VideoCreationPayload.md +++ b/docs/VideoCreationPayload.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **Title** | **string** | The title of your new video. | **Description** | **string** | A brief description of your video. | [optional] **Source** | **string** | You can either add a video already on the web, by entering the URL of the video, or you can also enter the `videoId` of one of the videos you already have on your api.video acccount, and this will generate a copy of your video. Creating a copy of a video can be especially useful if you want to keep your original video and trim or apply a watermark onto the copy you would create. | [optional] -**Public** | **bool** | Default: True. If set to `false` the video will become private. More information on private videos can be found [here](https://docs.api.video/delivery-analytics/video-privacy-access-management) | [optional] [default to true] +**Public** | **bool** | Default: True. If set to `false` the video will become private. More information on private videos can be found [here](https://docs.api.video/delivery/video-privacy-access-management) | [optional] [default to true] **Panoramic** | **bool** | Indicates if your video is a 360/immersive video. | [optional] [default to false] **Mp4Support** | **bool** | Enables mp4 version in addition to streamed version. | [optional] [default to true] **PlayerId** | **string** | The unique identification number for your video player. | [optional] diff --git a/docs/VideoSession.md b/docs/VideoSession.md deleted file mode 100644 index f0445de..0000000 --- a/docs/VideoSession.md +++ /dev/null @@ -1,15 +0,0 @@ -# ApiVideo.Model.VideoSession - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Session** | [**VideoSessionSession**](VideoSessionSession.md) | | [optional] -**Location** | [**VideoSessionLocation**](VideoSessionLocation.md) | | [optional] -**Referrer** | [**VideoSessionReferrer**](VideoSessionReferrer.md) | | [optional] -**Device** | [**VideoSessionDevice**](VideoSessionDevice.md) | | [optional] -**Os** | [**VideoSessionOs**](VideoSessionOs.md) | | [optional] -**_Client** | [**VideoSessionClient**](VideoSessionClient.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/VideoSessionClient.md b/docs/VideoSessionClient.md deleted file mode 100644 index ba54f46..0000000 --- a/docs/VideoSessionClient.md +++ /dev/null @@ -1,13 +0,0 @@ -# ApiVideo.Model.VideoSessionClient -What kind of browser the viewer is using for the video session. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the browser used to view the video session. | [optional] -**Version** | **string** | The version of the browser used to view the video session. | [optional] -**Type** | **string** | The type of client used to view the video session. | [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/VideoSessionDevice.md b/docs/VideoSessionDevice.md deleted file mode 100644 index a38be90..0000000 --- a/docs/VideoSessionDevice.md +++ /dev/null @@ -1,13 +0,0 @@ -# ApiVideo.Model.VideoSessionDevice -What type of device the user is on when in the video session. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | What the type is like desktop, laptop, mobile. | [optional] -**Vendor** | **string** | If known, what the brand of the device is, like Apple, Dell, etc. | [optional] -**Model** | **string** | The specific model of the device, if known. | [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/VideoSessionOs.md b/docs/VideoSessionOs.md deleted file mode 100644 index 2e02cb7..0000000 --- a/docs/VideoSessionOs.md +++ /dev/null @@ -1,13 +0,0 @@ -# ApiVideo.Model.VideoSessionOs -The operating system the viewer is on. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the operating system. | [optional] -**Shortname** | **string** | The nickname for the operating system, often representing the version. | [optional] -**Version** | **string** | The version of the operating system. | [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/VideoSessionReferrer.md b/docs/VideoSessionReferrer.md deleted file mode 100644 index b6c32a0..0000000 --- a/docs/VideoSessionReferrer.md +++ /dev/null @@ -1,13 +0,0 @@ -# ApiVideo.Model.VideoSessionReferrer - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Url** | **string** | The link the viewer used to reach the video session. | [optional] -**Medium** | **string** | How they arrived at the site, for example organic or paid. Organic meaning they found it themselves and paid meaning they followed a link from an advertisement. | [optional] -**Source** | **string** | The source the referrer came from to the video session. For example if they searched through google to find the stream. | [optional] -**SearchTerm** | **string** | The search term they typed to arrive at the video session. | [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/VideoSessionSession.md b/docs/VideoSessionSession.md deleted file mode 100644 index bf50d73..0000000 --- a/docs/VideoSessionSession.md +++ /dev/null @@ -1,13 +0,0 @@ -# ApiVideo.Model.VideoSessionSession - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SessionId** | **string** | The unique identifier for the session that you can use to track what happens during it. | [optional] -**LoadedAt** | **DateTime** | When the video session started, presented in ISO-8601 format. | [optional] -**EndedAt** | **DateTime** | When the video session ended, presented in ISO-8601 format. | [optional] -**Metadata** | [**List<Metadata>**](Metadata.md) | A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. You can also just use the pairs as another way to tag and categorize your videos. | [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/src/Api/AnalyticsApi.cs b/src/Api/AnalyticsApi.cs index 4f57dbd..b291834 100644 --- a/src/Api/AnalyticsApi.cs +++ b/src/Api/AnalyticsApi.cs @@ -41,58 +41,324 @@ public AnalyticsApi(ApiClient apiClient) } /// - /// Get play events for live stream Retrieve filtered analytics about the number of plays for your live streams in a project. + /// Retrieve aggregated metrics Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain period of time. /// /// Thrown when fails to make API call /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. (optional) - /// Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. -/// Use this query parameter to define the dimension that you want analytics for. - `liveStreamId`: Returns analytics based on the public live stream identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. -/// Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) -/// Use this query parameter to filter your results to a specific live stream in a project that you want analytics for. You must use the `liveStreamId:` prefix when specifying a live stream ID. (optional) + /// Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. +/// Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric. +/// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` - The API ignores this parameter when you call `/data/metrics/play/total`. (optional) +/// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +/// Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). (optional) + + /// AnalyticsAggregatedMetricsResponse + public Task getAggregatedMetricsAsync(string metric, string aggregation, DateTime? from = default, DateTime? to = default, FilterBy2 filterBy = default, CancellationToken cancellationToken = default) + { + Task> localVarResponse = getAggregatedMetricsWithHttpInfoAsync(metric, aggregation, from, to, filterBy, cancellationToken); + return localVarResponse.ContinueWith((Task> task) => task.Result.Data ); + + } + + /// + /// Retrieve aggregated metrics Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain period of time. + /// + /// Thrown when fails to make API call + /// Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. +/// Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric. +/// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` - The API ignores this parameter when you call `/data/metrics/play/total`. (optional) +/// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +/// Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). (optional) + + /// AnalyticsAggregatedMetricsResponse + public AnalyticsAggregatedMetricsResponse getAggregatedMetrics(string metric, string aggregation, DateTime? from = default, DateTime? to = default, FilterBy2 filterBy = default) + { + ApiResponse localVarResponse = getAggregatedMetricsWithHttpInfo(metric, aggregation, from, to, filterBy); + return localVarResponse.Data; + } + + + /// + /// Retrieve aggregated metrics Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain period of time. + /// + /// Thrown when fails to make API call + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. (optional) + /// Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. +/// Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric. +/// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` - The API ignores this parameter when you call `/data/metrics/play/total`. (optional) +/// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +/// Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). (optional) + + /// ApiResponse of AnalyticsAggregatedMetricsResponse + public Task> getAggregatedMetricsWithHttpInfoAsync(string metric, string aggregation, DateTime? from = default, DateTime? to = default, FilterBy2 filterBy = default, CancellationToken cancellationToken = default) + { + + + + + + // verify the required parameter 'metric' is set + if (metric == null) + throw new ApiException(400, "Missing required parameter 'metric' when calling AnalyticsApi->getAggregatedMetrics"); + // verify the required parameter 'aggregation' is set + if (aggregation == null) + throw new ApiException(400, "Missing required parameter 'aggregation' when calling AnalyticsApi->getAggregatedMetrics"); + + + var localVarPath = "/data/metrics/{metric}/{aggregation}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + string[] localVarContentTypes = new string[] { + }; + string localVarContentType = ApiClient.SelectHeaderContentType(localVarContentTypes); + localVarHeaderParams.Add("Content-Type", localVarContentType); + // to determine the Accept header + string[] localVarHttpHeaderAccepts = new string[] { + "application/json" + }; + string localVarHttpHeaderAccept = ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (metric != null) localVarPathParams.Add("metric", this.ApiClient.ParameterToString(metric)); // path parameter + if (aggregation != null) localVarPathParams.Add("aggregation", this.ApiClient.ParameterToString(aggregation)); // path parameter + if (from != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "from", from)); // query parameter + if (to != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "to", to)); // query parameter + if (filterBy != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "filterBy", filterBy)); // query parameter + + + + + // make the HTTP request + Task localVarResponse = (Task) this.ApiClient.CallApiAsync(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarContentType, cancellationToken); + + + return localVarResponse.ContinueWith((Task task) => + { + int localVarStatusCode = (int) task.Result.StatusCode; + return new ApiResponse(localVarStatusCode, + task.Result.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (AnalyticsAggregatedMetricsResponse) this.ApiClient.Deserialize(task.Result, typeof(AnalyticsAggregatedMetricsResponse))); + }); + + } + + + /// + /// Retrieve aggregated metrics Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain period of time. + /// + /// Thrown when fails to make API call + /// Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. +/// Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric. +/// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` - The API ignores this parameter when you call `/data/metrics/play/total`. (optional) +/// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +/// Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). (optional) + + /// ApiResponse of AnalyticsAggregatedMetricsResponse + public ApiResponse getAggregatedMetricsWithHttpInfo(string metric, string aggregation, DateTime? from = default, DateTime? to = default, FilterBy2 filterBy = default) + { + + + + + + // verify the required parameter 'metric' is set + if (metric == null) + throw new ApiException(400, "Missing required parameter 'metric' when calling AnalyticsApi->getAggregatedMetrics"); + // verify the required parameter 'aggregation' is set + if (aggregation == null) + throw new ApiException(400, "Missing required parameter 'aggregation' when calling AnalyticsApi->getAggregatedMetrics"); + + + var localVarPath = "/data/metrics/{metric}/{aggregation}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + string[] localVarContentTypes = new string[] { + }; + string localVarContentType = ApiClient.SelectHeaderContentType(localVarContentTypes); + localVarHeaderParams.Add("Content-Type", localVarContentType); + // to determine the Accept header + string[] localVarHttpHeaderAccepts = new string[] { + "application/json" + }; + string localVarHttpHeaderAccept = ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (metric != null) localVarPathParams.Add("metric", this.ApiClient.ParameterToString(metric)); // path parameter + if (aggregation != null) localVarPathParams.Add("aggregation", this.ApiClient.ParameterToString(aggregation)); // path parameter + if (from != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "from", from)); // query parameter + if (to != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "to", to)); // query parameter + if (filterBy != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "filterBy", filterBy)); // query parameter + + + + + // make the HTTP request + RestResponse localVarResponse = (RestResponse) this.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (AnalyticsAggregatedMetricsResponse) this.ApiClient.Deserialize(localVarResponse, typeof(AnalyticsAggregatedMetricsResponse))); + + } + + + /// + /// Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain period of time. + /// + /// Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. (required) + /// Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric. (required) + /// APIgetAggregatedMetricsRequest + public APIgetAggregatedMetricsRequest getAggregatedMetrics(string metric, string aggregation) { + return new APIgetAggregatedMetricsRequest(this,metric, aggregation); + } + + /// + /// Request getAggregatedMetrics class to get paginated list of items + /// + public class APIgetAggregatedMetricsRequest { + private string metric; + private string aggregation; + private DateTime? from; + private DateTime? to; + private FilterBy2 filterBy; + + private AnalyticsApi currentApiInstance; + + /// + /// Class constructor with api instance + /// + /// Instance of the current api + /// Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. (required) + /// Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric. (required) + public APIgetAggregatedMetricsRequest(AnalyticsApi instance, string metric, string aggregation) { + this.metric = metric; + this.aggregation = aggregation; + this.currentApiInstance = instance; + } + + /// + /// Set from + /// + /// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` - The API ignores this parameter when you call `/data/metrics/play/total`. (optional) + /// APIgetAggregatedMetricsRequest + public APIgetAggregatedMetricsRequest From(DateTime? from) { + this.from = from; + return this; + } + + /// + /// Set to + /// + /// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) + /// APIgetAggregatedMetricsRequest + public APIgetAggregatedMetricsRequest To(DateTime? to) { + this.to = to; + return this; + } + + /// + /// Set filterBy + /// + /// Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). (optional) + /// APIgetAggregatedMetricsRequest + public APIgetAggregatedMetricsRequest FilterBy(FilterBy2 filterBy) { + this.filterBy = filterBy; + return this; + } + + + /// + /// Execute getAggregatedMetrics request + /// + /// AnalyticsAggregatedMetricsResponse + public AnalyticsAggregatedMetricsResponse execute(){ + ApiResponse localVarResp = this.currentApiInstance.getAggregatedMetricsWithHttpInfo(metric, aggregation, from, to, filterBy); + return localVarResp.Data; + } + + + private APIgetAggregatedMetricsRequest copy() { + APIgetAggregatedMetricsRequest copy = new APIgetAggregatedMetricsRequest( this.currentApiInstance, metric, aggregation); + copy.From(from); + copy.To(to); + copy.FilterBy(filterBy); + return copy; + } + } + /// + /// Retrieve metrics in a breakdown of dimensions Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device type. + /// + /// Thrown when fails to make API call + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. (optional) + /// Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `play-total` is the total number of times a specific content has been played. You can only use the `media-id` breakdown with this metric. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. +/// Use this path parameter to define a dimension for segmenting analytics data. You must use `kebab-case` for path parameters. These are the available dimensions: - `media-id`: Returns analytics based on the unique identifiers of a video or a live stream. - `media-type`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `device-type`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operating-system`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. +/// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) +/// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +/// Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). (optional) /// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) /// Results per page. Allowed values 1-100, default is 25. (optional, default to 25) - /// AnalyticsPlaysResponse - public Task getLiveStreamsPlaysAsync(DateTime from, string dimension, DateTime? to = default, string filter = default, int? currentPage = default, int? pageSize = default, CancellationToken cancellationToken = default) + /// AnalyticsMetricsBreakdownResponse + public Task getMetricsBreakdownAsync(string metric, string breakdown, DateTime? from = default, DateTime? to = default, FilterBy2 filterBy = default, int? currentPage = default, int? pageSize = default, CancellationToken cancellationToken = default) { - Task> localVarResponse = getLiveStreamsPlaysWithHttpInfoAsync(from, dimension, to, filter, currentPage, pageSize, cancellationToken); - return localVarResponse.ContinueWith((Task> task) => task.Result.Data ); + Task> localVarResponse = getMetricsBreakdownWithHttpInfoAsync(metric, breakdown, from, to, filterBy, currentPage, pageSize, cancellationToken); + return localVarResponse.ContinueWith((Task> task) => task.Result.Data ); } /// - /// Get play events for live stream Retrieve filtered analytics about the number of plays for your live streams in a project. + /// Retrieve metrics in a breakdown of dimensions Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device type. /// /// Thrown when fails to make API call - /// Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. -/// Use this query parameter to define the dimension that you want analytics for. - `liveStreamId`: Returns analytics based on the public live stream identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. -/// Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) -/// Use this query parameter to filter your results to a specific live stream in a project that you want analytics for. You must use the `liveStreamId:` prefix when specifying a live stream ID. (optional) + /// Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `play-total` is the total number of times a specific content has been played. You can only use the `media-id` breakdown with this metric. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. +/// Use this path parameter to define a dimension for segmenting analytics data. You must use `kebab-case` for path parameters. These are the available dimensions: - `media-id`: Returns analytics based on the unique identifiers of a video or a live stream. - `media-type`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `device-type`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operating-system`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. +/// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) +/// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +/// Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). (optional) /// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) /// Results per page. Allowed values 1-100, default is 25. (optional, default to 25) - /// AnalyticsPlaysResponse - public AnalyticsPlaysResponse getLiveStreamsPlays(DateTime from, string dimension, DateTime? to = default, string filter = default, int? currentPage = default, int? pageSize = default) + /// AnalyticsMetricsBreakdownResponse + public AnalyticsMetricsBreakdownResponse getMetricsBreakdown(string metric, string breakdown, DateTime? from = default, DateTime? to = default, FilterBy2 filterBy = default, int? currentPage = default, int? pageSize = default) { - ApiResponse localVarResponse = getLiveStreamsPlaysWithHttpInfo(from, dimension, to, filter, currentPage, pageSize); + ApiResponse localVarResponse = getMetricsBreakdownWithHttpInfo(metric, breakdown, from, to, filterBy, currentPage, pageSize); return localVarResponse.Data; } /// - /// Get play events for live stream Retrieve filtered analytics about the number of plays for your live streams in a project. + /// Retrieve metrics in a breakdown of dimensions Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device type. /// /// Thrown when fails to make API call /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. (optional) - /// Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. -/// Use this query parameter to define the dimension that you want analytics for. - `liveStreamId`: Returns analytics based on the public live stream identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. -/// Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) -/// Use this query parameter to filter your results to a specific live stream in a project that you want analytics for. You must use the `liveStreamId:` prefix when specifying a live stream ID. (optional) + /// Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `play-total` is the total number of times a specific content has been played. You can only use the `media-id` breakdown with this metric. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. +/// Use this path parameter to define a dimension for segmenting analytics data. You must use `kebab-case` for path parameters. These are the available dimensions: - `media-id`: Returns analytics based on the unique identifiers of a video or a live stream. - `media-type`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `device-type`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operating-system`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. +/// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) +/// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +/// Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). (optional) /// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) /// Results per page. Allowed values 1-100, default is 25. (optional, default to 25) - /// ApiResponse of AnalyticsPlaysResponse - public Task> getLiveStreamsPlaysWithHttpInfoAsync(DateTime from, string dimension, DateTime? to = default, string filter = default, int? currentPage = default, int? pageSize = default, CancellationToken cancellationToken = default) + /// ApiResponse of AnalyticsMetricsBreakdownResponse + public Task> getMetricsBreakdownWithHttpInfoAsync(string metric, string breakdown, DateTime? from = default, DateTime? to = default, FilterBy2 filterBy = default, int? currentPage = default, int? pageSize = default, CancellationToken cancellationToken = default) { @@ -100,15 +366,16 @@ public Task> getLiveStreamsPlaysWithHttpInfo - // verify the required parameter 'from' is set - if (from == null) - throw new ApiException(400, "Missing required parameter 'from' when calling AnalyticsApi->getLiveStreamsPlays"); - // verify the required parameter 'dimension' is set - if (dimension == null) - throw new ApiException(400, "Missing required parameter 'dimension' when calling AnalyticsApi->getLiveStreamsPlays"); + + // verify the required parameter 'metric' is set + if (metric == null) + throw new ApiException(400, "Missing required parameter 'metric' when calling AnalyticsApi->getMetricsBreakdown"); + // verify the required parameter 'breakdown' is set + if (breakdown == null) + throw new ApiException(400, "Missing required parameter 'breakdown' when calling AnalyticsApi->getMetricsBreakdown"); - var localVarPath = "/analytics/live-streams/plays"; + var localVarPath = "/data/buckets/{metric}/{breakdown}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(); @@ -129,10 +396,11 @@ public Task> getLiveStreamsPlaysWithHttpInfo if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + if (metric != null) localVarPathParams.Add("metric", this.ApiClient.ParameterToString(metric)); // path parameter + if (breakdown != null) localVarPathParams.Add("breakdown", this.ApiClient.ParameterToString(breakdown)); // path parameter if (from != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "from", from)); // query parameter if (to != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "to", to)); // query parameter - if (dimension != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "dimension", dimension)); // query parameter - if (filter != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "filter", filter)); // query parameter + if (filterBy != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "filterBy", filterBy)); // query parameter if (currentPage != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "currentPage", currentPage)); // query parameter if (pageSize != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "pageSize", pageSize)); // query parameter @@ -148,27 +416,28 @@ public Task> getLiveStreamsPlaysWithHttpInfo return localVarResponse.ContinueWith((Task task) => { int localVarStatusCode = (int) task.Result.StatusCode; - return new ApiResponse(localVarStatusCode, + return new ApiResponse(localVarStatusCode, task.Result.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (AnalyticsPlaysResponse) this.ApiClient.Deserialize(task.Result, typeof(AnalyticsPlaysResponse))); + (AnalyticsMetricsBreakdownResponse) this.ApiClient.Deserialize(task.Result, typeof(AnalyticsMetricsBreakdownResponse))); }); } /// - /// Get play events for live stream Retrieve filtered analytics about the number of plays for your live streams in a project. + /// Retrieve metrics in a breakdown of dimensions Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device type. /// /// Thrown when fails to make API call - /// Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. -/// Use this query parameter to define the dimension that you want analytics for. - `liveStreamId`: Returns analytics based on the public live stream identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. -/// Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) -/// Use this query parameter to filter your results to a specific live stream in a project that you want analytics for. You must use the `liveStreamId:` prefix when specifying a live stream ID. (optional) + /// Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `play-total` is the total number of times a specific content has been played. You can only use the `media-id` breakdown with this metric. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. +/// Use this path parameter to define a dimension for segmenting analytics data. You must use `kebab-case` for path parameters. These are the available dimensions: - `media-id`: Returns analytics based on the unique identifiers of a video or a live stream. - `media-type`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `device-type`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operating-system`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. +/// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) +/// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +/// Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). (optional) /// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) /// Results per page. Allowed values 1-100, default is 25. (optional, default to 25) - /// ApiResponse of AnalyticsPlaysResponse - public ApiResponse getLiveStreamsPlaysWithHttpInfo(DateTime from, string dimension, DateTime? to = default, string filter = default, int? currentPage = default, int? pageSize = default) + /// ApiResponse of AnalyticsMetricsBreakdownResponse + public ApiResponse getMetricsBreakdownWithHttpInfo(string metric, string breakdown, DateTime? from = default, DateTime? to = default, FilterBy2 filterBy = default, int? currentPage = default, int? pageSize = default) { @@ -176,15 +445,16 @@ public ApiResponse getLiveStreamsPlaysWithHttpInfo(DateT - // verify the required parameter 'from' is set - if (from == null) - throw new ApiException(400, "Missing required parameter 'from' when calling AnalyticsApi->getLiveStreamsPlays"); - // verify the required parameter 'dimension' is set - if (dimension == null) - throw new ApiException(400, "Missing required parameter 'dimension' when calling AnalyticsApi->getLiveStreamsPlays"); + + // verify the required parameter 'metric' is set + if (metric == null) + throw new ApiException(400, "Missing required parameter 'metric' when calling AnalyticsApi->getMetricsBreakdown"); + // verify the required parameter 'breakdown' is set + if (breakdown == null) + throw new ApiException(400, "Missing required parameter 'breakdown' when calling AnalyticsApi->getMetricsBreakdown"); - var localVarPath = "/analytics/live-streams/plays"; + var localVarPath = "/data/buckets/{metric}/{breakdown}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(); @@ -205,10 +475,11 @@ public ApiResponse getLiveStreamsPlaysWithHttpInfo(DateT if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + if (metric != null) localVarPathParams.Add("metric", this.ApiClient.ParameterToString(metric)); // path parameter + if (breakdown != null) localVarPathParams.Add("breakdown", this.ApiClient.ParameterToString(breakdown)); // path parameter if (from != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "from", from)); // query parameter if (to != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "to", to)); // query parameter - if (dimension != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "dimension", dimension)); // query parameter - if (filter != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "filter", filter)); // query parameter + if (filterBy != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "filterBy", filterBy)); // query parameter if (currentPage != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "currentPage", currentPage)); // query parameter if (pageSize != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "pageSize", pageSize)); // query parameter @@ -221,31 +492,32 @@ public ApiResponse getLiveStreamsPlaysWithHttpInfo(DateT localVarPathParams, localVarContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - return new ApiResponse(localVarStatusCode, + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (AnalyticsPlaysResponse) this.ApiClient.Deserialize(localVarResponse, typeof(AnalyticsPlaysResponse))); + (AnalyticsMetricsBreakdownResponse) this.ApiClient.Deserialize(localVarResponse, typeof(AnalyticsMetricsBreakdownResponse))); } /// - /// Retrieve filtered analytics about the number of plays for your live streams in a project. + /// Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device type. /// - /// Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (required) - /// Use this query parameter to define the dimension that you want analytics for. - `liveStreamId`: Returns analytics based on the public live stream identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. (required) - /// APIgetLiveStreamsPlaysRequest - public APIgetLiveStreamsPlaysRequest getLiveStreamsPlays(DateTime from, string dimension) { - return new APIgetLiveStreamsPlaysRequest(this,from, dimension); + /// Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `play-total` is the total number of times a specific content has been played. You can only use the `media-id` breakdown with this metric. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. (required) + /// Use this path parameter to define a dimension for segmenting analytics data. You must use `kebab-case` for path parameters. These are the available dimensions: - `media-id`: Returns analytics based on the unique identifiers of a video or a live stream. - `media-type`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `device-type`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operating-system`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. (required) + /// APIgetMetricsBreakdownRequest + public APIgetMetricsBreakdownRequest getMetricsBreakdown(string metric, string breakdown) { + return new APIgetMetricsBreakdownRequest(this,metric, breakdown); } /// - /// Request getLiveStreamsPlays class to get paginated list of items + /// Request getMetricsBreakdown class to get paginated list of items /// - public class APIgetLiveStreamsPlaysRequest { - private DateTime from; - private string dimension; + public class APIgetMetricsBreakdownRequest { + private string metric; + private string breakdown; + private DateTime? from; private DateTime? to; - private string filter; + private FilterBy2 filterBy; private int? currentPage; private int? pageSize; @@ -255,31 +527,41 @@ public class APIgetLiveStreamsPlaysRequest { /// Class constructor with api instance /// /// Instance of the current api - /// Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (required) - /// Use this query parameter to define the dimension that you want analytics for. - `liveStreamId`: Returns analytics based on the public live stream identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. (required) - public APIgetLiveStreamsPlaysRequest(AnalyticsApi instance, DateTime from, string dimension) { - this.from = from; - this.dimension = dimension; + /// Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `play-total` is the total number of times a specific content has been played. You can only use the `media-id` breakdown with this metric. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. (required) + /// Use this path parameter to define a dimension for segmenting analytics data. You must use `kebab-case` for path parameters. These are the available dimensions: - `media-id`: Returns analytics based on the unique identifiers of a video or a live stream. - `media-type`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `device-type`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operating-system`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. (required) + public APIgetMetricsBreakdownRequest(AnalyticsApi instance, string metric, string breakdown) { + this.metric = metric; + this.breakdown = breakdown; this.currentApiInstance = instance; } + /// + /// Set from + /// + /// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) + /// APIgetMetricsBreakdownRequest + public APIgetMetricsBreakdownRequest From(DateTime? from) { + this.from = from; + return this; + } + /// /// Set to /// - /// Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) - /// APIgetLiveStreamsPlaysRequest - public APIgetLiveStreamsPlaysRequest To(DateTime? to) { + /// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) + /// APIgetMetricsBreakdownRequest + public APIgetMetricsBreakdownRequest To(DateTime? to) { this.to = to; return this; } /// - /// Set filter + /// Set filterBy /// - /// Use this query parameter to filter your results to a specific live stream in a project that you want analytics for. You must use the `liveStreamId:` prefix when specifying a live stream ID. (optional) - /// APIgetLiveStreamsPlaysRequest - public APIgetLiveStreamsPlaysRequest Filter(string filter) { - this.filter = filter; + /// Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). (optional) + /// APIgetMetricsBreakdownRequest + public APIgetMetricsBreakdownRequest FilterBy(FilterBy2 filterBy) { + this.filterBy = filterBy; return this; } @@ -287,8 +569,8 @@ public APIgetLiveStreamsPlaysRequest Filter(string filter) { /// Set currentPage /// /// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) - /// APIgetLiveStreamsPlaysRequest - public APIgetLiveStreamsPlaysRequest CurrentPage(int? currentPage) { + /// APIgetMetricsBreakdownRequest + public APIgetMetricsBreakdownRequest CurrentPage(int? currentPage) { this.currentPage = currentPage; return this; } @@ -297,8 +579,8 @@ public APIgetLiveStreamsPlaysRequest CurrentPage(int? currentPage) { /// Set pageSize /// /// Results per page. Allowed values 1-100, default is 25. (optional, default to 25) - /// APIgetLiveStreamsPlaysRequest - public APIgetLiveStreamsPlaysRequest PageSize(int? pageSize) { + /// APIgetMetricsBreakdownRequest + public APIgetMetricsBreakdownRequest PageSize(int? pageSize) { this.pageSize = pageSize; return this; } @@ -306,12 +588,12 @@ public APIgetLiveStreamsPlaysRequest PageSize(int? pageSize) { /// - /// Execute getLiveStreamsPlays request + /// Execute getMetricsBreakdown request /// - /// AnalyticsPlaysResponse - public Page execute(){ - ApiResponse localVarResp = this.currentApiInstance.getLiveStreamsPlaysWithHttpInfo(from, dimension, to, filter, currentPage, pageSize); - return new Page(localVarResp.Data.data, localVarResp.Data.pagination, () => { + /// AnalyticsMetricsBreakdownResponse + public Page execute(){ + ApiResponse localVarResp = this.currentApiInstance.getMetricsBreakdownWithHttpInfo(metric, breakdown, from, to, filterBy, currentPage, pageSize); + return new Page(localVarResp.Data.data, localVarResp.Data.pagination, () => { try { return copy().CurrentPage((currentPage == null ? 1 : currentPage) + 1).execute(); } catch (ApiException e) { @@ -320,68 +602,72 @@ public Page execute(){ }); } - private APIgetLiveStreamsPlaysRequest copy() { - APIgetLiveStreamsPlaysRequest copy = new APIgetLiveStreamsPlaysRequest( this.currentApiInstance, from, dimension); + private APIgetMetricsBreakdownRequest copy() { + APIgetMetricsBreakdownRequest copy = new APIgetMetricsBreakdownRequest( this.currentApiInstance, metric, breakdown); + copy.From(from); copy.To(to); - copy.Filter(filter); + copy.FilterBy(filterBy); copy.CurrentPage(currentPage); copy.PageSize(pageSize); return copy; } } /// - /// Get play events for video Retrieve filtered analytics about the number of plays for your videos in a project. + /// Retrieve metrics over time Retrieve countable metrics like the number of plays or impressions, grouped by the time at which they occurred /// /// Thrown when fails to make API call /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. (optional) - /// Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. -/// Use this query parameter to define the dimension that you want analytics for. - `videoId`: Returns analytics based on the public video identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. -/// Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) -/// Use this query parameter to filter your results to a specific video in a project that you want analytics for. You must use the `videoId:` prefix when specifying a video ID. (optional) + /// Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. +/// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) +/// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +/// Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. (optional) +/// Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). (optional) /// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) /// Results per page. Allowed values 1-100, default is 25. (optional, default to 25) - /// AnalyticsPlaysResponse - public Task getVideosPlaysAsync(DateTime from, string dimension, DateTime? to = default, string filter = default, int? currentPage = default, int? pageSize = default, CancellationToken cancellationToken = default) + /// AnalyticsMetricsOverTimeResponse + public Task getMetricsOverTimeAsync(string metric, DateTime? from = default, DateTime? to = default, string interval = default, FilterBy2 filterBy = default, int? currentPage = default, int? pageSize = default, CancellationToken cancellationToken = default) { - Task> localVarResponse = getVideosPlaysWithHttpInfoAsync(from, dimension, to, filter, currentPage, pageSize, cancellationToken); - return localVarResponse.ContinueWith((Task> task) => task.Result.Data ); + Task> localVarResponse = getMetricsOverTimeWithHttpInfoAsync(metric, from, to, interval, filterBy, currentPage, pageSize, cancellationToken); + return localVarResponse.ContinueWith((Task> task) => task.Result.Data ); } /// - /// Get play events for video Retrieve filtered analytics about the number of plays for your videos in a project. + /// Retrieve metrics over time Retrieve countable metrics like the number of plays or impressions, grouped by the time at which they occurred /// /// Thrown when fails to make API call - /// Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. -/// Use this query parameter to define the dimension that you want analytics for. - `videoId`: Returns analytics based on the public video identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. -/// Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) -/// Use this query parameter to filter your results to a specific video in a project that you want analytics for. You must use the `videoId:` prefix when specifying a video ID. (optional) + /// Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. +/// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) +/// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +/// Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. (optional) +/// Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). (optional) /// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) /// Results per page. Allowed values 1-100, default is 25. (optional, default to 25) - /// AnalyticsPlaysResponse - public AnalyticsPlaysResponse getVideosPlays(DateTime from, string dimension, DateTime? to = default, string filter = default, int? currentPage = default, int? pageSize = default) + /// AnalyticsMetricsOverTimeResponse + public AnalyticsMetricsOverTimeResponse getMetricsOverTime(string metric, DateTime? from = default, DateTime? to = default, string interval = default, FilterBy2 filterBy = default, int? currentPage = default, int? pageSize = default) { - ApiResponse localVarResponse = getVideosPlaysWithHttpInfo(from, dimension, to, filter, currentPage, pageSize); + ApiResponse localVarResponse = getMetricsOverTimeWithHttpInfo(metric, from, to, interval, filterBy, currentPage, pageSize); return localVarResponse.Data; } /// - /// Get play events for video Retrieve filtered analytics about the number of plays for your videos in a project. + /// Retrieve metrics over time Retrieve countable metrics like the number of plays or impressions, grouped by the time at which they occurred /// /// Thrown when fails to make API call /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. (optional) - /// Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. -/// Use this query parameter to define the dimension that you want analytics for. - `videoId`: Returns analytics based on the public video identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. -/// Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) -/// Use this query parameter to filter your results to a specific video in a project that you want analytics for. You must use the `videoId:` prefix when specifying a video ID. (optional) + /// Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. +/// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) +/// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +/// Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. (optional) +/// Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). (optional) /// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) /// Results per page. Allowed values 1-100, default is 25. (optional, default to 25) - /// ApiResponse of AnalyticsPlaysResponse - public Task> getVideosPlaysWithHttpInfoAsync(DateTime from, string dimension, DateTime? to = default, string filter = default, int? currentPage = default, int? pageSize = default, CancellationToken cancellationToken = default) + /// ApiResponse of AnalyticsMetricsOverTimeResponse + public Task> getMetricsOverTimeWithHttpInfoAsync(string metric, DateTime? from = default, DateTime? to = default, string interval = default, FilterBy2 filterBy = default, int? currentPage = default, int? pageSize = default, CancellationToken cancellationToken = default) { @@ -389,15 +675,13 @@ public Task> getVideosPlaysWithHttpInfoAsync - // verify the required parameter 'from' is set - if (from == null) - throw new ApiException(400, "Missing required parameter 'from' when calling AnalyticsApi->getVideosPlays"); - // verify the required parameter 'dimension' is set - if (dimension == null) - throw new ApiException(400, "Missing required parameter 'dimension' when calling AnalyticsApi->getVideosPlays"); + + // verify the required parameter 'metric' is set + if (metric == null) + throw new ApiException(400, "Missing required parameter 'metric' when calling AnalyticsApi->getMetricsOverTime"); - var localVarPath = "/analytics/videos/plays"; + var localVarPath = "/data/timeseries/{metric}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(); @@ -418,10 +702,11 @@ public Task> getVideosPlaysWithHttpInfoAsync if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + if (metric != null) localVarPathParams.Add("metric", this.ApiClient.ParameterToString(metric)); // path parameter if (from != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "from", from)); // query parameter if (to != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "to", to)); // query parameter - if (dimension != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "dimension", dimension)); // query parameter - if (filter != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "filter", filter)); // query parameter + if (interval != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "interval", interval)); // query parameter + if (filterBy != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "filterBy", filterBy)); // query parameter if (currentPage != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "currentPage", currentPage)); // query parameter if (pageSize != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "pageSize", pageSize)); // query parameter @@ -437,27 +722,28 @@ public Task> getVideosPlaysWithHttpInfoAsync return localVarResponse.ContinueWith((Task task) => { int localVarStatusCode = (int) task.Result.StatusCode; - return new ApiResponse(localVarStatusCode, + return new ApiResponse(localVarStatusCode, task.Result.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (AnalyticsPlaysResponse) this.ApiClient.Deserialize(task.Result, typeof(AnalyticsPlaysResponse))); + (AnalyticsMetricsOverTimeResponse) this.ApiClient.Deserialize(task.Result, typeof(AnalyticsMetricsOverTimeResponse))); }); } /// - /// Get play events for video Retrieve filtered analytics about the number of plays for your videos in a project. + /// Retrieve metrics over time Retrieve countable metrics like the number of plays or impressions, grouped by the time at which they occurred /// /// Thrown when fails to make API call - /// Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. -/// Use this query parameter to define the dimension that you want analytics for. - `videoId`: Returns analytics based on the public video identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. -/// Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) -/// Use this query parameter to filter your results to a specific video in a project that you want analytics for. You must use the `videoId:` prefix when specifying a video ID. (optional) + /// Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. +/// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) +/// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +/// Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. (optional) +/// Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). (optional) /// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) /// Results per page. Allowed values 1-100, default is 25. (optional, default to 25) - /// ApiResponse of AnalyticsPlaysResponse - public ApiResponse getVideosPlaysWithHttpInfo(DateTime from, string dimension, DateTime? to = default, string filter = default, int? currentPage = default, int? pageSize = default) + /// ApiResponse of AnalyticsMetricsOverTimeResponse + public ApiResponse getMetricsOverTimeWithHttpInfo(string metric, DateTime? from = default, DateTime? to = default, string interval = default, FilterBy2 filterBy = default, int? currentPage = default, int? pageSize = default) { @@ -465,15 +751,13 @@ public ApiResponse getVideosPlaysWithHttpInfo(DateTime f - // verify the required parameter 'from' is set - if (from == null) - throw new ApiException(400, "Missing required parameter 'from' when calling AnalyticsApi->getVideosPlays"); - // verify the required parameter 'dimension' is set - if (dimension == null) - throw new ApiException(400, "Missing required parameter 'dimension' when calling AnalyticsApi->getVideosPlays"); + + // verify the required parameter 'metric' is set + if (metric == null) + throw new ApiException(400, "Missing required parameter 'metric' when calling AnalyticsApi->getMetricsOverTime"); - var localVarPath = "/analytics/videos/plays"; + var localVarPath = "/data/timeseries/{metric}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(); @@ -494,10 +778,11 @@ public ApiResponse getVideosPlaysWithHttpInfo(DateTime f if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + if (metric != null) localVarPathParams.Add("metric", this.ApiClient.ParameterToString(metric)); // path parameter if (from != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "from", from)); // query parameter if (to != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "to", to)); // query parameter - if (dimension != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "dimension", dimension)); // query parameter - if (filter != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "filter", filter)); // query parameter + if (interval != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "interval", interval)); // query parameter + if (filterBy != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "filterBy", filterBy)); // query parameter if (currentPage != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "currentPage", currentPage)); // query parameter if (pageSize != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "pageSize", pageSize)); // query parameter @@ -510,31 +795,31 @@ public ApiResponse getVideosPlaysWithHttpInfo(DateTime f localVarPathParams, localVarContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - return new ApiResponse(localVarStatusCode, + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (AnalyticsPlaysResponse) this.ApiClient.Deserialize(localVarResponse, typeof(AnalyticsPlaysResponse))); + (AnalyticsMetricsOverTimeResponse) this.ApiClient.Deserialize(localVarResponse, typeof(AnalyticsMetricsOverTimeResponse))); } /// - /// Retrieve filtered analytics about the number of plays for your videos in a project. + /// Retrieve countable metrics like the number of plays or impressions, grouped by the time at which they occurred /// - /// Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (required) - /// Use this query parameter to define the dimension that you want analytics for. - `videoId`: Returns analytics based on the public video identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. (required) - /// APIgetVideosPlaysRequest - public APIgetVideosPlaysRequest getVideosPlays(DateTime from, string dimension) { - return new APIgetVideosPlaysRequest(this,from, dimension); + /// Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. (required) + /// APIgetMetricsOverTimeRequest + public APIgetMetricsOverTimeRequest getMetricsOverTime(string metric) { + return new APIgetMetricsOverTimeRequest(this,metric); } /// - /// Request getVideosPlays class to get paginated list of items + /// Request getMetricsOverTime class to get paginated list of items /// - public class APIgetVideosPlaysRequest { - private DateTime from; - private string dimension; + public class APIgetMetricsOverTimeRequest { + private string metric; + private DateTime? from; private DateTime? to; - private string filter; + private string interval; + private FilterBy2 filterBy; private int? currentPage; private int? pageSize; @@ -544,31 +829,49 @@ public class APIgetVideosPlaysRequest { /// Class constructor with api instance /// /// Instance of the current api - /// Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (required) - /// Use this query parameter to define the dimension that you want analytics for. - `videoId`: Returns analytics based on the public video identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. (required) - public APIgetVideosPlaysRequest(AnalyticsApi instance, DateTime from, string dimension) { - this.from = from; - this.dimension = dimension; + /// Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. (required) + public APIgetMetricsOverTimeRequest(AnalyticsApi instance, string metric) { + this.metric = metric; this.currentApiInstance = instance; } + /// + /// Set from + /// + /// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) + /// APIgetMetricsOverTimeRequest + public APIgetMetricsOverTimeRequest From(DateTime? from) { + this.from = from; + return this; + } + /// /// Set to /// - /// Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) - /// APIgetVideosPlaysRequest - public APIgetVideosPlaysRequest To(DateTime? to) { + /// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) + /// APIgetMetricsOverTimeRequest + public APIgetMetricsOverTimeRequest To(DateTime? to) { this.to = to; return this; } /// - /// Set filter + /// Set interval + /// + /// Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. (optional) + /// APIgetMetricsOverTimeRequest + public APIgetMetricsOverTimeRequest Interval(string interval) { + this.interval = interval; + return this; + } + + /// + /// Set filterBy /// - /// Use this query parameter to filter your results to a specific video in a project that you want analytics for. You must use the `videoId:` prefix when specifying a video ID. (optional) - /// APIgetVideosPlaysRequest - public APIgetVideosPlaysRequest Filter(string filter) { - this.filter = filter; + /// Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). (optional) + /// APIgetMetricsOverTimeRequest + public APIgetMetricsOverTimeRequest FilterBy(FilterBy2 filterBy) { + this.filterBy = filterBy; return this; } @@ -576,8 +879,8 @@ public APIgetVideosPlaysRequest Filter(string filter) { /// Set currentPage /// /// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) - /// APIgetVideosPlaysRequest - public APIgetVideosPlaysRequest CurrentPage(int? currentPage) { + /// APIgetMetricsOverTimeRequest + public APIgetMetricsOverTimeRequest CurrentPage(int? currentPage) { this.currentPage = currentPage; return this; } @@ -586,8 +889,8 @@ public APIgetVideosPlaysRequest CurrentPage(int? currentPage) { /// Set pageSize /// /// Results per page. Allowed values 1-100, default is 25. (optional, default to 25) - /// APIgetVideosPlaysRequest - public APIgetVideosPlaysRequest PageSize(int? pageSize) { + /// APIgetMetricsOverTimeRequest + public APIgetMetricsOverTimeRequest PageSize(int? pageSize) { this.pageSize = pageSize; return this; } @@ -595,12 +898,12 @@ public APIgetVideosPlaysRequest PageSize(int? pageSize) { /// - /// Execute getVideosPlays request + /// Execute getMetricsOverTime request /// - /// AnalyticsPlaysResponse - public Page execute(){ - ApiResponse localVarResp = this.currentApiInstance.getVideosPlaysWithHttpInfo(from, dimension, to, filter, currentPage, pageSize); - return new Page(localVarResp.Data.data, localVarResp.Data.pagination, () => { + /// AnalyticsMetricsOverTimeResponse + public Page execute(){ + ApiResponse localVarResp = this.currentApiInstance.getMetricsOverTimeWithHttpInfo(metric, from, to, interval, filterBy, currentPage, pageSize); + return new Page(localVarResp.Data.data, localVarResp.Data.pagination, () => { try { return copy().CurrentPage((currentPage == null ? 1 : currentPage) + 1).execute(); } catch (ApiException e) { @@ -609,10 +912,12 @@ public Page execute(){ }); } - private APIgetVideosPlaysRequest copy() { - APIgetVideosPlaysRequest copy = new APIgetVideosPlaysRequest( this.currentApiInstance, from, dimension); + private APIgetMetricsOverTimeRequest copy() { + APIgetMetricsOverTimeRequest copy = new APIgetMetricsOverTimeRequest( this.currentApiInstance, metric); + copy.From(from); copy.To(to); - copy.Filter(filter); + copy.Interval(interval); + copy.FilterBy(filterBy); copy.CurrentPage(currentPage); copy.PageSize(pageSize); return copy; diff --git a/src/Api/CaptionsApi.cs b/src/Api/CaptionsApi.cs index 6720ab6..e4236fd 100644 --- a/src/Api/CaptionsApi.cs +++ b/src/Api/CaptionsApi.cs @@ -595,9 +595,9 @@ public ApiResponse updateWithHttpInfo(string videoId, string language, /// A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). - This parameter **only accepts dashes for separators**, for example `fr-CA`. If you use a different separator in your request, the API returns an error. - When the value in your request does not match any covered language, the API returns an error. - You can find the list of supported tags [here](https://docs.api.video/vod/add-captions#supported-caption-language-tags). /// - public void deleteAsync(string videoId, string language, CancellationToken cancellationToken = default) + public Task> deleteAsync(string videoId, string language, CancellationToken cancellationToken = default) { - deleteWithHttpInfoAsync(videoId, language, cancellationToken); + return deleteWithHttpInfoAsync(videoId, language, cancellationToken); } /// diff --git a/src/Api/ChaptersApi.cs b/src/Api/ChaptersApi.cs index 0e116be..66d33a3 100644 --- a/src/Api/ChaptersApi.cs +++ b/src/Api/ChaptersApi.cs @@ -383,9 +383,9 @@ public ApiResponse getWithHttpInfo(string videoId, string language) /// A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. /// - public void deleteAsync(string videoId, string language, CancellationToken cancellationToken = default) + public Task> deleteAsync(string videoId, string language, CancellationToken cancellationToken = default) { - deleteWithHttpInfoAsync(videoId, language, cancellationToken); + return deleteWithHttpInfoAsync(videoId, language, cancellationToken); } /// diff --git a/src/Api/LiveStreamsApi.cs b/src/Api/LiveStreamsApi.cs index b6087de..ddd56b7 100644 --- a/src/Api/LiveStreamsApi.cs +++ b/src/Api/LiveStreamsApi.cs @@ -544,9 +544,9 @@ public ApiResponse updateWithHttpInfo(string liveStreamId, LiveStrea /// The unique ID for the live stream that you want to remove. /// - public void deleteAsync(string liveStreamId, CancellationToken cancellationToken = default) + public Task> deleteAsync(string liveStreamId, CancellationToken cancellationToken = default) { - deleteWithHttpInfoAsync(liveStreamId, cancellationToken); + return deleteWithHttpInfoAsync(liveStreamId, cancellationToken); } /// @@ -1273,6 +1273,144 @@ public ApiResponse deleteThumbnailWithHttpInfo(string liveStreamId) } + /// + /// Complete a live stream Request the completion of a live stream that is currently running. This operation is asynchronous and the live stream will stop after a few seconds. The API adds the `EXT-X-ENDLIST` tag to the live stream's HLS manifest. This stops the live stream on the player and also stops the recording of the live stream. The API keeps the incoming connection from the streamer open for at most 1 minute, which can be used to terminate the stream. + /// + /// Thrown when fails to make API call + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. (optional) + /// The unique ID for the live stream you want to complete. + + /// + public Task> completeAsync(string liveStreamId, CancellationToken cancellationToken = default) + { + return completeWithHttpInfoAsync(liveStreamId, cancellationToken); + } + + /// + /// Complete a live stream Request the completion of a live stream that is currently running. This operation is asynchronous and the live stream will stop after a few seconds. The API adds the `EXT-X-ENDLIST` tag to the live stream's HLS manifest. This stops the live stream on the player and also stops the recording of the live stream. The API keeps the incoming connection from the streamer open for at most 1 minute, which can be used to terminate the stream. + /// + /// Thrown when fails to make API call + /// The unique ID for the live stream you want to complete. + + /// + public void complete(string liveStreamId) + { + completeWithHttpInfo(liveStreamId); + } + + + /// + /// Complete a live stream Request the completion of a live stream that is currently running. This operation is asynchronous and the live stream will stop after a few seconds. The API adds the `EXT-X-ENDLIST` tag to the live stream's HLS manifest. This stops the live stream on the player and also stops the recording of the live stream. The API keeps the incoming connection from the streamer open for at most 1 minute, which can be used to terminate the stream. + /// + /// Thrown when fails to make API call + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. (optional) + /// The unique ID for the live stream you want to complete. + + /// ApiResponse of Object(void) + public Task> completeWithHttpInfoAsync(string liveStreamId, CancellationToken cancellationToken = default) + { + + // verify the required parameter 'liveStreamId' is set + if (liveStreamId == null) + throw new ApiException(400, "Missing required parameter 'liveStreamId' when calling LiveStreamsApi->complete"); + + + var localVarPath = "/live-streams/{liveStreamId}/complete"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + string[] localVarContentTypes = new string[] { + }; + string localVarContentType = ApiClient.SelectHeaderContentType(localVarContentTypes); + localVarHeaderParams.Add("Content-Type", localVarContentType); + // to determine the Accept header + string[] localVarHttpHeaderAccepts = new string[] { + "application/json" + }; + string localVarHttpHeaderAccept = ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (liveStreamId != null) localVarPathParams.Add("liveStreamId", this.ApiClient.ParameterToString(liveStreamId)); // path parameter + + + + + // make the HTTP request + Task localVarResponse = (Task) this.ApiClient.CallApiAsync(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarContentType, cancellationToken); + + return localVarResponse.ContinueWith((Task task) => + { + int localVarStatusCode = (int) task.Result.StatusCode; + return new ApiResponse(localVarStatusCode, + task.Result.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + }); + + } + + + /// + /// Complete a live stream Request the completion of a live stream that is currently running. This operation is asynchronous and the live stream will stop after a few seconds. The API adds the `EXT-X-ENDLIST` tag to the live stream's HLS manifest. This stops the live stream on the player and also stops the recording of the live stream. The API keeps the incoming connection from the streamer open for at most 1 minute, which can be used to terminate the stream. + /// + /// Thrown when fails to make API call + /// The unique ID for the live stream you want to complete. + + /// ApiResponse of Object(void) + public ApiResponse completeWithHttpInfo(string liveStreamId) + { + + // verify the required parameter 'liveStreamId' is set + if (liveStreamId == null) + throw new ApiException(400, "Missing required parameter 'liveStreamId' when calling LiveStreamsApi->complete"); + + + var localVarPath = "/live-streams/{liveStreamId}/complete"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + string[] localVarContentTypes = new string[] { + }; + string localVarContentType = ApiClient.SelectHeaderContentType(localVarContentTypes); + localVarHeaderParams.Add("Content-Type", localVarContentType); + // to determine the Accept header + string[] localVarHttpHeaderAccepts = new string[] { + "application/json" + }; + string localVarHttpHeaderAccept = ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (liveStreamId != null) localVarPathParams.Add("liveStreamId", this.ApiClient.ParameterToString(liveStreamId)); // path parameter + + + + + // make the HTTP request + RestResponse localVarResponse = (RestResponse) this.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + + } + + } diff --git a/src/Api/PlayerThemesApi.cs b/src/Api/PlayerThemesApi.cs index c4c4f0e..8730176 100644 --- a/src/Api/PlayerThemesApi.cs +++ b/src/Api/PlayerThemesApi.cs @@ -538,9 +538,9 @@ public ApiResponse updateWithHttpInfo(string playerId, PlayerThemeU /// The unique identifier for the player you want to delete. /// - public void deleteAsync(string playerId, CancellationToken cancellationToken = default) + public Task> deleteAsync(string playerId, CancellationToken cancellationToken = default) { - deleteWithHttpInfoAsync(playerId, cancellationToken); + return deleteWithHttpInfoAsync(playerId, cancellationToken); } /// @@ -1105,9 +1105,9 @@ public ApiResponse uploadLogoWithHttpInfo(string playerId, System.I /// The unique identifier for the player. /// - public void deleteLogoAsync(string playerId, CancellationToken cancellationToken = default) + public Task> deleteLogoAsync(string playerId, CancellationToken cancellationToken = default) { - deleteLogoWithHttpInfoAsync(playerId, cancellationToken); + return deleteLogoWithHttpInfoAsync(playerId, cancellationToken); } /// diff --git a/src/Api/UploadTokensApi.cs b/src/Api/UploadTokensApi.cs index 7775404..18e52b2 100644 --- a/src/Api/UploadTokensApi.cs +++ b/src/Api/UploadTokensApi.cs @@ -354,9 +354,9 @@ public ApiResponse getTokenWithHttpInfo(string uploadToken) /// The unique identifier for the upload token you want to delete. Deleting a token will make it so the token can no longer be used for authentication. /// - public void deleteTokenAsync(string uploadToken, CancellationToken cancellationToken = default) + public Task> deleteTokenAsync(string uploadToken, CancellationToken cancellationToken = default) { - deleteTokenWithHttpInfoAsync(uploadToken, cancellationToken); + return deleteTokenWithHttpInfoAsync(uploadToken, cancellationToken); } /// diff --git a/src/Api/VideosApi.cs b/src/Api/VideosApi.cs index 1dbad05..5742233 100644 --- a/src/Api/VideosApi.cs +++ b/src/Api/VideosApi.cs @@ -1395,9 +1395,9 @@ public ApiResponse [DataContract] - public class AuthenticatePayload { + public class AuthenticatePayload: DeepObject { /// /// Your account API key. You can use your sandbox API key, or you can use your production API key. /// diff --git a/src/Model/BadRequest.cs b/src/Model/BadRequest.cs index 5a537e2..0f500ba 100644 --- a/src/Model/BadRequest.cs +++ b/src/Model/BadRequest.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class BadRequest { + public class BadRequest: DeepObject { /// /// A link to the error documentation. /// diff --git a/src/Model/BytesRange.cs b/src/Model/BytesRange.cs index 30f57cb..427363f 100644 --- a/src/Model/BytesRange.cs +++ b/src/Model/BytesRange.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class BytesRange { + public class BytesRange: DeepObject { /// /// The starting point for the range of bytes for a chunk of a video. /// diff --git a/src/Model/Caption.cs b/src/Model/Caption.cs index 80e8815..358a54d 100644 --- a/src/Model/Caption.cs +++ b/src/Model/Caption.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class Caption { + public class Caption: DeepObject { /// /// The unique resource identifier of the uploaded caption. /// diff --git a/src/Model/CaptionsListResponse.cs b/src/Model/CaptionsListResponse.cs index d400c60..8216096 100644 --- a/src/Model/CaptionsListResponse.cs +++ b/src/Model/CaptionsListResponse.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class CaptionsListResponse { + public class CaptionsListResponse: DeepObject { /// /// Gets or Sets Data /// diff --git a/src/Model/CaptionsUpdatePayload.cs b/src/Model/CaptionsUpdatePayload.cs index c79d636..ca59e8d 100644 --- a/src/Model/CaptionsUpdatePayload.cs +++ b/src/Model/CaptionsUpdatePayload.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class CaptionsUpdatePayload { + public class CaptionsUpdatePayload: DeepObject { /// /// Gets or Sets Default /// diff --git a/src/Model/Chapter.cs b/src/Model/Chapter.cs index e39944d..c44c45d 100644 --- a/src/Model/Chapter.cs +++ b/src/Model/Chapter.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class Chapter { + public class Chapter: DeepObject { /// /// Gets or Sets Uri /// diff --git a/src/Model/ChaptersListResponse.cs b/src/Model/ChaptersListResponse.cs index 7dc6961..63effc3 100644 --- a/src/Model/ChaptersListResponse.cs +++ b/src/Model/ChaptersListResponse.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class ChaptersListResponse { + public class ChaptersListResponse: DeepObject { /// /// Gets or Sets Data /// diff --git a/src/Model/DeepObject.cs b/src/Model/DeepObject.cs new file mode 100644 index 0000000..651fc62 --- /dev/null +++ b/src/Model/DeepObject.cs @@ -0,0 +1,4 @@ +namespace ApiVideo.Model { + public interface DeepObject { + } +} \ No newline at end of file diff --git a/src/Model/FilterBy.cs b/src/Model/FilterBy.cs new file mode 100644 index 0000000..18e690e --- /dev/null +++ b/src/Model/FilterBy.cs @@ -0,0 +1,100 @@ +using System; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Newtonsoft.Json; + +namespace ApiVideo.Model { + + /// + /// + /// + [DataContract] + public class FilterBy: DeepObject { + /// + /// Returns analytics based on the unique identifiers of a video or a live stream. + /// + /// Returns analytics based on the unique identifiers of a video or a live stream. + [DataMember(Name="mediaId", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "mediaId")] + public List mediaid { get; set; } + /// + /// Gets or Sets MediaType + /// + [DataMember(Name="mediaType", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "mediaType")] + public string mediatype { get; set; } + /// + /// Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. + /// + /// Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. + [DataMember(Name="continent", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "continent")] + public List continent { get; set; } + /// + /// Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. + /// + /// Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. + [DataMember(Name="country", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "country")] + public List country { get; set; } + /// + /// Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. + /// + /// Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. + [DataMember(Name="deviceType", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "deviceType")] + public List devicetype { get; set; } + /// + /// Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. + /// + /// Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. + [DataMember(Name="operatingSystem", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "operatingSystem")] + public List operatingsystem { get; set; } + /// + /// Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. + /// + /// Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. + [DataMember(Name="browser", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "browser")] + public List browser { get; set; } + /// + /// Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). + /// + /// Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). + [DataMember(Name="tag", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "tag")] + public string tag { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class FilterBy {\n"); + sb.Append(" MediaId: ").Append(mediaid).Append("\n"); + sb.Append(" MediaType: ").Append(mediatype).Append("\n"); + sb.Append(" Continent: ").Append(continent).Append("\n"); + sb.Append(" Country: ").Append(country).Append("\n"); + sb.Append(" DeviceType: ").Append(devicetype).Append("\n"); + sb.Append(" OperatingSystem: ").Append(operatingsystem).Append("\n"); + sb.Append(" Browser: ").Append(browser).Append("\n"); + sb.Append(" Tag: ").Append(tag).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Get the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + +} +} diff --git a/src/Model/FilterBy1.cs b/src/Model/FilterBy1.cs new file mode 100644 index 0000000..a63c53e --- /dev/null +++ b/src/Model/FilterBy1.cs @@ -0,0 +1,100 @@ +using System; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Newtonsoft.Json; + +namespace ApiVideo.Model { + + /// + /// + /// + [DataContract] + public class FilterBy1: DeepObject { + /// + /// Returns analytics based on the unique identifiers of a video or a live stream. + /// + /// Returns analytics based on the unique identifiers of a video or a live stream. + [DataMember(Name="mediaId", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "mediaId")] + public List mediaid { get; set; } + /// + /// Gets or Sets MediaType + /// + [DataMember(Name="mediaType", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "mediaType")] + public string mediatype { get; set; } + /// + /// Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. + /// + /// Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. + [DataMember(Name="continent", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "continent")] + public List continent { get; set; } + /// + /// Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. + /// + /// Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. + [DataMember(Name="country", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "country")] + public List country { get; set; } + /// + /// Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. + /// + /// Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. + [DataMember(Name="deviceType", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "deviceType")] + public List devicetype { get; set; } + /// + /// Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. + /// + /// Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. + [DataMember(Name="operatingSystem", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "operatingSystem")] + public List operatingsystem { get; set; } + /// + /// Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. + /// + /// Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. + [DataMember(Name="browser", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "browser")] + public List browser { get; set; } + /// + /// Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). + /// + /// Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). + [DataMember(Name="tag", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "tag")] + public string tag { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class FilterBy1 {\n"); + sb.Append(" MediaId: ").Append(mediaid).Append("\n"); + sb.Append(" MediaType: ").Append(mediatype).Append("\n"); + sb.Append(" Continent: ").Append(continent).Append("\n"); + sb.Append(" Country: ").Append(country).Append("\n"); + sb.Append(" DeviceType: ").Append(devicetype).Append("\n"); + sb.Append(" OperatingSystem: ").Append(operatingsystem).Append("\n"); + sb.Append(" Browser: ").Append(browser).Append("\n"); + sb.Append(" Tag: ").Append(tag).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Get the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + +} +} diff --git a/src/Model/FilterBy2.cs b/src/Model/FilterBy2.cs new file mode 100644 index 0000000..3f21260 --- /dev/null +++ b/src/Model/FilterBy2.cs @@ -0,0 +1,100 @@ +using System; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Newtonsoft.Json; + +namespace ApiVideo.Model { + + /// + /// + /// + [DataContract] + public class FilterBy2: DeepObject { + /// + /// Returns analytics based on the unique identifiers of a video or a live stream. + /// + /// Returns analytics based on the unique identifiers of a video or a live stream. + [DataMember(Name="mediaId", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "mediaId")] + public List mediaid { get; set; } + /// + /// Gets or Sets MediaType + /// + [DataMember(Name="mediaType", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "mediaType")] + public string mediatype { get; set; } + /// + /// Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. + /// + /// Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. + [DataMember(Name="continent", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "continent")] + public List continent { get; set; } + /// + /// Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. + /// + /// Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. + [DataMember(Name="country", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "country")] + public List country { get; set; } + /// + /// Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. + /// + /// Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. + [DataMember(Name="deviceType", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "deviceType")] + public List devicetype { get; set; } + /// + /// Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. + /// + /// Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. + [DataMember(Name="operatingSystem", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "operatingSystem")] + public List operatingsystem { get; set; } + /// + /// Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. + /// + /// Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. + [DataMember(Name="browser", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "browser")] + public List browser { get; set; } + /// + /// Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). + /// + /// Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). + [DataMember(Name="tag", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "tag")] + public string tag { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class FilterBy2 {\n"); + sb.Append(" MediaId: ").Append(mediaid).Append("\n"); + sb.Append(" MediaType: ").Append(mediatype).Append("\n"); + sb.Append(" Continent: ").Append(continent).Append("\n"); + sb.Append(" Country: ").Append(country).Append("\n"); + sb.Append(" DeviceType: ").Append(devicetype).Append("\n"); + sb.Append(" OperatingSystem: ").Append(operatingsystem).Append("\n"); + sb.Append(" Browser: ").Append(browser).Append("\n"); + sb.Append(" Tag: ").Append(tag).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Get the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + +} +} diff --git a/src/Model/Link.cs b/src/Model/Link.cs index ad90e10..055dff0 100644 --- a/src/Model/Link.cs +++ b/src/Model/Link.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class Link { + public class Link: DeepObject { /// /// Gets or Sets Rel /// diff --git a/src/Model/LiveStream.cs b/src/Model/LiveStream.cs index 7ca50d4..91edb25 100644 --- a/src/Model/LiveStream.cs +++ b/src/Model/LiveStream.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class LiveStream { + public class LiveStream: DeepObject { /// /// The unique identifier for the live stream. Live stream IDs begin with \"li.\" /// @@ -34,9 +34,9 @@ public class LiveStream { [JsonProperty(PropertyName = "streamKey")] public string streamkey { get; set; } /// - /// Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management). + /// Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management). /// - /// Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management). + /// Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management). [DataMember(Name="public", EmitDefaultValue=false)] [JsonProperty(PropertyName = "public")] public Nullable _public { get; set; } @@ -61,9 +61,9 @@ public class LiveStream { [JsonProperty(PropertyName = "broadcasting")] public Nullable broadcasting { get; set; } /// - /// Returns the list of RTMP restream destinations. + /// Returns the list of restream destinations. /// - /// Returns the list of RTMP restream destinations. + /// Returns the list of restream destinations. [DataMember(Name="restreams", EmitDefaultValue=false)] [JsonProperty(PropertyName = "restreams")] public List restreams { get; set; } diff --git a/src/Model/LiveStreamAssets.cs b/src/Model/LiveStreamAssets.cs index 385c48c..40312c5 100644 --- a/src/Model/LiveStreamAssets.cs +++ b/src/Model/LiveStreamAssets.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class LiveStreamAssets { + public class LiveStreamAssets: DeepObject { /// /// The http live streaming (HLS) link for your live video stream. /// diff --git a/src/Model/LiveStreamCreationPayload.cs b/src/Model/LiveStreamCreationPayload.cs index 8b4065f..d8d098f 100644 --- a/src/Model/LiveStreamCreationPayload.cs +++ b/src/Model/LiveStreamCreationPayload.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class LiveStreamCreationPayload { + public class LiveStreamCreationPayload: DeepObject { /// /// Add a name for your live stream here. /// @@ -20,9 +20,9 @@ public class LiveStreamCreationPayload { [JsonProperty(PropertyName = "name")] public string name { get; set; } /// - /// Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management). + /// Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management). /// - /// Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management). + /// Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management). [DataMember(Name="public", EmitDefaultValue=false)] [JsonProperty(PropertyName = "public")] public Nullable _public { get; set; } @@ -34,9 +34,9 @@ public class LiveStreamCreationPayload { [JsonProperty(PropertyName = "playerId")] public string playerid { get; set; } /// - /// Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations. + /// Use this parameter to add, edit, or remove `RTMPS` or `RTMP` services where you want to restream a live stream. The list can only contain up to 5 destinations. /// - /// Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations. + /// Use this parameter to add, edit, or remove `RTMPS` or `RTMP` services where you want to restream a live stream. The list can only contain up to 5 destinations. [DataMember(Name="restreams", EmitDefaultValue=false)] [JsonProperty(PropertyName = "restreams")] public List restreams { get; set; } diff --git a/src/Model/LiveStreamListResponse.cs b/src/Model/LiveStreamListResponse.cs index deb7ab1..3361026 100644 --- a/src/Model/LiveStreamListResponse.cs +++ b/src/Model/LiveStreamListResponse.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class LiveStreamListResponse { + public class LiveStreamListResponse: DeepObject { /// /// Gets or Sets Data /// diff --git a/src/Model/LiveStreamSession.cs b/src/Model/LiveStreamSession.cs deleted file mode 100644 index e032b08..0000000 --- a/src/Model/LiveStreamSession.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Newtonsoft.Json; - -namespace ApiVideo.Model { - - /// - /// - /// - [DataContract] - public class LiveStreamSession { - /// - /// Gets or Sets Session - /// - [DataMember(Name="session", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "session")] - public LiveStreamSessionSession session { get; set; } - /// - /// Gets or Sets Location - /// - [DataMember(Name="location", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "location")] - public LiveStreamSessionLocation location { get; set; } - /// - /// Gets or Sets Referrer - /// - [DataMember(Name="referrer", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "referrer")] - public LiveStreamSessionReferrer referrer { get; set; } - /// - /// Gets or Sets Device - /// - [DataMember(Name="device", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "device")] - public LiveStreamSessionDevice device { get; set; } - /// - /// Gets or Sets Os - /// - [DataMember(Name="os", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "os")] - public VideoSessionOs os { get; set; } - /// - /// Gets or Sets _Client - /// - [DataMember(Name="client", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "client")] - public LiveStreamSessionClient _client { get; set; } - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class LiveStreamSession {\n"); - sb.Append(" Session: ").Append(session).Append("\n"); - sb.Append(" Location: ").Append(location).Append("\n"); - sb.Append(" Referrer: ").Append(referrer).Append("\n"); - sb.Append(" Device: ").Append(device).Append("\n"); - sb.Append(" Os: ").Append(os).Append("\n"); - sb.Append(" _Client: ").Append(_client).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - -} -} diff --git a/src/Model/LiveStreamSessionClient.cs b/src/Model/LiveStreamSessionClient.cs deleted file mode 100644 index 5a4c63f..0000000 --- a/src/Model/LiveStreamSessionClient.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Newtonsoft.Json; - -namespace ApiVideo.Model { - - /// - /// What kind of browser the viewer is using for the live stream session. - /// - [DataContract] - public class LiveStreamSessionClient { - /// - /// The name of the browser used to view the live stream session. - /// - /// The name of the browser used to view the live stream session. - [DataMember(Name="name", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "name")] - public string name { get; set; } - /// - /// The version of the browser used to view the live stream session. - /// - /// The version of the browser used to view the live stream session. - [DataMember(Name="version", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "version")] - public string version { get; set; } - /// - /// The type of client used to view the live stream session. - /// - /// The type of client used to view the live stream session. - [DataMember(Name="type", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "type")] - public string type { get; set; } - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class LiveStreamSessionClient {\n"); - sb.Append(" Name: ").Append(name).Append("\n"); - sb.Append(" Version: ").Append(version).Append("\n"); - sb.Append(" Type: ").Append(type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - -} -} diff --git a/src/Model/LiveStreamSessionDevice.cs b/src/Model/LiveStreamSessionDevice.cs deleted file mode 100644 index 4ba87f4..0000000 --- a/src/Model/LiveStreamSessionDevice.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Newtonsoft.Json; - -namespace ApiVideo.Model { - - /// - /// What type of device the user is on when in the live stream session. - /// - [DataContract] - public class LiveStreamSessionDevice { - /// - /// What the type is like desktop, laptop, mobile. - /// - /// What the type is like desktop, laptop, mobile. - [DataMember(Name="type", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "type")] - public string type { get; set; } - /// - /// If known, what the brand of the device is, like Apple, Dell, etc. - /// - /// If known, what the brand of the device is, like Apple, Dell, etc. - [DataMember(Name="vendor", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "vendor")] - public string vendor { get; set; } - /// - /// The specific model of the device, if known. - /// - /// The specific model of the device, if known. - [DataMember(Name="model", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "model")] - public string model { get; set; } - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class LiveStreamSessionDevice {\n"); - sb.Append(" Type: ").Append(type).Append("\n"); - sb.Append(" Vendor: ").Append(vendor).Append("\n"); - sb.Append(" Model: ").Append(model).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - -} -} diff --git a/src/Model/LiveStreamSessionLocation.cs b/src/Model/LiveStreamSessionLocation.cs deleted file mode 100644 index 33e5c70..0000000 --- a/src/Model/LiveStreamSessionLocation.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Newtonsoft.Json; - -namespace ApiVideo.Model { - - /// - /// The location of the viewer of the live stream. - /// - [DataContract] - public class LiveStreamSessionLocation { - /// - /// The country of the viewer of the live stream. - /// - /// The country of the viewer of the live stream. - [DataMember(Name="country", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "country")] - public string country { get; set; } - /// - /// The city of the viewer of the live stream. - /// - /// The city of the viewer of the live stream. - [DataMember(Name="city", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "city")] - public string city { get; set; } - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class LiveStreamSessionLocation {\n"); - sb.Append(" Country: ").Append(country).Append("\n"); - sb.Append(" City: ").Append(city).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - -} -} diff --git a/src/Model/LiveStreamSessionReferrer.cs b/src/Model/LiveStreamSessionReferrer.cs deleted file mode 100644 index 7e500d3..0000000 --- a/src/Model/LiveStreamSessionReferrer.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Newtonsoft.Json; - -namespace ApiVideo.Model { - - /// - /// - /// - [DataContract] - public class LiveStreamSessionReferrer { - /// - /// The website the viewer of the live stream was referred to in order to view the live stream. - /// - /// The website the viewer of the live stream was referred to in order to view the live stream. - [DataMember(Name="url", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "url")] - public string url { get; set; } - /// - /// The type of search that brought the viewer to the live stream. Organic would be they found it on their own, paid would be they found it via an advertisement. - /// - /// The type of search that brought the viewer to the live stream. Organic would be they found it on their own, paid would be they found it via an advertisement. - [DataMember(Name="medium", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "medium")] - public string medium { get; set; } - /// - /// Where the viewer came from to see the live stream (usually where they searched from). - /// - /// Where the viewer came from to see the live stream (usually where they searched from). - [DataMember(Name="source", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "source")] - public string source { get; set; } - /// - /// What term they searched for that led them to the live stream. - /// - /// What term they searched for that led them to the live stream. - [DataMember(Name="searchTerm", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "searchTerm")] - public string searchterm { get; set; } - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class LiveStreamSessionReferrer {\n"); - sb.Append(" Url: ").Append(url).Append("\n"); - sb.Append(" Medium: ").Append(medium).Append("\n"); - sb.Append(" Source: ").Append(source).Append("\n"); - sb.Append(" SearchTerm: ").Append(searchterm).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - -} -} diff --git a/src/Model/LiveStreamSessionSession.cs b/src/Model/LiveStreamSessionSession.cs deleted file mode 100644 index ec6cda3..0000000 --- a/src/Model/LiveStreamSessionSession.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Newtonsoft.Json; - -namespace ApiVideo.Model { - - /// - /// - /// - [DataContract] - public class LiveStreamSessionSession { - /// - /// A unique identifier for your session. You can use this to track what happens during a specific session. - /// - /// A unique identifier for your session. You can use this to track what happens during a specific session. - [DataMember(Name="sessionId", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "sessionId")] - public string sessionid { get; set; } - /// - /// When the session started, with the date and time presented in ISO-8601 format. - /// - /// When the session started, with the date and time presented in ISO-8601 format. - [DataMember(Name="loadedAt", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "loadedAt")] - public DateTime? loadedat { get; set; } - /// - /// When the session ended, with the date and time presented in ISO-8601 format. - /// - /// When the session ended, with the date and time presented in ISO-8601 format. - [DataMember(Name="endedAt", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "endedAt")] - public DateTime? endedat { get; set; } - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class LiveStreamSessionSession {\n"); - sb.Append(" SessionId: ").Append(sessionid).Append("\n"); - sb.Append(" LoadedAt: ").Append(loadedat).Append("\n"); - sb.Append(" EndedAt: ").Append(endedat).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - -} -} diff --git a/src/Model/LiveStreamUpdatePayload.cs b/src/Model/LiveStreamUpdatePayload.cs index 628e7e0..dcc3b9b 100644 --- a/src/Model/LiveStreamUpdatePayload.cs +++ b/src/Model/LiveStreamUpdatePayload.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class LiveStreamUpdatePayload { + public class LiveStreamUpdatePayload: DeepObject { /// /// The name you want to use for your live stream. /// @@ -20,9 +20,9 @@ public class LiveStreamUpdatePayload { [JsonProperty(PropertyName = "name")] public string name { get; set; } /// - /// Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management). + /// Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management). /// - /// Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management). + /// Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management). [DataMember(Name="public", EmitDefaultValue=false)] [JsonProperty(PropertyName = "public")] public Nullable _public { get; set; } @@ -34,9 +34,9 @@ public class LiveStreamUpdatePayload { [JsonProperty(PropertyName = "playerId")] public string playerid { get; set; } /// - /// Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is removed. + /// Use this parameter to add, edit, or remove `RTMPS` or `RTMP` services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is removed. /// - /// Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is removed. + /// Use this parameter to add, edit, or remove `RTMPS` or `RTMP` services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is removed. [DataMember(Name="restreams", EmitDefaultValue=false)] [JsonProperty(PropertyName = "restreams")] public List restreams { get; set; } diff --git a/src/Model/Metadata.cs b/src/Model/Metadata.cs index 892861c..619f5a4 100644 --- a/src/Model/Metadata.cs +++ b/src/Model/Metadata.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class Metadata { + public class Metadata: DeepObject { /// /// The constant that defines the data set. /// diff --git a/src/Model/Model403ErrorSchema.cs b/src/Model/Model403ErrorSchema.cs index 58e2905..95272f4 100644 --- a/src/Model/Model403ErrorSchema.cs +++ b/src/Model/Model403ErrorSchema.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class Model403ErrorSchema { + public class Model403ErrorSchema: DeepObject { /// /// A link to the error documentation. /// diff --git a/src/Model/NotFound.cs b/src/Model/NotFound.cs index 0299245..7dbd9df 100644 --- a/src/Model/NotFound.cs +++ b/src/Model/NotFound.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class NotFound { + public class NotFound: DeepObject { /// /// Gets or Sets Type /// diff --git a/src/Model/Pagination.cs b/src/Model/Pagination.cs index 50eda9e..d893e76 100644 --- a/src/Model/Pagination.cs +++ b/src/Model/Pagination.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class Pagination { + public class Pagination: DeepObject { /// /// Total number of items that exist. /// diff --git a/src/Model/PaginationLink.cs b/src/Model/PaginationLink.cs index ae88280..7ad89d9 100644 --- a/src/Model/PaginationLink.cs +++ b/src/Model/PaginationLink.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class PaginationLink { + public class PaginationLink: DeepObject { /// /// Gets or Sets Rel /// diff --git a/src/Model/PlayerSessionEvent.cs b/src/Model/PlayerSessionEvent.cs index 83f4cdd..27181c8 100644 --- a/src/Model/PlayerSessionEvent.cs +++ b/src/Model/PlayerSessionEvent.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class PlayerSessionEvent { + public class PlayerSessionEvent: DeepObject { /// /// Possible values are: ready, play, pause, resume, seek.backward, seek.forward, end /// diff --git a/src/Model/PlayerTheme.cs b/src/Model/PlayerTheme.cs index fa11111..375ac0c 100644 --- a/src/Model/PlayerTheme.cs +++ b/src/Model/PlayerTheme.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class PlayerTheme { + public class PlayerTheme: DeepObject { /// /// The name of the player theme /// diff --git a/src/Model/PlayerThemeAssets.cs b/src/Model/PlayerThemeAssets.cs index 7602931..2533cb1 100644 --- a/src/Model/PlayerThemeAssets.cs +++ b/src/Model/PlayerThemeAssets.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class PlayerThemeAssets { + public class PlayerThemeAssets: DeepObject { /// /// The name of the file containing the logo you want to use. /// diff --git a/src/Model/PlayerThemeCreationPayload.cs b/src/Model/PlayerThemeCreationPayload.cs index f46293a..2133a94 100644 --- a/src/Model/PlayerThemeCreationPayload.cs +++ b/src/Model/PlayerThemeCreationPayload.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class PlayerThemeCreationPayload { + public class PlayerThemeCreationPayload: DeepObject { /// /// Add a name for your player theme here. /// diff --git a/src/Model/PlayerThemeUpdatePayload.cs b/src/Model/PlayerThemeUpdatePayload.cs index e23b422..fa58983 100644 --- a/src/Model/PlayerThemeUpdatePayload.cs +++ b/src/Model/PlayerThemeUpdatePayload.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class PlayerThemeUpdatePayload { + public class PlayerThemeUpdatePayload: DeepObject { /// /// Add a name for your player theme here. /// diff --git a/src/Model/PlayerThemesListResponse.cs b/src/Model/PlayerThemesListResponse.cs index 70fdce3..77149e4 100644 --- a/src/Model/PlayerThemesListResponse.cs +++ b/src/Model/PlayerThemesListResponse.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class PlayerThemesListResponse { + public class PlayerThemesListResponse: DeepObject { /// /// Gets or Sets Data /// diff --git a/src/Model/Quality.cs b/src/Model/Quality.cs index f8e9ab7..3943666 100644 --- a/src/Model/Quality.cs +++ b/src/Model/Quality.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class Quality { + public class Quality: DeepObject { /// /// The type of video (hls or mp4). /// diff --git a/src/Model/RefreshTokenPayload.cs b/src/Model/RefreshTokenPayload.cs index 43f1c75..192985c 100644 --- a/src/Model/RefreshTokenPayload.cs +++ b/src/Model/RefreshTokenPayload.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class RefreshTokenPayload { + public class RefreshTokenPayload: DeepObject { /// /// The refresh token is either the first refresh token you received when you authenticated with the auth/api-key endpoint, or it's the refresh token from the last time you used the auth/refresh endpoint. Place this in the body of your request to obtain a new access token (which is valid for an hour) and a new refresh token. /// diff --git a/src/Model/RestreamsRequestObject.cs b/src/Model/RestreamsRequestObject.cs index 5c641de..3ab3d26 100644 --- a/src/Model/RestreamsRequestObject.cs +++ b/src/Model/RestreamsRequestObject.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// Adding restream destinations is optional. However, if you set a restream destination, you must provide all attributes for each destination. /// [DataContract] - public class RestreamsRequestObject { + public class RestreamsRequestObject: DeepObject { /// /// Use this parameter to define a name for the restream destination. /// @@ -20,9 +20,9 @@ public class RestreamsRequestObject { [JsonProperty(PropertyName = "name")] public string name { get; set; } /// - /// Use this parameter to set the RTMP URL of the restream destination. + /// Use this parameter to set the `RTMPS` or `RTMP` server URL of the restream destination. /// - /// Use this parameter to set the RTMP URL of the restream destination. + /// Use this parameter to set the `RTMPS` or `RTMP` server URL of the restream destination. [DataMember(Name="serverUrl", EmitDefaultValue=false)] [JsonProperty(PropertyName = "serverUrl")] public string serverurl { get; set; } diff --git a/src/Model/RestreamsResponseObject.cs b/src/Model/RestreamsResponseObject.cs index 8286253..0445a73 100644 --- a/src/Model/RestreamsResponseObject.cs +++ b/src/Model/RestreamsResponseObject.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class RestreamsResponseObject { + public class RestreamsResponseObject: DeepObject { /// /// Returns the name of a restream destination. /// @@ -20,9 +20,9 @@ public class RestreamsResponseObject { [JsonProperty(PropertyName = "name")] public string name { get; set; } /// - /// Returns the RTMP URL of a restream destination. + /// Returns the server URL of a restream destination. /// - /// Returns the RTMP URL of a restream destination. + /// Returns the server URL of a restream destination. [DataMember(Name="serverUrl", EmitDefaultValue=false)] [JsonProperty(PropertyName = "serverUrl")] public string serverurl { get; set; } diff --git a/src/Model/TokenCreationPayload.cs b/src/Model/TokenCreationPayload.cs index e6e285d..ac106d0 100644 --- a/src/Model/TokenCreationPayload.cs +++ b/src/Model/TokenCreationPayload.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class TokenCreationPayload { + public class TokenCreationPayload: DeepObject { /// /// Time in seconds that the token will be active. A value of 0 means that the token has no exipration date. The default is to have no expiration. /// diff --git a/src/Model/TokenListResponse.cs b/src/Model/TokenListResponse.cs index b334091..d7cdc41 100644 --- a/src/Model/TokenListResponse.cs +++ b/src/Model/TokenListResponse.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class TokenListResponse { + public class TokenListResponse: DeepObject { /// /// Gets or Sets Data /// diff --git a/src/Model/TooManyRequests.cs b/src/Model/TooManyRequests.cs index 44d7ae8..e2c577c 100644 --- a/src/Model/TooManyRequests.cs +++ b/src/Model/TooManyRequests.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class TooManyRequests { + public class TooManyRequests: DeepObject { /// /// A link to the error documentation. /// diff --git a/src/Model/VideoSessionDevice.cs b/src/Model/UnrecognizedRequestUrl.cs similarity index 53% rename from src/Model/VideoSessionDevice.cs rename to src/Model/UnrecognizedRequestUrl.cs index a36490f..3fdca66 100644 --- a/src/Model/VideoSessionDevice.cs +++ b/src/Model/UnrecognizedRequestUrl.cs @@ -8,31 +8,31 @@ namespace ApiVideo.Model { /// - /// What type of device the user is on when in the video session. + /// /// [DataContract] - public class VideoSessionDevice { + public class UnrecognizedRequestUrl: DeepObject { /// - /// What the type is like desktop, laptop, mobile. + /// A link to the error documentation. /// - /// What the type is like desktop, laptop, mobile. + /// A link to the error documentation. [DataMember(Name="type", EmitDefaultValue=false)] [JsonProperty(PropertyName = "type")] public string type { get; set; } /// - /// If known, what the brand of the device is, like Apple, Dell, etc. + /// A description of the error that occurred. /// - /// If known, what the brand of the device is, like Apple, Dell, etc. - [DataMember(Name="vendor", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "vendor")] - public string vendor { get; set; } + /// A description of the error that occurred. + [DataMember(Name="title", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "title")] + public string title { get; set; } /// - /// The specific model of the device, if known. + /// The HTTP status code. /// - /// The specific model of the device, if known. - [DataMember(Name="model", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "model")] - public string model { get; set; } + /// The HTTP status code. + [DataMember(Name="status", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "status")] + public int status { get; set; } /// @@ -41,10 +41,10 @@ public class VideoSessionDevice { /// String presentation of the object public override string ToString() { var sb = new StringBuilder(); - sb.Append("class VideoSessionDevice {\n"); + sb.Append("class UnrecognizedRequestUrl {\n"); sb.Append(" Type: ").Append(type).Append("\n"); - sb.Append(" Vendor: ").Append(vendor).Append("\n"); - sb.Append(" Model: ").Append(model).Append("\n"); + sb.Append(" Title: ").Append(title).Append("\n"); + sb.Append(" Status: ").Append(status).Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/src/Model/UploadToken.cs b/src/Model/UploadToken.cs index 4a35d30..da760f5 100644 --- a/src/Model/UploadToken.cs +++ b/src/Model/UploadToken.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class UploadToken { + public class UploadToken: DeepObject { /// /// The unique identifier for the token you will use to authenticate an upload. /// diff --git a/src/Model/Video.cs b/src/Model/Video.cs index e5ebc4f..1145bcc 100644 --- a/src/Model/Video.cs +++ b/src/Model/Video.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class Video { + public class Video: DeepObject { /// /// The unique identifier of the video object. /// diff --git a/src/Model/VideoAssets.cs b/src/Model/VideoAssets.cs index 8e513cd..26d1501 100644 --- a/src/Model/VideoAssets.cs +++ b/src/Model/VideoAssets.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// Collection of details about the video object that you can use to work with the video object. /// [DataContract] - public class VideoAssets { + public class VideoAssets: DeepObject { /// /// This is the manifest URL. For HTTP Live Streaming (HLS), when a HLS video stream is initiated, the first file to download is the manifest. This file has the extension M3U8, and provides the video player with information about the various bitrates available for streaming. /// diff --git a/src/Model/VideoClip.cs b/src/Model/VideoClip.cs index 48bc12e..ec41a55 100644 --- a/src/Model/VideoClip.cs +++ b/src/Model/VideoClip.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// Use this object to create a smaller clip from a video you upload. - You can only create video clips in the same request where you create the video container. - You cannot update the starting or ending timestamps of a video clip after you created the video container. - When you upload a video file into a container where you defined a starting and ending timestamp, the API trims the video according to those timestamps to create a clip. /// [DataContract] - public class VideoClip { + public class VideoClip: DeepObject { /// /// The timestamp that defines the beginning of the video clip you want to create. The value must follow the `HH:MM:SS` format. /// diff --git a/src/Model/VideoCreationPayload.cs b/src/Model/VideoCreationPayload.cs index 4f3ced0..17161bb 100644 --- a/src/Model/VideoCreationPayload.cs +++ b/src/Model/VideoCreationPayload.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class VideoCreationPayload { + public class VideoCreationPayload: DeepObject { /// /// The title of your new video. /// @@ -34,9 +34,9 @@ public class VideoCreationPayload { [JsonProperty(PropertyName = "source")] public string source { get; set; } /// - /// Default: True. If set to `false` the video will become private. More information on private videos can be found [here](https://docs.api.video/delivery-analytics/video-privacy-access-management) + /// Default: True. If set to `false` the video will become private. More information on private videos can be found [here](https://docs.api.video/delivery/video-privacy-access-management) /// - /// Default: True. If set to `false` the video will become private. More information on private videos can be found [here](https://docs.api.video/delivery-analytics/video-privacy-access-management) + /// Default: True. If set to `false` the video will become private. More information on private videos can be found [here](https://docs.api.video/delivery/video-privacy-access-management) [DataMember(Name="public", EmitDefaultValue=false)] [JsonProperty(PropertyName = "public")] public Nullable _public { get; set; } diff --git a/src/Model/VideoSession.cs b/src/Model/VideoSession.cs deleted file mode 100644 index a1f0baf..0000000 --- a/src/Model/VideoSession.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Newtonsoft.Json; - -namespace ApiVideo.Model { - - /// - /// - /// - [DataContract] - public class VideoSession { - /// - /// Gets or Sets Session - /// - [DataMember(Name="session", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "session")] - public VideoSessionSession session { get; set; } - /// - /// Gets or Sets Location - /// - [DataMember(Name="location", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "location")] - public VideoSessionLocation location { get; set; } - /// - /// Gets or Sets Referrer - /// - [DataMember(Name="referrer", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "referrer")] - public VideoSessionReferrer referrer { get; set; } - /// - /// Gets or Sets Device - /// - [DataMember(Name="device", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "device")] - public VideoSessionDevice device { get; set; } - /// - /// Gets or Sets Os - /// - [DataMember(Name="os", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "os")] - public VideoSessionOs os { get; set; } - /// - /// Gets or Sets _Client - /// - [DataMember(Name="client", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "client")] - public VideoSessionClient _client { get; set; } - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class VideoSession {\n"); - sb.Append(" Session: ").Append(session).Append("\n"); - sb.Append(" Location: ").Append(location).Append("\n"); - sb.Append(" Referrer: ").Append(referrer).Append("\n"); - sb.Append(" Device: ").Append(device).Append("\n"); - sb.Append(" Os: ").Append(os).Append("\n"); - sb.Append(" _Client: ").Append(_client).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - -} -} diff --git a/src/Model/VideoSessionClient.cs b/src/Model/VideoSessionClient.cs deleted file mode 100644 index 5a7412c..0000000 --- a/src/Model/VideoSessionClient.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Newtonsoft.Json; - -namespace ApiVideo.Model { - - /// - /// What kind of browser the viewer is using for the video session. - /// - [DataContract] - public class VideoSessionClient { - /// - /// The name of the browser used to view the video session. - /// - /// The name of the browser used to view the video session. - [DataMember(Name="name", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "name")] - public string name { get; set; } - /// - /// The version of the browser used to view the video session. - /// - /// The version of the browser used to view the video session. - [DataMember(Name="version", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "version")] - public string version { get; set; } - /// - /// The type of client used to view the video session. - /// - /// The type of client used to view the video session. - [DataMember(Name="type", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "type")] - public string type { get; set; } - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class VideoSessionClient {\n"); - sb.Append(" Name: ").Append(name).Append("\n"); - sb.Append(" Version: ").Append(version).Append("\n"); - sb.Append(" Type: ").Append(type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - -} -} diff --git a/src/Model/VideoSessionOs.cs b/src/Model/VideoSessionOs.cs deleted file mode 100644 index 8f09ee6..0000000 --- a/src/Model/VideoSessionOs.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Newtonsoft.Json; - -namespace ApiVideo.Model { - - /// - /// The operating system the viewer is on. - /// - [DataContract] - public class VideoSessionOs { - /// - /// The name of the operating system. - /// - /// The name of the operating system. - [DataMember(Name="name", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "name")] - public string name { get; set; } - /// - /// The nickname for the operating system, often representing the version. - /// - /// The nickname for the operating system, often representing the version. - [DataMember(Name="shortname", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "shortname")] - public string shortname { get; set; } - /// - /// The version of the operating system. - /// - /// The version of the operating system. - [DataMember(Name="version", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "version")] - public string version { get; set; } - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class VideoSessionOs {\n"); - sb.Append(" Name: ").Append(name).Append("\n"); - sb.Append(" Shortname: ").Append(shortname).Append("\n"); - sb.Append(" Version: ").Append(version).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - -} -} diff --git a/src/Model/VideoSessionReferrer.cs b/src/Model/VideoSessionReferrer.cs deleted file mode 100644 index 3bb410a..0000000 --- a/src/Model/VideoSessionReferrer.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Newtonsoft.Json; - -namespace ApiVideo.Model { - - /// - /// - /// - [DataContract] - public class VideoSessionReferrer { - /// - /// The link the viewer used to reach the video session. - /// - /// The link the viewer used to reach the video session. - [DataMember(Name="url", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "url")] - public string url { get; set; } - /// - /// How they arrived at the site, for example organic or paid. Organic meaning they found it themselves and paid meaning they followed a link from an advertisement. - /// - /// How they arrived at the site, for example organic or paid. Organic meaning they found it themselves and paid meaning they followed a link from an advertisement. - [DataMember(Name="medium", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "medium")] - public string medium { get; set; } - /// - /// The source the referrer came from to the video session. For example if they searched through google to find the stream. - /// - /// The source the referrer came from to the video session. For example if they searched through google to find the stream. - [DataMember(Name="source", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "source")] - public string source { get; set; } - /// - /// The search term they typed to arrive at the video session. - /// - /// The search term they typed to arrive at the video session. - [DataMember(Name="searchTerm", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "searchTerm")] - public string searchterm { get; set; } - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class VideoSessionReferrer {\n"); - sb.Append(" Url: ").Append(url).Append("\n"); - sb.Append(" Medium: ").Append(medium).Append("\n"); - sb.Append(" Source: ").Append(source).Append("\n"); - sb.Append(" SearchTerm: ").Append(searchterm).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - -} -} diff --git a/src/Model/VideoSessionSession.cs b/src/Model/VideoSessionSession.cs deleted file mode 100644 index 63208b3..0000000 --- a/src/Model/VideoSessionSession.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Newtonsoft.Json; - -namespace ApiVideo.Model { - - /// - /// - /// - [DataContract] - public class VideoSessionSession { - /// - /// The unique identifier for the session that you can use to track what happens during it. - /// - /// The unique identifier for the session that you can use to track what happens during it. - [DataMember(Name="sessionId", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "sessionId")] - public string sessionid { get; set; } - /// - /// When the video session started, presented in ISO-8601 format. - /// - /// When the video session started, presented in ISO-8601 format. - [DataMember(Name="loadedAt", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "loadedAt")] - public DateTime? loadedat { get; set; } - /// - /// When the video session ended, presented in ISO-8601 format. - /// - /// When the video session ended, presented in ISO-8601 format. - [DataMember(Name="endedAt", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "endedAt")] - public DateTime? endedat { get; set; } - /// - /// A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. You can also just use the pairs as another way to tag and categorize your videos. - /// - /// A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. You can also just use the pairs as another way to tag and categorize your videos. - [DataMember(Name="metadata", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "metadata")] - public List metadata { get; set; } - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class VideoSessionSession {\n"); - sb.Append(" SessionId: ").Append(sessionid).Append("\n"); - sb.Append(" LoadedAt: ").Append(loadedat).Append("\n"); - sb.Append(" EndedAt: ").Append(endedat).Append("\n"); - sb.Append(" Metadata: ").Append(metadata).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - -} -} diff --git a/src/Model/VideoSource.cs b/src/Model/VideoSource.cs index 43d0ee1..03499e4 100644 --- a/src/Model/VideoSource.cs +++ b/src/Model/VideoSource.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// Source information about the video. /// [DataContract] - public class VideoSource { + public class VideoSource: DeepObject { /// /// The URL where the video is stored. /// diff --git a/src/Model/VideoSourceLiveStream.cs b/src/Model/VideoSourceLiveStream.cs index b653b98..0ae6870 100644 --- a/src/Model/VideoSourceLiveStream.cs +++ b/src/Model/VideoSourceLiveStream.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// This appears if the video is from a Live Record. /// [DataContract] - public class VideoSourceLiveStream { + public class VideoSourceLiveStream: DeepObject { /// /// The unique identifier for the live stream. /// diff --git a/src/Model/VideoSourceLiveStreamLink.cs b/src/Model/VideoSourceLiveStreamLink.cs index ee6f938..1c3fb66 100644 --- a/src/Model/VideoSourceLiveStreamLink.cs +++ b/src/Model/VideoSourceLiveStreamLink.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class VideoSourceLiveStreamLink { + public class VideoSourceLiveStreamLink: DeepObject { /// /// Gets or Sets Rel /// diff --git a/src/Model/VideoStatus.cs b/src/Model/VideoStatus.cs index c2be361..04e4d72 100644 --- a/src/Model/VideoStatus.cs +++ b/src/Model/VideoStatus.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class VideoStatus { + public class VideoStatus: DeepObject { /// /// Gets or Sets Ingest /// diff --git a/src/Model/VideoStatusEncoding.cs b/src/Model/VideoStatusEncoding.cs index 1f0dda8..9d37f27 100644 --- a/src/Model/VideoStatusEncoding.cs +++ b/src/Model/VideoStatusEncoding.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class VideoStatusEncoding { + public class VideoStatusEncoding: DeepObject { /// /// Whether the video is playable or not. /// diff --git a/src/Model/VideoStatusEncodingMetadata.cs b/src/Model/VideoStatusEncodingMetadata.cs index 97324db..0fb83f9 100644 --- a/src/Model/VideoStatusEncodingMetadata.cs +++ b/src/Model/VideoStatusEncodingMetadata.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class VideoStatusEncodingMetadata { + public class VideoStatusEncodingMetadata: DeepObject { /// /// The width of the video in pixels. /// diff --git a/src/Model/VideoStatusIngest.cs b/src/Model/VideoStatusIngest.cs index eb7f5b8..4dd0b7a 100644 --- a/src/Model/VideoStatusIngest.cs +++ b/src/Model/VideoStatusIngest.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// Details about the capturing, transferring, and storing of your video for use immediately or in the future. /// [DataContract] - public class VideoStatusIngest { + public class VideoStatusIngest: DeepObject { /// /// There are four possible statuses depending on how you provide a video file: - `uploading` - the API is gathering the video source file from an upload. - `uploaded` - the video file is fully uploaded. - `ingesting` - the API is gathering the video source file from either a URL, or from cloning. - `ingested` - the video file is fully stored. /// diff --git a/src/Model/VideoStatusIngestReceivedParts.cs b/src/Model/VideoStatusIngestReceivedParts.cs index 827361b..8e8ceb4 100644 --- a/src/Model/VideoStatusIngestReceivedParts.cs +++ b/src/Model/VideoStatusIngestReceivedParts.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class VideoStatusIngestReceivedParts { + public class VideoStatusIngestReceivedParts: DeepObject { /// /// The parts that have been uploaded, ordered. For example, if part 2 was sent before part 1, and both have been uploaded, the output will be [1, 2]. /// diff --git a/src/Model/VideoThumbnailPickPayload.cs b/src/Model/VideoThumbnailPickPayload.cs index b86492f..f50499f 100644 --- a/src/Model/VideoThumbnailPickPayload.cs +++ b/src/Model/VideoThumbnailPickPayload.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class VideoThumbnailPickPayload { + public class VideoThumbnailPickPayload: DeepObject { /// /// Frame in video to be used as a placeholder before the video plays. Example: '\"00:01:00.000\" for 1 minute into the video.' Valid Patterns: \"hh:mm:ss.ms\" \"hh:mm:ss:frameNumber\" \"124\" (integer value is reported as seconds) If selection is out of range, \"00:00:00.00\" will be chosen. /// diff --git a/src/Model/VideoUpdatePayload.cs b/src/Model/VideoUpdatePayload.cs index b536a66..ee23300 100644 --- a/src/Model/VideoUpdatePayload.cs +++ b/src/Model/VideoUpdatePayload.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class VideoUpdatePayload { + public class VideoUpdatePayload: DeepObject { [DataMember(Name="playerId", EmitDefaultValue=false)] [JsonProperty(PropertyName = "playerId")] diff --git a/src/Model/VideoWatermark.cs b/src/Model/VideoWatermark.cs index ab862be..c8f0c60 100644 --- a/src/Model/VideoWatermark.cs +++ b/src/Model/VideoWatermark.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class VideoWatermark { + public class VideoWatermark: DeepObject { /// /// id of the watermark /// diff --git a/src/Model/VideosListResponse.cs b/src/Model/VideosListResponse.cs index 275e187..2bdec7c 100644 --- a/src/Model/VideosListResponse.cs +++ b/src/Model/VideosListResponse.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class VideosListResponse { + public class VideosListResponse: DeepObject { /// /// Gets or Sets Data /// diff --git a/src/Model/Watermark.cs b/src/Model/Watermark.cs index 8eb9c25..c7da1af 100644 --- a/src/Model/Watermark.cs +++ b/src/Model/Watermark.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class Watermark { + public class Watermark: DeepObject { /// /// The unique identifier of the watermark. /// diff --git a/src/Model/WatermarksListResponse.cs b/src/Model/WatermarksListResponse.cs index 2387a42..f5293da 100644 --- a/src/Model/WatermarksListResponse.cs +++ b/src/Model/WatermarksListResponse.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class WatermarksListResponse { + public class WatermarksListResponse: DeepObject { /// /// Gets or Sets Data /// diff --git a/src/Model/Webhook.cs b/src/Model/Webhook.cs index 266eecc..e05a4c5 100644 --- a/src/Model/Webhook.cs +++ b/src/Model/Webhook.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class Webhook { + public class Webhook: DeepObject { /// /// Unique identifier of the webhook /// diff --git a/src/Model/WebhooksCreationPayload.cs b/src/Model/WebhooksCreationPayload.cs index e363f04..36d8545 100644 --- a/src/Model/WebhooksCreationPayload.cs +++ b/src/Model/WebhooksCreationPayload.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class WebhooksCreationPayload { + public class WebhooksCreationPayload: DeepObject { /// /// A list of the webhooks that you are subscribing to. There are Currently four webhook options: * ```video.encoding.quality.completed``` Occurs when a new video is uploaded into your account, it will be encoded into several different HLS and mp4 qualities. When each version is encoded, your webhook will get a notification. It will look like ```{ \\\"type\\\": \\\"video.encoding.quality.completed\\\", \\\"emittedAt\\\": \\\"2021-01-29T16:46:25.217+01:00\\\", \\\"videoId\\\": \\\"viXXXXXXXX\\\", \\\"encoding\\\": \\\"hls\\\", \\\"quality\\\": \\\"720p\\\"} ```. This request says that the 720p HLS encoding was completed. * ```live-stream.broadcast.started``` When a live stream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires. * ```live-stream.broadcast.ended``` This event fires when a live stream has finished broadcasting. * ```video.source.recorded``` Occurs when a live stream is recorded and submitted for encoding. /// diff --git a/src/Model/WebhooksListResponse.cs b/src/Model/WebhooksListResponse.cs index 91dd7ba..88594b3 100644 --- a/src/Model/WebhooksListResponse.cs +++ b/src/Model/WebhooksListResponse.cs @@ -11,7 +11,7 @@ namespace ApiVideo.Model { /// /// [DataContract] - public class WebhooksListResponse { + public class WebhooksListResponse: DeepObject { /// /// Gets or Sets Data /// diff --git a/tests/resources/payloads/advancedauthentication/authenticate/responses/400.json b/tests/resources/payloads/advancedauthentication/authenticate/responses/400.json index 84cacbd..8d37eec 100644 --- a/tests/resources/payloads/advancedauthentication/authenticate/responses/400.json +++ b/tests/resources/payloads/advancedauthentication/authenticate/responses/400.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/authenticationinvalid_credentials", + "type" : "https://docs.api.video/reference/authentication-invalid-user-credentials", "title" : "The user credentials were incorrect.", "name" : "", "status" : 400 diff --git a/tests/resources/payloads/advancedauthentication/refresh/responses/400.json b/tests/resources/payloads/advancedauthentication/refresh/responses/400.json index 0c86651..b7e947e 100644 --- a/tests/resources/payloads/advancedauthentication/refresh/responses/400.json +++ b/tests/resources/payloads/advancedauthentication/refresh/responses/400.json @@ -1,6 +1,6 @@ { "status" : 400, - "type" : "https://docs.api.video/docs/authenticationinvalid_credentials", + "type" : "https://docs.api.video/reference/authentication-invalid-user-credentials", "title" : "The user credentials were incorrect.", "name" : "" } \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getAggregatedMetrics/responses/200.json b/tests/resources/payloads/analytics/getAggregatedMetrics/responses/200.json new file mode 100644 index 0000000..aad4f98 --- /dev/null +++ b/tests/resources/payloads/analytics/getAggregatedMetrics/responses/200.json @@ -0,0 +1,11 @@ +{ + "context" : { + "metric" : "impression", + "aggregation" : "count", + "timeframe" : { + "from" : "2024-05-28T11:15:07+00:00", + "to" : "2024-05-29T11:15:07+00:00" + } + }, + "data" : 346.5 +} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-0.json b/tests/resources/payloads/analytics/getAggregatedMetrics/responses/400-0.json similarity index 88% rename from tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-0.json rename to tests/resources/payloads/analytics/getAggregatedMetrics/responses/400-0.json index 84db8c3..4cbfb11 100644 --- a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-0.json +++ b/tests/resources/payloads/analytics/getAggregatedMetrics/responses/400-0.json @@ -3,5 +3,5 @@ "title" : "An attribute is invalid.", "status" : 400, "detail" : "This value must be of type string.", - "name" : "dimension" + "name" : "metric" } \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getVideosPlays/responses/400-5.json b/tests/resources/payloads/analytics/getAggregatedMetrics/responses/400-1.json similarity index 61% rename from tests/resources/payloads/analytics/getVideosPlays/responses/400-5.json rename to tests/resources/payloads/analytics/getAggregatedMetrics/responses/400-1.json index 080db28..061e505 100644 --- a/tests/resources/payloads/analytics/getVideosPlays/responses/400-5.json +++ b/tests/resources/payloads/analytics/getAggregatedMetrics/responses/400-1.json @@ -2,6 +2,6 @@ "type" : "https://docs.api.video/reference/request-invalid-query-parameter", "title" : "A query parameter is invalid.", "status" : 400, - "detail" : "This value must refer to an existing video", - "name" : "filter" + "detail" : "This field was not expected.", + "name" : "from:2024-05-20T09:15:05+02:00" } \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getAggregatedMetrics/responses/404.json b/tests/resources/payloads/analytics/getAggregatedMetrics/responses/404.json new file mode 100644 index 0000000..a1ef71d --- /dev/null +++ b/tests/resources/payloads/analytics/getAggregatedMetrics/responses/404.json @@ -0,0 +1,5 @@ +{ + "type" : "https://docs.api.video/reference/unrecognized-request-url", + "title" : "Unrecognized request URL.", + "status" : 404 +} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/429.json b/tests/resources/payloads/analytics/getAggregatedMetrics/responses/429.json similarity index 100% rename from tests/resources/payloads/analytics/getLiveStreamsPlays/responses/429.json rename to tests/resources/payloads/analytics/getAggregatedMetrics/responses/429.json diff --git a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/200-0.json b/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/200-0.json deleted file mode 100644 index 833d2ff..0000000 --- a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/200-0.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data" : [ { - "value" : "li3q7HxhApxRF1c8F8r6VeaI", - "plays" : 100 - }, { - "value" : "li3q7HxhApxRF1c8F8r6VeaB", - "plays" : 10 - }, { - "value" : "li3q7HxhApxRF1c8F8r6VeaD", - "plays" : 1 - } ], - "pagination" : { - "currentPage" : 1, - "currentPageItems" : 2, - "pageSize" : 2, - "pagesTotal" : 2, - "itemsTotal" : 3, - "links" : [ { - "rel" : "self", - "uri" : "/analytics/live-streams/plays?dimension=liveStreamId¤tPage=1&pageSize=2" - }, { - "rel" : "first", - "uri" : "/analytics/live-streams/plays?dimension=liveStreamId¤tPage=2&pageSize=1" - }, { - "rel" : "last", - "uri" : "/analytics/live-streams/plays?dimension=liveStreamId¤tPage=2&pageSize=1" - } ] - } -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/200-1.json b/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/200-1.json deleted file mode 100644 index cf2e9e5..0000000 --- a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/200-1.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data" : [ { - "value" : "france", - "plays" : 100 - }, { - "value" : "united states", - "plays" : 10 - }, { - "value" : "spain", - "plays" : 1 - } ], - "pagination" : { - "currentPage" : 1, - "currentPageItems" : 2, - "pageSize" : 2, - "pagesTotal" : 2, - "itemsTotal" : 3, - "links" : [ { - "rel" : "self", - "uri" : "/analytics/live-streams/plays?dimension=country¤tPage=1&pageSize=2" - }, { - "rel" : "first", - "uri" : "/analytics/live-streams/plays?dimension=country¤tPage=1&pageSize=2" - }, { - "rel" : "last", - "uri" : "/analytics/live-streams/plays?dimension=country¤tPage=2&pageSize=1" - } ] - } -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/200-2.json b/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/200-2.json deleted file mode 100644 index 4e08c61..0000000 --- a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/200-2.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data" : [ { - "value" : "2023-06-10T10:00:00.000Z", - "plays" : 100 - }, { - "value" : "2023-06-10T11:00:00.000Z", - "plays" : 10 - }, { - "value" : "2023-06-10T12:00:00.000Z", - "plays" : 1 - } ], - "pagination" : { - "currentPage" : 1, - "currentPageItems" : 3, - "pageSize" : 25, - "pagesTotal" : 1, - "itemsTotal" : 3, - "links" : [ { - "rel" : "self", - "uri" : "/analytics/live-streams/plays?dimension=videoId&filter=liveStreamId:li3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25" - }, { - "rel" : "first", - "uri" : "/analytics/live-streams/plays?dimension=videoId&filter=liveStreamId:li3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25" - }, { - "rel" : "last", - "uri" : "/analytics/live-streams/plays?dimension=videoId&filter=liveStreamId:li3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25" - } ] - } -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-1.json b/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-1.json deleted file mode 100644 index eaf7c78..0000000 --- a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/request-invalid-query-parameter", - "title" : "A query parameter is invalid.", - "status" : 400, - "detail" : "This value must be of the following structure(s): liveStreamId:{liveStreamId}", - "name" : "filter" -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-2.json b/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-2.json deleted file mode 100644 index 282264f..0000000 --- a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-2.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/request-invalid-query-parameter", - "title" : "A query parameter is invalid.", - "status" : 400, - "detail" : "This value must be part of the following values: emittedAt,liveStreamId,country,deviceType,operatingSystem,browser", - "name" : "dimension" -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-3.json b/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-3.json deleted file mode 100644 index 282264f..0000000 --- a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-3.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/request-invalid-query-parameter", - "title" : "A query parameter is invalid.", - "status" : 400, - "detail" : "This value must be part of the following values: emittedAt,liveStreamId,country,deviceType,operatingSystem,browser", - "name" : "dimension" -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-4.json b/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-4.json deleted file mode 100644 index eaf7c78..0000000 --- a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-4.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/request-invalid-query-parameter", - "title" : "A query parameter is invalid.", - "status" : 400, - "detail" : "This value must be of the following structure(s): liveStreamId:{liveStreamId}", - "name" : "filter" -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/403.json b/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/403.json deleted file mode 100644 index cdd0425..0000000 --- a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/403.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/authorization-disabled-analytics", - "title" : "You cannot get analytics from this project.", - "status" : 403 -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/404.json b/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/404.json deleted file mode 100644 index f366b6f..0000000 --- a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/404.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "status" : 404 -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getMetricsBreakdown/responses/200.json b/tests/resources/payloads/analytics/getMetricsBreakdown/responses/200.json new file mode 100644 index 0000000..f5cdba3 --- /dev/null +++ b/tests/resources/payloads/analytics/getMetricsBreakdown/responses/200.json @@ -0,0 +1,31 @@ +{ + "context" : { + "metric" : "play", + "breakdown" : "country", + "timeframe" : { + "from" : "2024-04-28T07:15:05+00:00", + "to" : "2024-05-29T11:25:37+00:00" + } + }, + "data" : [ { + "metricValue" : 7, + "dimensionValue" : "FR" + } ], + "pagination" : { + "currentPage" : 1, + "currentPageItems" : 1, + "pageSize" : 25, + "pagesTotal" : 1, + "itemsTotal" : 1, + "links" : [ { + "rel" : "self", + "uri" : "/data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00¤tPage=1&pageSize=25" + }, { + "rel" : "first", + "uri" : "/data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00¤tPage=1&pageSize=25" + }, { + "rel" : "last", + "uri" : "/data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00¤tPage=1&pageSize=25" + } ] + } +} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getVideosPlays/responses/400-0.json b/tests/resources/payloads/analytics/getMetricsBreakdown/responses/400-0.json similarity index 88% rename from tests/resources/payloads/analytics/getVideosPlays/responses/400-0.json rename to tests/resources/payloads/analytics/getMetricsBreakdown/responses/400-0.json index 84db8c3..4cbfb11 100644 --- a/tests/resources/payloads/analytics/getVideosPlays/responses/400-0.json +++ b/tests/resources/payloads/analytics/getMetricsBreakdown/responses/400-0.json @@ -3,5 +3,5 @@ "title" : "An attribute is invalid.", "status" : 400, "detail" : "This value must be of type string.", - "name" : "dimension" + "name" : "metric" } \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-5.json b/tests/resources/payloads/analytics/getMetricsBreakdown/responses/400-1.json similarity index 61% rename from tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-5.json rename to tests/resources/payloads/analytics/getMetricsBreakdown/responses/400-1.json index 95b2f61..061e505 100644 --- a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-5.json +++ b/tests/resources/payloads/analytics/getMetricsBreakdown/responses/400-1.json @@ -2,6 +2,6 @@ "type" : "https://docs.api.video/reference/request-invalid-query-parameter", "title" : "A query parameter is invalid.", "status" : 400, - "detail" : "This value must refer to an existing live stream", - "name" : "filter" + "detail" : "This field was not expected.", + "name" : "from:2024-05-20T09:15:05+02:00" } \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getMetricsBreakdown/responses/404.json b/tests/resources/payloads/analytics/getMetricsBreakdown/responses/404.json new file mode 100644 index 0000000..a1ef71d --- /dev/null +++ b/tests/resources/payloads/analytics/getMetricsBreakdown/responses/404.json @@ -0,0 +1,5 @@ +{ + "type" : "https://docs.api.video/reference/unrecognized-request-url", + "title" : "Unrecognized request URL.", + "status" : 404 +} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getVideosPlays/responses/429.json b/tests/resources/payloads/analytics/getMetricsBreakdown/responses/429.json similarity index 100% rename from tests/resources/payloads/analytics/getVideosPlays/responses/429.json rename to tests/resources/payloads/analytics/getMetricsBreakdown/responses/429.json diff --git a/tests/resources/payloads/analytics/getMetricsOverTime/responses/200.json b/tests/resources/payloads/analytics/getMetricsOverTime/responses/200.json new file mode 100644 index 0000000..b5a6342 --- /dev/null +++ b/tests/resources/payloads/analytics/getMetricsOverTime/responses/200.json @@ -0,0 +1,37 @@ +{ + "context" : { + "metric" : "play", + "interval" : "hour", + "timeframe" : { + "from" : "2024-05-28T11:08:39+00:00", + "to" : "2024-05-29T11:08:39+00:00" + } + }, + "data" : [ { + "emittedAt" : "2024-05-29T07:00:00+00:00", + "metricValue" : 2 + }, { + "emittedAt" : "2024-05-29T08:00:00+00:00", + "metricValue" : 1 + }, { + "emittedAt" : "2024-05-29T09:00:00+00:00", + "metricValue" : 1 + } ], + "pagination" : { + "currentPage" : 1, + "currentPageItems" : 3, + "pageSize" : 25, + "pagesTotal" : 1, + "itemsTotal" : 3, + "links" : [ { + "rel" : "self", + "uri" : "/data/timeseries/play?currentPage=1&pageSize=25" + }, { + "rel" : "first", + "uri" : "/data/timeseries/play?currentPage=1&pageSize=25" + }, { + "rel" : "last", + "uri" : "/data/timeseries/play?currentPage=1&pageSize=25" + } ] + } +} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getMetricsOverTime/responses/400-0.json b/tests/resources/payloads/analytics/getMetricsOverTime/responses/400-0.json new file mode 100644 index 0000000..4cbfb11 --- /dev/null +++ b/tests/resources/payloads/analytics/getMetricsOverTime/responses/400-0.json @@ -0,0 +1,7 @@ +{ + "type" : "https://docs.api.video/reference/invalid-attribute", + "title" : "An attribute is invalid.", + "status" : 400, + "detail" : "This value must be of type string.", + "name" : "metric" +} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getVideosPlays/responses/400-1.json b/tests/resources/payloads/analytics/getMetricsOverTime/responses/400-1.json similarity index 58% rename from tests/resources/payloads/analytics/getVideosPlays/responses/400-1.json rename to tests/resources/payloads/analytics/getMetricsOverTime/responses/400-1.json index b1044e2..061e505 100644 --- a/tests/resources/payloads/analytics/getVideosPlays/responses/400-1.json +++ b/tests/resources/payloads/analytics/getMetricsOverTime/responses/400-1.json @@ -2,6 +2,6 @@ "type" : "https://docs.api.video/reference/request-invalid-query-parameter", "title" : "A query parameter is invalid.", "status" : 400, - "detail" : "This value must be of the following structure(s): videoId:{videoId}", - "name" : "filter" + "detail" : "This field was not expected.", + "name" : "from:2024-05-20T09:15:05+02:00" } \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getMetricsOverTime/responses/404.json b/tests/resources/payloads/analytics/getMetricsOverTime/responses/404.json new file mode 100644 index 0000000..a1ef71d --- /dev/null +++ b/tests/resources/payloads/analytics/getMetricsOverTime/responses/404.json @@ -0,0 +1,5 @@ +{ + "type" : "https://docs.api.video/reference/unrecognized-request-url", + "title" : "Unrecognized request URL.", + "status" : 404 +} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getMetricsOverTime/responses/429.json b/tests/resources/payloads/analytics/getMetricsOverTime/responses/429.json new file mode 100644 index 0000000..d312e2b --- /dev/null +++ b/tests/resources/payloads/analytics/getMetricsOverTime/responses/429.json @@ -0,0 +1,5 @@ +{ + "type" : "https://docs.api.video/reference/too-many-requests", + "title" : "Too many requests.", + "status" : 429 +} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getVideosPlays/responses/200-0.json b/tests/resources/payloads/analytics/getVideosPlays/responses/200-0.json deleted file mode 100644 index f0d1e9a..0000000 --- a/tests/resources/payloads/analytics/getVideosPlays/responses/200-0.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data" : [ { - "value" : "vi3q7HxhApxRF1c8F8r6VeaI", - "plays" : 100 - }, { - "value" : "vi3q7HxhApxRF1c8F8r6VeaF", - "plays" : 10 - }, { - "value" : "vi3q7HxhApxRF1c8F8r6VeaH", - "plays" : 1 - } ], - "pagination" : { - "currentPage" : 1, - "currentPageItems" : 3, - "pageSize" : 25, - "pagesTotal" : 1, - "itemsTotal" : 3, - "links" : [ { - "rel" : "self", - "uri" : "/analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25" - }, { - "rel" : "first", - "uri" : "/analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25" - }, { - "rel" : "last", - "uri" : "/analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25" - } ] - } -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getVideosPlays/responses/200-1.json b/tests/resources/payloads/analytics/getVideosPlays/responses/200-1.json deleted file mode 100644 index 7348fe2..0000000 --- a/tests/resources/payloads/analytics/getVideosPlays/responses/200-1.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "data" : [ { - "value" : "france", - "plays" : 100 - }, { - "value" : "united states", - "plays" : 10 - }, { - "value" : "spain", - "plays" : 1 - } ], - "pagination" : { - "currentPage" : 1, - "currentPageItems" : 2, - "pageSize" : 2, - "pagesTotal" : 2, - "itemsTotal" : 3, - "links" : [ { - "rel" : "self", - "uri" : "/analytics/videos/plays?dimension=country¤tPage=1&pageSize=2" - }, { - "rel" : "first", - "uri" : "/analytics/videos/plays?dimension=country¤tPage=1&pageSize=2" - }, { - "rel" : "next", - "uri" : "/analytics/videos/plays?dimension=country¤tPage=2&pageSize=1" - }, { - "rel" : "last", - "uri" : "/analytics/videos/plays?dimension=country¤tPage=2&pageSize=1" - } ] - } -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getVideosPlays/responses/200-2.json b/tests/resources/payloads/analytics/getVideosPlays/responses/200-2.json deleted file mode 100644 index ae770da..0000000 --- a/tests/resources/payloads/analytics/getVideosPlays/responses/200-2.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data" : [ { - "value" : "2023-06-10T10:00:00.000Z", - "plays" : 100 - }, { - "value" : "2023-06-10T11:00:00.000Z", - "plays" : 10 - }, { - "value" : "2023-06-10T12:00:00.000Z", - "plays" : 1 - } ], - "pagination" : { - "currentPage" : 1, - "currentPageItems" : 3, - "pageSize" : 25, - "pagesTotal" : 1, - "itemsTotal" : 3, - "links" : [ { - "rel" : "self", - "uri" : "/analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25" - }, { - "rel" : "first", - "uri" : "/analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25" - }, { - "rel" : "last", - "uri" : "/analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25" - } ] - } -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getVideosPlays/responses/400-2.json b/tests/resources/payloads/analytics/getVideosPlays/responses/400-2.json deleted file mode 100644 index 3f739e6..0000000 --- a/tests/resources/payloads/analytics/getVideosPlays/responses/400-2.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/request-invalid-query-parameter", - "title" : "A query parameter is invalid.", - "status" : 400, - "detail" : "This value must be part of the following values: emittedAt,videoId,country,deviceType,operatingSystem,browser", - "name" : "dimension" -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getVideosPlays/responses/400-3.json b/tests/resources/payloads/analytics/getVideosPlays/responses/400-3.json deleted file mode 100644 index 3f739e6..0000000 --- a/tests/resources/payloads/analytics/getVideosPlays/responses/400-3.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/request-invalid-query-parameter", - "title" : "A query parameter is invalid.", - "status" : 400, - "detail" : "This value must be part of the following values: emittedAt,videoId,country,deviceType,operatingSystem,browser", - "name" : "dimension" -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getVideosPlays/responses/400-4.json b/tests/resources/payloads/analytics/getVideosPlays/responses/400-4.json deleted file mode 100644 index b1044e2..0000000 --- a/tests/resources/payloads/analytics/getVideosPlays/responses/400-4.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/request-invalid-query-parameter", - "title" : "A query parameter is invalid.", - "status" : 400, - "detail" : "This value must be of the following structure(s): videoId:{videoId}", - "name" : "filter" -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getVideosPlays/responses/403.json b/tests/resources/payloads/analytics/getVideosPlays/responses/403.json deleted file mode 100644 index cdd0425..0000000 --- a/tests/resources/payloads/analytics/getVideosPlays/responses/403.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/authorization-disabled-analytics", - "title" : "You cannot get analytics from this project.", - "status" : 403 -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getVideosPlays/responses/404.json b/tests/resources/payloads/analytics/getVideosPlays/responses/404.json deleted file mode 100644 index f366b6f..0000000 --- a/tests/resources/payloads/analytics/getVideosPlays/responses/404.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "status" : 404 -} \ No newline at end of file diff --git a/tests/resources/payloads/livestreams/complete/responses/404.json b/tests/resources/payloads/livestreams/complete/responses/404.json new file mode 100644 index 0000000..87595d9 --- /dev/null +++ b/tests/resources/payloads/livestreams/complete/responses/404.json @@ -0,0 +1,6 @@ +{ + "type" : "https://docs.api.video/reference/resource-not-found", + "title" : "The requested resource was not found.", + "name" : "liveStreamId", + "status" : 404 +} \ No newline at end of file diff --git a/tests/resources/payloads/livestreams/complete/responses/429.json b/tests/resources/payloads/livestreams/complete/responses/429.json new file mode 100644 index 0000000..d312e2b --- /dev/null +++ b/tests/resources/payloads/livestreams/complete/responses/429.json @@ -0,0 +1,5 @@ +{ + "type" : "https://docs.api.video/reference/too-many-requests", + "title" : "Too many requests.", + "status" : 429 +} \ No newline at end of file diff --git a/tests/resources/payloads/livestreams/create/responses/400-1.json b/tests/resources/payloads/livestreams/create/responses/400-1.json index 1350192..c3d6d42 100644 --- a/tests/resources/payloads/livestreams/create/responses/400-1.json +++ b/tests/resources/payloads/livestreams/create/responses/400-1.json @@ -2,6 +2,6 @@ "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "An attribute is invalid.", "status" : 400, - "detail" : "Missing app name: rtmp://[host]/[app name].", + "detail" : "Missing app name: [rtmp|rtmps]://[host]/[app name].", "name" : "restreams[0][serverUrl]" } \ No newline at end of file diff --git a/tests/resources/payloads/livestreams/create/responses/400-2.json b/tests/resources/payloads/livestreams/create/responses/400-2.json index b05a8e3..ea329ab 100644 --- a/tests/resources/payloads/livestreams/create/responses/400-2.json +++ b/tests/resources/payloads/livestreams/create/responses/400-2.json @@ -2,6 +2,6 @@ "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "An attribute is invalid.", "status" : 400, - "detail" : "RTMP URL should have the following format: rtmp://[host]/[app name].", + "detail" : "RTMP URL should have the following format: [rtmp|rtmps]://[host]/[app name].", "name" : "restreams[0][serverUrl]" } \ No newline at end of file diff --git a/tests/resources/payloads/livestreams/deleteThumbnail/responses/404.json b/tests/resources/payloads/livestreams/deleteThumbnail/responses/404.json index 9efa63b..87595d9 100644 --- a/tests/resources/payloads/livestreams/deleteThumbnail/responses/404.json +++ b/tests/resources/payloads/livestreams/deleteThumbnail/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "liveStreamId", "status" : 404 diff --git a/tests/resources/payloads/livestreams/update/responses/400-1.json b/tests/resources/payloads/livestreams/update/responses/400-1.json index 1350192..c3d6d42 100644 --- a/tests/resources/payloads/livestreams/update/responses/400-1.json +++ b/tests/resources/payloads/livestreams/update/responses/400-1.json @@ -2,6 +2,6 @@ "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "An attribute is invalid.", "status" : 400, - "detail" : "Missing app name: rtmp://[host]/[app name].", + "detail" : "Missing app name: [rtmp|rtmps]://[host]/[app name].", "name" : "restreams[0][serverUrl]" } \ No newline at end of file diff --git a/tests/resources/payloads/livestreams/update/responses/400-2.json b/tests/resources/payloads/livestreams/update/responses/400-2.json index b05a8e3..ea329ab 100644 --- a/tests/resources/payloads/livestreams/update/responses/400-2.json +++ b/tests/resources/payloads/livestreams/update/responses/400-2.json @@ -2,6 +2,6 @@ "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "An attribute is invalid.", "status" : 400, - "detail" : "RTMP URL should have the following format: rtmp://[host]/[app name].", + "detail" : "RTMP URL should have the following format: [rtmp|rtmps]://[host]/[app name].", "name" : "restreams[0][serverUrl]" } \ No newline at end of file diff --git a/tests/resources/payloads/livestreams/uploadThumbnail/responses/400.json b/tests/resources/payloads/livestreams/uploadThumbnail/responses/400.json index 631e001..b581e38 100644 --- a/tests/resources/payloads/livestreams/uploadThumbnail/responses/400.json +++ b/tests/resources/payloads/livestreams/uploadThumbnail/responses/400.json @@ -1,6 +1,6 @@ { "status" : 400, - "type" : "https://docs.api.video/docs/fileextension", + "type" : "https://docs.api.video/reference/uploaded-file-extension-invalid", "title" : "Only [jpeg, jpg, JPG, JPEG] extensions are supported.", "name" : "file" } \ No newline at end of file diff --git a/tests/resources/payloads/livestreams/uploadThumbnail/responses/404.json b/tests/resources/payloads/livestreams/uploadThumbnail/responses/404.json index 9efa63b..87595d9 100644 --- a/tests/resources/payloads/livestreams/uploadThumbnail/responses/404.json +++ b/tests/resources/payloads/livestreams/uploadThumbnail/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "liveStreamId", "status" : 404 diff --git a/tests/resources/payloads/playerthemes/delete/responses/404.json b/tests/resources/payloads/playerthemes/delete/responses/404.json index 719c18c..30decf6 100644 --- a/tests/resources/payloads/playerthemes/delete/responses/404.json +++ b/tests/resources/payloads/playerthemes/delete/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "playerId", "status" : 404 diff --git a/tests/resources/payloads/playerthemes/deleteLogo/responses/404.json b/tests/resources/payloads/playerthemes/deleteLogo/responses/404.json index 719c18c..30decf6 100644 --- a/tests/resources/payloads/playerthemes/deleteLogo/responses/404.json +++ b/tests/resources/payloads/playerthemes/deleteLogo/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "playerId", "status" : 404 diff --git a/tests/resources/payloads/playerthemes/get/responses/404.json b/tests/resources/payloads/playerthemes/get/responses/404.json index 719c18c..30decf6 100644 --- a/tests/resources/payloads/playerthemes/get/responses/404.json +++ b/tests/resources/payloads/playerthemes/get/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "playerId", "status" : 404 diff --git a/tests/resources/payloads/playerthemes/update/responses/404.json b/tests/resources/payloads/playerthemes/update/responses/404.json index 719c18c..30decf6 100644 --- a/tests/resources/payloads/playerthemes/update/responses/404.json +++ b/tests/resources/payloads/playerthemes/update/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "playerId", "status" : 404 diff --git a/tests/resources/payloads/playerthemes/uploadLogo/responses/400.json b/tests/resources/payloads/playerthemes/uploadLogo/responses/400.json index a96e225..6ef950a 100644 --- a/tests/resources/payloads/playerthemes/uploadLogo/responses/400.json +++ b/tests/resources/payloads/playerthemes/uploadLogo/responses/400.json @@ -1,6 +1,6 @@ { "status" : 400, - "type" : "https://docs.api.video/docs/fileextension", + "type" : "https://docs.api.video/reference/uploaded-file-extension-invalid", "title" : "Only ['jpg', 'JPG', 'jpeg', 'JPEG', 'png', 'PNG'] extensions are supported.", "name" : "file" } \ No newline at end of file diff --git a/tests/resources/payloads/playerthemes/uploadLogo/responses/404.json b/tests/resources/payloads/playerthemes/uploadLogo/responses/404.json index 719c18c..30decf6 100644 --- a/tests/resources/payloads/playerthemes/uploadLogo/responses/404.json +++ b/tests/resources/payloads/playerthemes/uploadLogo/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "playerId", "status" : 404 diff --git a/tests/resources/payloads/videos/create/responses/400.json b/tests/resources/payloads/videos/create/responses/400.json index fc789fc..c6358bf 100644 --- a/tests/resources/payloads/videos/create/responses/400.json +++ b/tests/resources/payloads/videos/create/responses/400.json @@ -1,22 +1,22 @@ { - "type" : "https://docs.api.video/docs/attributerequired", + "type" : "https://docs.api.video/reference/attribute-required", "title" : "This attribute is required.", "name" : "title", "status" : 400, "problems" : [ { - "type" : "https://docs.api.video/docs/attributerequired", + "type" : "https://docs.api.video/reference/attribute-required", "title" : "This attribute is required.", "name" : "title" }, { - "type" : "https://docs.api.video/docs/attributeinvalid", + "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "This attribute must be a ISO8601 date.", "name" : "scheduledAt" }, { - "type" : "https://docs.api.video/docs/attributeinvalid", + "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "This attribute must be an array.", "name" : "tags" }, { - "type" : "https://docs.api.video/docs/attributeinvalid", + "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "This attribute must be an array.", "name" : "metadata" } ] diff --git a/tests/resources/payloads/videos/delete/responses/404.json b/tests/resources/payloads/videos/delete/responses/404.json index 69b4332..27275e1 100644 --- a/tests/resources/payloads/videos/delete/responses/404.json +++ b/tests/resources/payloads/videos/delete/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "videoId", "status" : 404 diff --git a/tests/resources/payloads/videos/get/responses/404.json b/tests/resources/payloads/videos/get/responses/404.json index 69b4332..27275e1 100644 --- a/tests/resources/payloads/videos/get/responses/404.json +++ b/tests/resources/payloads/videos/get/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "videoId", "status" : 404 diff --git a/tests/resources/payloads/videos/getStatus/responses/404.json b/tests/resources/payloads/videos/getStatus/responses/404.json index 69b4332..27275e1 100644 --- a/tests/resources/payloads/videos/getStatus/responses/404.json +++ b/tests/resources/payloads/videos/getStatus/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "videoId", "status" : 404 diff --git a/tests/resources/payloads/videos/pickThumbnail/responses/404.json b/tests/resources/payloads/videos/pickThumbnail/responses/404.json index 69b4332..27275e1 100644 --- a/tests/resources/payloads/videos/pickThumbnail/responses/404.json +++ b/tests/resources/payloads/videos/pickThumbnail/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "videoId", "status" : 404 diff --git a/tests/resources/payloads/videos/update/responses/400.json b/tests/resources/payloads/videos/update/responses/400.json index 65910b5..9115c98 100644 --- a/tests/resources/payloads/videos/update/responses/400.json +++ b/tests/resources/payloads/videos/update/responses/400.json @@ -1,18 +1,18 @@ { - "type" : "https://docs.api.video/docs/attributeinvalid", + "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "This attribute must be a ISO-8601 date.", "name" : "scheduledAt", "status" : 400, "problems" : [ { - "type" : "https://docs.api.video/docs/attributeinvalid", + "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "This attribute must be a ISO-8601 date.", "name" : "scheduledAt" }, { - "type" : "https://docs.api.video/docs/attributeinvalid", + "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "This attribute must be an array.", "name" : "tags" }, { - "type" : "https://docs.api.video/docs/attributeinvalid", + "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "This attribute must be an array.", "name" : "metadata" } ] diff --git a/tests/resources/payloads/videos/update/responses/404.json b/tests/resources/payloads/videos/update/responses/404.json index 69b4332..27275e1 100644 --- a/tests/resources/payloads/videos/update/responses/404.json +++ b/tests/resources/payloads/videos/update/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "videoId", "status" : 404 diff --git a/tests/resources/payloads/videos/upload/responses/400.json b/tests/resources/payloads/videos/upload/responses/400.json index b90e95e..09d2579 100644 --- a/tests/resources/payloads/videos/upload/responses/400.json +++ b/tests/resources/payloads/videos/upload/responses/400.json @@ -1,22 +1,22 @@ { - "type" : "https://docs.api.video/docs/filealreadyuploaded", + "type" : "https://docs.api.video/reference/video-source-already-uploaded", "title" : "The source of the video is already uploaded.", "name" : "file", "status" : 400, "problems" : [ { - "type" : "https://docs.api.video/docs/filealreadyuploaded", + "type" : "https://docs.api.video/reference/video-source-already-uploaded", "title" : "The source of the video is already uploaded.", "name" : "file" }, { - "type" : "https://docs.api.video/docs/filealreadyuploaded", + "type" : "https://docs.api.video/reference/video-source-already-uploaded", "title" : "The video xxxx has already been uploaded.", "name" : "video" }, { - "type" : "https://docs.api.video/docs/filemissing", + "type" : "https://docs.api.video/reference/uploaded-file-no-file", "title" : "There is no uploaded file in the request.", "name" : "file" }, { - "type" : "https://docs.api.video/docs/multiplefilesuploaded", + "type" : "https://docs.api.video/reference/uploaded-file-multiple-files", "title" : "There is more than one uploaded file in the request.", "name" : "file" } ] diff --git a/tests/resources/payloads/videos/upload/responses/404.json b/tests/resources/payloads/videos/upload/responses/404.json index 69b4332..27275e1 100644 --- a/tests/resources/payloads/videos/upload/responses/404.json +++ b/tests/resources/payloads/videos/upload/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "videoId", "status" : 404 diff --git a/tests/resources/payloads/videos/uploadThumbnail/responses/400.json b/tests/resources/payloads/videos/uploadThumbnail/responses/400.json index 631e001..b581e38 100644 --- a/tests/resources/payloads/videos/uploadThumbnail/responses/400.json +++ b/tests/resources/payloads/videos/uploadThumbnail/responses/400.json @@ -1,6 +1,6 @@ { "status" : 400, - "type" : "https://docs.api.video/docs/fileextension", + "type" : "https://docs.api.video/reference/uploaded-file-extension-invalid", "title" : "Only [jpeg, jpg, JPG, JPEG] extensions are supported.", "name" : "file" } \ No newline at end of file diff --git a/tests/resources/payloads/videos/uploadThumbnail/responses/404.json b/tests/resources/payloads/videos/uploadThumbnail/responses/404.json index 69b4332..27275e1 100644 --- a/tests/resources/payloads/videos/uploadThumbnail/responses/404.json +++ b/tests/resources/payloads/videos/uploadThumbnail/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "videoId", "status" : 404 diff --git a/tests/resources/payloads/watermarks/delete/responses/404.json b/tests/resources/payloads/watermarks/delete/responses/404.json index 4ca04c5..c31a9d8 100644 --- a/tests/resources/payloads/watermarks/delete/responses/404.json +++ b/tests/resources/payloads/watermarks/delete/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "watermarkId", "status" : 404 diff --git a/tests/resources/payloads/watermarks/upload/responses/400.json b/tests/resources/payloads/watermarks/upload/responses/400.json index 7d5c846..3b406ad 100644 --- a/tests/resources/payloads/watermarks/upload/responses/400.json +++ b/tests/resources/payloads/watermarks/upload/responses/400.json @@ -1,6 +1,6 @@ { "status" : 400, - "type" : "https://docs.api.video/docs/fileextension", + "type" : "https://docs.api.video/reference/uploaded-file-extension-invalid", "title" : "Only [jpeg, jpg, JPG, JPEG, png, PNG] extensions are supported.", "name" : "file" } \ No newline at end of file diff --git a/tests/resources/payloads/webhooks/create/responses/400.json b/tests/resources/payloads/webhooks/create/responses/400.json index 1878cc2..e7c9e89 100644 --- a/tests/resources/payloads/webhooks/create/responses/400.json +++ b/tests/resources/payloads/webhooks/create/responses/400.json @@ -1,18 +1,18 @@ { - "type" : "https://docs.api.video/docs/attributerequired", + "type" : "https://docs.api.video/reference/attribute-required", "events" : "This attribute is required.", "name" : "events", "status" : 400, "problems" : [ { - "type" : "https://docs.api.video/docs/attributerequired", + "type" : "https://docs.api.video/reference/attribute-required", "title" : "This attribute is required.", "name" : "events" }, { - "type" : "https://docs.api.video/docs/attributerequired", + "type" : "https://docs.api.video/reference/attribute-required", "title" : "This attribute is required.", "name" : "url" }, { - "type" : "https://docs.api.video/docs/attributeinvalid", + "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "This attribute must be an array.", "name" : "events" } ] diff --git a/tests/resources/payloads/webhooks/delete/responses/404.json b/tests/resources/payloads/webhooks/delete/responses/404.json index 0721bb1..c97ea66 100644 --- a/tests/resources/payloads/webhooks/delete/responses/404.json +++ b/tests/resources/payloads/webhooks/delete/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "webhookId", "status" : 404