From 831c5030734a8b6b31f3fee1b8b1e1abfc06ddab Mon Sep 17 00:00:00 2001 From: olivierapivideo Date: Mon, 16 Sep 2024 14:19:52 +0000 Subject: [PATCH] Add discarded videos feature --- CHANGELOG.md | 3 + README.md | 4 + api/openapi.yaml | 1516 ++++++++++++++++++----- api_videos.go | 283 ++++- client.go | 4 +- docs/DiscardedVideoUpdatePayload.md | 56 + docs/LiveStream.md | 4 +- docs/LiveStreams.md | 4 +- docs/PlayerSessionEvent.md | 2 +- docs/PlayerTheme.md | 4 +- docs/PlayerThemes.md | 4 +- docs/UploadToken.md | 4 +- docs/UploadTokens.md | 4 +- docs/Video.md | 106 +- docs/VideoCreationPayload.md | 2 +- docs/VideoUpdatePayload.md | 2 +- docs/Videos.md | 215 +++- docs/Watermark.md | 2 +- docs/Webhook.md | 2 +- model_discarded_video_update_payload.go | 97 ++ model_live_stream.go | 4 +- model_player_session_event.go | 2 +- model_player_theme.go | 4 +- model_upload_token.go | 4 +- model_video.go | 132 +- model_video_creation_payload.go | 2 +- model_video_update_payload.go | 2 +- model_watermark.go | 2 +- model_webhook.go | 2 +- 29 files changed, 2109 insertions(+), 363 deletions(-) create mode 100644 docs/DiscardedVideoUpdatePayload.md create mode 100644 model_discarded_video_update_payload.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f56080..0c49e27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog All changes to this project will be documented in this file. +## [1.4.2] - 2024-09-16 +- Add discarded video endpoints + ## [1.4.1] - 2024-09-05 - Add sort parameters in analytics endpoints diff --git a/README.md b/README.md index 2c6c2e9..2935b5c 100644 --- a/README.md +++ b/README.md @@ -271,7 +271,10 @@ Method | HTTP request | Description [**List**](https://github.com/apivideo/api.video-go-client/blob/main/docs/Videos.md#List) | **Get** `/videos` | List all video objects [**UploadThumbnail**](https://github.com/apivideo/api.video-go-client/blob/main/docs/Videos.md#UploadThumbnail) | **Post** `/videos/{videoId}/thumbnail` | Upload a thumbnail [**PickThumbnail**](https://github.com/apivideo/api.video-go-client/blob/main/docs/Videos.md#PickThumbnail) | **Patch** `/videos/{videoId}/thumbnail` | Set a thumbnail +[**GetDiscarded**](https://github.com/apivideo/api.video-go-client/blob/main/docs/Videos.md#GetDiscarded) | **Get** `/discarded/videos/{videoId}` | Retrieve a discarded video object [**GetStatus**](https://github.com/apivideo/api.video-go-client/blob/main/docs/Videos.md#GetStatus) | **Get** `/videos/{videoId}/status` | Retrieve video status and details +[**ListDiscarded**](https://github.com/apivideo/api.video-go-client/blob/main/docs/Videos.md#ListDiscarded) | **Get** `/discarded/videos` | List all discarded video objects +[**UpdateDiscarded**](https://github.com/apivideo/api.video-go-client/blob/main/docs/Videos.md#UpdateDiscarded) | **Patch** `/discarded/videos/{videoId}` | Update a discarded video object #### Watermarks @@ -337,6 +340,7 @@ Method | HTTP request | Description - [CaptionsUpdatePayload](https://github.com/apivideo/api.video-go-client/blob/main/docs/CaptionsUpdatePayload.md) - [Chapter](https://github.com/apivideo/api.video-go-client/blob/main/docs/Chapter.md) - [ChaptersListResponse](https://github.com/apivideo/api.video-go-client/blob/main/docs/ChaptersListResponse.md) + - [DiscardedVideoUpdatePayload](https://github.com/apivideo/api.video-go-client/blob/main/docs/DiscardedVideoUpdatePayload.md) - [FilterBy](https://github.com/apivideo/api.video-go-client/blob/main/docs/FilterBy.md) - [FilterBy1](https://github.com/apivideo/api.video-go-client/blob/main/docs/FilterBy1.md) - [FilterBy2](https://github.com/apivideo/api.video-go-client/blob/main/docs/FilterBy2.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 46e45aa..3642844 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -193,8 +193,6 @@ paths: style: form - description: Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter. - [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata/) allows - you to define a key that allows any value pair. example: metadata[Author]=John Doe&metadata[Format]=Tutorial explode: true in: query @@ -298,8 +296,11 @@ paths: value: John Doe - key: Format value: Tutorial - publishedAt: 2019-12-16T08:25:51.000Z - updatedAt: 2019-12-16T08:48:49.000Z + publishedAt: 2019-12-16T08:25:51+00:00 + updatedAt: 2019-12-16T08:48:49+00:00 + discarded: false + discardedAt: null + deletesAt: null source: uri: /videos/c188ed58-3403-46a2-b91b-44603d10b2c9/source assets: @@ -326,8 +327,11 @@ paths: value: Cyberpunk - key: Technology value: Computers - publishedAt: 2019-12-16T08:25:51.000Z - updatedAt: 2019-12-16T08:48:49.000Z + publishedAt: 2019-12-16T08:25:51+00:00 + updatedAt: 2019-12-16T08:48:49+00:00 + discarded: false + discardedAt: null + deletesAt: null source: uri: /videos/vi4blUQJFrYWbaG44NChkH27/source assets: @@ -351,8 +355,11 @@ paths: metadata: - key: Length value: Short - publishedAt: 2019-12-16T08:25:51.000Z - updatedAt: 2019-12-16T08:48:49.000Z + publishedAt: 2019-12-16T08:25:51+00:00 + updatedAt: 2019-12-16T08:48:49+00:00 + discarded: false + discardedAt: null + deletesAt: null source: uri: /videos/vi4blUQJFrYWbaG44NChkH27/source assets: @@ -617,7 +624,10 @@ paths: value: John Doe - key: Format value: Tutorial - publishedAt: 4665-07-14T23:36:18.598Z + publishedAt: 2024-07-14T23:36:07+00:00 + discarded: false + discardedAt: null + deletesAt: null source: uri: /videos/vi4blUQJFrYWbaG44NChkH27/source assets: @@ -694,7 +704,7 @@ paths: title: This attribute is required. name: title - type: https://docs.api.video/reference/invalid-attribute - title: This attribute must be a ISO8601 date. + title: This attribute must be a ISO-8601 date. name: scheduledAt - type: https://docs.api.video/reference/invalid-attribute title: This attribute must be an array. @@ -1018,7 +1028,10 @@ paths: value: John Doe - key: Format value: Tutorial - publishedAt: 4665-07-14T23:36:18.598Z + publishedAt: 2024-07-14T23:36:07+00:00 + discarded: false + discardedAt: null + deletesAt: null source: uri: /videos/vi4blUQJFrYWbaG44NChkH27/source assets: @@ -1417,9 +1430,9 @@ paths: value: data: - watermarkId: watermark_1BWr2L5MTQwxGkuxKjzh6i - createdAt: 2019-12-16T08:25:51.000Z + createdAt: 2019-12-16T08:25:51+00:00 - watermarkId: watermark_3BWC2L5MTQwxGkuxKjzh7g - createdAt: 2019-12-16T08:25:51.000Z + createdAt: 2019-12-16T08:25:51+00:00 pagination: currentPage: 1 pageSize: 25 @@ -1600,7 +1613,7 @@ paths: response: value: watermarkId: watermark_1BWr2L5MTQwxGkuxKjzh6i - createdAt: 2020-03-03T12:52:03.085Z + createdAt: 2020-03-03T12:52:03+00:00 schema: $ref: '#/components/schemas/watermark' description: Success @@ -2039,7 +2052,10 @@ paths: value: John Doe - key: Format value: Tutorial - publishedAt: 4665-07-14T23:36:18.598Z + publishedAt: 2024-07-14T23:36:07+00:00 + discarded: false + discardedAt: null + deletesAt: null source: uri: /videos/vi4blUQJFrYWbaG44NChkH27/source assets: @@ -2302,8 +2318,11 @@ paths: value: John Doe - key: Format value: Tutorial - createdAt: 2020-03-03T12:52:03.085Z - publishedAt: 2020-07-14T23:36:18.598Z + createdAt: 2020-03-03T12:52:03+00:00 + publishedAt: 2020-07-14T23:36:07+00:00 + discarded: false + discardedAt: null + deletesAt: null source: uri: /videos/vi4blUQJFrYWbaG44NChkH27/source assets: @@ -2552,7 +2571,12 @@ paths: // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#uploadThumbnail /videos/{videoId}: delete: - description: Delete a video object by video ID. + description: "Delete a video object by video ID. \n\nBy default, deleted videos\ + \ cannot be recovered. If you have the Video Restore feature enabled, this\ + \ operation will discard the video instead of permanently deleting it. Make\ + \ sure you subscribe to the Video Restore feature if you want to be able to\ + \ restore deleted videos! \n\nThe Video Restore feature retains videos for\ + \ 90 days, after which the videos are permanently deleted. \n" operationId: DELETE-video parameters: - description: The video ID for the video you want to delete. @@ -2599,8 +2623,1007 @@ paths: name: videoId status: 404 schema: - $ref: '#/components/schemas/not-found' - description: Not Found + $ref: '#/components/schemas/not-found' + description: Not Found + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "429": + content: + application/json: + examples: + Too many requests: + value: + type: https://docs.api.video/reference/too-many-requests + title: Too many requests. + status: 429 + schema: + $ref: '#/components/schemas/too-many-requests' + description: Too Many Requests + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + security: + - apiKey: [] + summary: Delete a video object + tags: + - Videos + x-client-description: + default: If you do not need a video any longer, you can send a request to + delete it. All you need is the videoId. By default, deleted videos cannot + be recovered. If you have the Video Restore feature enabled, this operation + will discard the video instead of permanently deleting it. Make sure you + subscribe to the Video Restore feature if you want to be able to restore + deleted videos! The Video Restore feature retains videos for 90 days, after + which the videos are permanently deleted + x-client-action: delete + x-doctave: + code-samples: + - language: go + code: "// First install the go client with \"go get github.com/apivideo/api.video-go-client\"\ + \n// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#delete\n\ + \npackage main\nimport (\n \"context\"\n \"fmt\"\n \"os\"\n \ + \ apivideosdk \"github.com/apivideo/api.video-go-client\"\n)\nfunc main()\ + \ {\n client := apivideosdk.ClientBuilder(\"YOUR_API_KEY\").Build()\n\ + \ // if you rather like to use the sandbox environment:\n // client\ + \ := apivideosdk.SandboxClientBuilder(\"YOUR_SANDBOX_API_KEY\").Build()\n\ + \ \n videoId := \"vi4k0jvEUuaTdRAEjQ4Jfrgz\" // string | The\ + \ video ID for the video you want to delete.\n err := client.Videos.Delete(videoId)\n\ + \ if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling\ + \ `Videos.Delete``: %v\\\n\", err)\n }\n} \n" + - language: node + code: "// First install the \"@api.video/nodejs-client\" npm package\n//\ + \ Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#delete\n\ + \nconst client = new ApiVideoClient({ apiKey: \"YOUR_API_KEY\" });\n\n\ + const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // the id of the video to\ + \ delete\nawait client.videos.delete(videoId); \n" + - language: python + code: | + # First install the api client with "pip install api.video" + # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#delete + + import apivideo + from apivideo.api import videos_api + from apivideo.model.not_found import NotFound + from pprint import pprint + # Enter a context with an instance of the API client + with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client: + # Create an instance of the API class + api_instance = videos_api.VideosApi(api_client) + video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The video ID for the video you want to delete. + # example passing only required values which don't have defaults set + try: + # Delete a video + api_instance.delete(video_id) + except apivideo.ApiException as e: + print("Exception when calling VideosApi->delete: %s\n" % e) + - language: java + code: "// First add the \"video.api:java-api-client\" maven dependency to\ + \ your project\n// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#delete\n\ + \nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ + import video.api.client.api.models.*;\nimport video.api.client.api.clients.VideosApi;\n\ + import java.util.*;\n \npublic class Example {\n public static void\ + \ main(String[] args) {\n ApiVideoClient client = new ApiVideoClient(\"\ + YOUR_API_KEY\");\n // if you rather like to use the sandbox environment:\n\ + \ // ApiVideoClient client = new ApiVideoClient(\"YOUR_SANDBOX_API_KEY\"\ + , ApiVideoClient.Environment.SANDBOX);\n \n VideosApi apiInstance\ + \ = client.videos();\n \n String videoId = \"vi4k0jvEUuaTdRAEjQ4Jfrgz\"\ + ; // The video ID for the video you want to delete.\n \n try {\n\ + \ apiInstance.delete(videoId);\n } catch (ApiException e) {\n\ + \ System.err.println(\"Exception when calling VideosApi#delete\"\ + );\n System.err.println(\"Status code: \" + e.getCode());\n \ + \ System.err.println(\"Reason: \" + e.getMessage());\n System.err.println(\"\ + Response headers: \" + e.getResponseHeaders());\n e.printStackTrace();\n\ + \ }\n }\n}\n" + - language: csharp + code: "// First add the \"ApiVideo\" NuGet package to your project\n// Documentation:\ + \ https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#delete\n\ + \nusing System.Diagnostics;\nusing ApiVideo.Client;\n\nnamespace Example\n\ + {\n public class deleteExample\n {\n public static void Main()\n\ + \ {\n var basePath = ApiVideoClient.Client.Environment.SANDBOX;\n\ + \ var apiKey = \"YOUR_API_KEY\";\n var apiInstance\ + \ = new ApiVideoClient(apiKey,basePath);\n var videoId = vi4k0jvEUuaTdRAEjQ4Jfrgz;\ + \ // string | The video ID for the video you want to delete.\n \ + \ var apiVideosInstance = apiInstance.Videos();\n try\n\ + \ {\n // Delete a video\n apiVideosInstance.delete(videoId);\n\ + \ }\n catch (ApiException e)\n {\n \ + \ Debug.Print(\"Exception when calling VideosApi.delete:\ + \ \" + e.Message );\n Debug.Print(\"Status Code: \"+ e.ErrorCode);\n\ + \ Debug.Print(e.StackTrace);\n }\n }\n\ + \ }\n} \n" + - language: php + code: "videos()->delete($videoId); " + - language: swift + code: | + // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started + // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#delete + get: + description: Retrieve the video details by video id. + operationId: GET-video + parameters: + - description: The unique identifier for the video you want details about. + explode: false + in: path + name: videoId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + examples: + response: + value: + videoId: vi4blUQJFrYWbaG44NChkH27 + playerId: pl45KFKdlddgk654dspkze + title: Maths video + description: An amazing video explaining string theory + public: false + panoramic: false + mp4Support: true + tags: + - maths + - string theory + - video + metadata: + - key: Author + value: John Doe + - key: Format + value: Tutorial + publishedAt: 2019-12-16T08:25:51+00:00 + updatedAt: 2019-12-16T08:48:49+00:00 + discarded: false + discardedAt: null + deletesAt: null + source: + uri: /videos/vi4blUQJFrYWbaG44NChkH27/source + assets: + iframe: + player: https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27 + hls: https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8 + thumbnail: https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg + mp4: https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4 + schema: + $ref: '#/components/schemas/video' + description: Success + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "404": + content: + application/json: + examples: + response: + value: + type: https://docs.api.video/reference/resource-not-found + title: The requested resource was not found. + name: videoId + status: 404 + schema: + $ref: '#/components/schemas/not-found' + description: Not Found + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "429": + content: + application/json: + examples: + Too many requests: + value: + type: https://docs.api.video/reference/too-many-requests + title: Too many requests. + status: 429 + schema: + $ref: '#/components/schemas/too-many-requests' + description: Too Many Requests + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + security: + - apiKey: [] + summary: Retrieve a video object + tags: + - Videos + x-client-description: + default: This call provides the same information provided on video creation. + For private videos, it will generate a unique token url. Use this to retrieve + any details you need about a video, or set up a private viewing URL. + x-client-action: get + x-doctave: + code-samples: + - language: go + code: "// First install the go client with \"go get github.com/apivideo/api.video-go-client\"\ + \n// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#get\n\ + \npackage main\n\nimport (\n \"context\"\n \"fmt\"\n \"os\"\n\ + \ apivideosdk \"github.com/apivideo/api.video-go-client\"\n)\n\nfunc\ + \ main() {\n client := apivideosdk.ClientBuilder(\"YOUR_API_KEY\").Build()\n\ + \ // if you rather like to use the sandbox environment:\n // client\ + \ := apivideosdk.SandboxClientBuilder(\"YOUR_SANDBOX_API_KEY\").Build()\n\ + \ \n videoId := \"videoId_example\" // string | The unique identifier\ + \ for the video you want details about.\n\n \n res, err := client.Videos.Get(videoId)\n\ + \n if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling\ + \ `Videos.Get``: %v\\\n\", err)\n }\n // response from `Get`: Video\n\ + \ fmt.Fprintf(os.Stdout, \"Response from `Videos.Get`: %v\\\n\", res)\n\ + }\n" + - language: node + code: "// First install the \"@api.video/nodejs-client\" npm package\n//\ + \ Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#get\n\ + \nconst client = new ApiVideoClient({ apiKey: \"YOUR_API_KEY\" });\n\n\ + const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for\ + \ the video you want to retrieve.\nconst result = await client.videos.get(videoId);\ + \ \n" + - language: python + code: | + # First install the api client with "pip install api.video" + # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#get + + import apivideo + from apivideo.api import videos_api + from apivideo.model.not_found import NotFound + from apivideo.model.video import Video + from pprint import pprint + + # Enter a context with an instance of the API client + with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client: + # Create an instance of the API class + api_instance = videos_api.VideosApi(api_client) + video_id = "videoId_example" # str | The unique identifier for the video you want details about. + + # example passing only required values which don't have defaults set + try: + # Show a video + api_response = api_instance.get(video_id) + pprint(api_response) + except apivideo.ApiException as e: + print("Exception when calling VideosApi->get: %s\n" % e) + - language: java + code: "// First add the \"video.api:java-api-client\" maven dependency to\ + \ your project\n// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#get\n\ + \nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ + import video.api.client.api.models.*;\nimport video.api.client.api.clients.VideosApi;\n\ + import java.util.*;\n\npublic class Example {\n public static void main(String[]\ + \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_KEY\"\ + );\n // if you rather like to use the sandbox environment:\n //\ + \ ApiVideoClient client = new ApiVideoClient(\"YOUR_SANDBOX_API_KEY\"\ + , ApiVideoClient.Environment.SANDBOX);\n\n VideosApi apiInstance =\ + \ client.videos();\n \n String videoId = \"videoId_example\"; //\ + \ The unique identifier for the video you want details about.\n\n try\ + \ {\n Video result = apiInstance.get(videoId);\n System.out.println(result);\n\ + \ } catch (ApiException e) {\n System.err.println(\"Exception\ + \ when calling VideosApi#get\");\n System.err.println(\"Status code:\ + \ \" + e.getCode());\n System.err.println(\"Reason: \" + e.getMessage());\n\ + \ System.err.println(\"Response headers: \" + e.getResponseHeaders());\n\ + \ e.printStackTrace();\n }\n }\n} \n" + - language: csharp + code: "// First add the \"ApiVideo\" NuGet package to your project\n// Documentation:\ + \ https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#get\n\ + \nusing System.Diagnostics;\nusing ApiVideo.Client;\n\nnamespace Example\n\ + {\n public class getExample\n {\n public static void Main()\n\ + \ {\n var basePath = ApiVideoClient.Client.Environment.SANDBOX;\n\ + \ var apiKey = \"YOUR_API_KEY\";\n\n var apiInstance\ + \ = new ApiVideoClient(apiKey,basePath);\n\n var videoId =\ + \ videoId_example; // string | The unique identifier for the video you\ + \ want details about.\n var apiVideosInstance = apiInstance.Videos();\n\ + \ try\n {\n // Show a video\n \ + \ Video result = apiVideosInstance.get(videoId);\n \ + \ Debug.WriteLine(result);\n }\n catch (ApiException\ + \ e)\n {\n Debug.Print(\"Exception when calling\ + \ VideosApi.get: \" + e.Message );\n Debug.Print(\"Status\ + \ Code: \"+ e.ErrorCode);\n Debug.Print(e.StackTrace);\n\ + \ }\n }\n }\n} \n" + - language: php + code: "videos()->getStatus($videoId);\ + \ " + - language: swift + code: | + // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started + // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#get + patch: + description: Update the parameters associated with a video ID. + operationId: PATCH-video + parameters: + - description: The video ID for the video you want to update. + example: vi4k0jvEUuaTdRAEjQ4Jfrgz + explode: false + in: path + name: videoId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/video-update-payload' + required: true + responses: + "200": + content: + application/json: + examples: + response: + value: + videoId: vi4blUQJFrYWbaG44NChkH27 + playerId: pl45KFKdlddgk654dspkze + title: Maths video + description: An amazing video explaining the string theory + public: false + panoramic: false + mp4Support: true + tags: + - maths + - string theory + - video + metadata: + - key: Author + value: John Doe + - key: Format + value: Tutorial + publishedAt: 2019-12-16T08:25:51+00:00 + updatedAt: 2019-12-16T08:48:49+00:00 + discarded: false + discardedAt: null + deletesAt: null + source: + uri: /videos/vi4blUQJFrYWbaG44NChkH27/source + assets: + iframe: + player: https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27 + hls: https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8 + thumbnail: https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg + mp4: https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4 + schema: + $ref: '#/components/schemas/video' + description: Success + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "400": + content: + application/json: + examples: + response: + value: + 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/reference/invalid-attribute + title: This attribute must be a ISO-8601 date. + name: scheduledAt + - type: https://docs.api.video/reference/invalid-attribute + title: This attribute must be an array. + name: tags + - type: https://docs.api.video/reference/invalid-attribute + title: This attribute must be an array. + name: metadata + schema: + $ref: '#/components/schemas/bad-request' + description: Bad Request + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "404": + content: + application/json: + examples: + response: + value: + type: https://docs.api.video/reference/resource-not-found + title: The requested resource was not found. + name: videoId + status: 404 + schema: + $ref: '#/components/schemas/not-found' + description: Not Found + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "429": + content: + application/json: + examples: + Too many requests: + value: + type: https://docs.api.video/reference/too-many-requests + title: Too many requests. + status: 429 + schema: + $ref: '#/components/schemas/too-many-requests' + description: Too Many Requests + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + security: + - apiKey: [] + summary: Update a video object + tags: + - Videos + x-client-description: + default: "Updates the parameters associated with a video ID. The video object\ + \ you are updating is determined by the video ID you provide. \n\nNOTE:\ + \ If you are updating an array, you must provide the entire array as what\ + \ you provide here overwrites what is in the system rather than appending\ + \ to it.\n" + x-client-action: update + x-doctave: + code-samples: + - language: go + code: "// First install the go client with \"go get github.com/apivideo/api.video-go-client\"\ + \n// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#update\n\ + \npackage main\n\nimport (\n \"context\"\n \"fmt\"\n \"os\"\n\ + \ apivideosdk \"github.com/apivideo/api.video-go-client\"\n)\n\nfunc\ + \ main() {\n client := apivideosdk.ClientBuilder(\"YOUR_API_KEY\").Build()\n\ + \ // if you rather like to use the sandbox environment:\n // client\ + \ := apivideosdk.SandboxClientBuilder(\"YOUR_SANDBOX_API_KEY\").Build()\n\ + \ \n videoId := \"vi4k0jvEUuaTdRAEjQ4Jfrgz\" // string | The\ + \ video ID for the video you want to delete.\n videoUpdatePayload :=\ + \ *apivideosdk.NewVideoUpdatePayload() // VideoUpdatePayload | \n\n \ + \ \n res, err := client.Videos.Update(videoId, videoUpdatePayload)\n\ + \n if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling\ + \ `Videos.Update``: %v\\\n\", err)\n }\n // response from `Update`:\ + \ Video\n fmt.Fprintf(os.Stdout, \"Response from `Videos.Update`: %v\\\ + \n\", res)\n}\n" + - language: node + code: "// First install the \"@api.video/nodejs-client\" npm package\n//\ + \ Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#update\n\ + \nconst client = new ApiVideoClient({ apiKey: \"YOUR_API_KEY\" });\n\n\ + const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The video ID for the video\ + \ you want to update.\n\n// define the value you want to update\nconst\ + \ videoUpdatePayload = {\n playerId: \"pl4k0jvEUuaTdRAEjQ4Jfrgz\",\ + \ // The unique ID for the player you want to associate with your video.\n\ + \ title: \"title_example\", // The title you want to use for your video.\n\ + \ description: \"A film about good books.\", // A brief description\ + \ of the video.\n _public: true, // Whether the video is publicly available\ + \ or not. False means it is set to private.\n panoramic: false, //\ + \ Whether the video is a 360 degree or immersive video.\n mp4Support:\ + \ true, // Whether the player supports the mp4 format.\n tags: [\"\ + maths\", \"string theory\", \"video\"], // A list of terms or words you\ + \ want to tag the video with. Make sure the list includes all the tags\ + \ you want as whatever you send in this list will overwrite the existing\ + \ list for the video.\n metadata: [{\"key\": \"Author\", \"value\"\ + : \"John Doe\"}], // A list (array) of dictionaries where each dictionary\ + \ contains a key value pair that describes the video. As with tags, you\ + \ must send the complete list of metadata you want as whatever you send\ + \ here will overwrite the existing metadata for the video.\n}; \n\n\n\ + const updatedVideo = await client.videos.update(videoId, videoUpdatePayload);\n" + - language: python + code: "# First install the api client with \"pip install api.video\"\n#\ + \ Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#update\n\ + \nimport apivideo\nfrom apivideo.api import videos_api\nfrom apivideo.model.video_update_payload\ + \ import VideoUpdatePayload\nfrom apivideo.model.bad_request import BadRequest\n\ + from apivideo.model.not_found import NotFound\nfrom apivideo.model.video\ + \ import Video\nfrom pprint import pprint\n\n# Enter a context with an\ + \ instance of the API client\nwith apivideo.AuthenticatedApiClient(__API_KEY__)\ + \ as api_client:\n # Create an instance of the API class\n api_instance\ + \ = videos_api.VideosApi(api_client)\n video_id = \"vi4k0jvEUuaTdRAEjQ4Jfrgz\"\ + \ # str | The video ID for the video you want to delete.\n video_update_payload\ + \ = VideoUpdatePayload(\n player_id=\"pl4k0jvEUuaTdRAEjQ4Jfrgz\"\ + ,\n title=\"title_example\",\n description=\"A film about\ + \ good books.\",\n public=True,\n panoramic=False,\n \ + \ mp4_support=True,\n tags=[\"maths\", \"string theory\", \"\ + video\"],\n metadata=[\n Metadata(\n \ + \ key=\"Color\",\n value=\"Green\",\n ),\n \ + \ ],\n ) # VideoUpdatePayload | \n\n # example passing only\ + \ required values which don't have defaults set\n try:\n # Update\ + \ a video\n api_response = api_instance.update(video_id, video_update_payload)\n\ + \ pprint(api_response)\n except apivideo.ApiException as e:\n\ + \ print(\"Exception when calling VideosApi->update: %s\\\n\" %\ + \ e) \n" + - language: java + code: "// First add the \"video.api:java-api-client\" maven dependency to\ + \ your project\n// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#update\n\ + \nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ + import video.api.client.api.models.*;\nimport video.api.client.api.clients.VideosApi;\n\ + import java.util.*;\n\npublic class Example {\n public static void main(String[]\ + \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_KEY\"\ + );\n // if you rather like to use the sandbox environment:\n //\ + \ ApiVideoClient client = new ApiVideoClient(\"YOUR_SANDBOX_API_KEY\"\ + , ApiVideoClient.Environment.SANDBOX);\n\n VideosApi apiInstance =\ + \ client.videos();\n \n String videoId = \"vi4k0jvEUuaTdRAEjQ4Jfrgz\"\ + ; // The video ID for the video you want to delete.\n VideoUpdatePayload\ + \ videoUpdatePayload = new VideoUpdatePayload(); // \n videoUpdatePayload.setPlayerId(\"\ + pl4k0jvEUuaTdRAEjQ4Jfrgz\"); // The unique ID for the player you want\ + \ to associate with your video.\n videoUpdatePayload.setTitle(\"null\"\ + ); // The title you want to use for your video.\n videoUpdatePayload.setDescription(\"\ + A film about good books.\"); // A brief description of the video.\n \ + \ videoUpdatePayload.setPublic(true); // Whether the video is publicly\ + \ available or not. False means it is set to private.\n videoUpdatePayload.setPanoramic(false);\ + \ // Whether the video is a 360 degree or immersive video.\n videoUpdatePayload.setMp4Support(true);\ + \ // Whether the player supports the mp4 format.\n videoUpdatePayload.setTags(Arrays.asList(\"\ + maths\", \"string theory\", \"video\")); // A list of terms or words you\ + \ want to tag the video with. Make sure the list includes all the tags\ + \ you want as whatever you send in this list will overwrite the existing\ + \ list for the video.\n videoUpdatePayload.setMetadata(Collections.emptyList());\ + \ // A list (array) of dictionaries where each dictionary contains a key\ + \ value pair that describes the video. As with tags, you must send the\ + \ complete list of metadata you want as whatever you send here will overwrite\ + \ the existing metadata for the video.\n\n\n try {\n Video result\ + \ = apiInstance.update(videoId, videoUpdatePayload);\n System.out.println(result);\n\ + \ } catch (ApiException e) {\n System.err.println(\"Exception\ + \ when calling VideosApi#update\");\n System.err.println(\"Status\ + \ code: \" + e.getCode());\n System.err.println(\"Reason: \" + e.getMessage());\n\ + \ System.err.println(\"Response headers: \" + e.getResponseHeaders());\n\ + \ e.printStackTrace();\n }\n }\n}\n" + - language: csharp + code: "// First add the \"ApiVideo\" NuGet package to your project\n// Documentation:\ + \ https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#update\n\ + \nusing System.Diagnostics;\nusing ApiVideo.Client;\n\nnamespace Example\n\ + {\n public class updateExample\n {\n public static void Main()\n\ + \ {\n var basePath = ApiVideoClient.Client.Environment.SANDBOX;\n\ + \ var apiKey = \"YOUR_API_KEY\";\n\n var apiInstance\ + \ = new ApiVideoClient(apiKey,basePath);\n\n var videoId =\ + \ vi4k0jvEUuaTdRAEjQ4Jfrgz; // string | The video ID for the video you\ + \ want to delete.\n var videoUpdatePayload = new VideoUpdatePayload();\ + \ // VideoUpdatePayload | \n var apiVideosInstance = apiInstance.Videos();\n\ + \ try\n {\n // Update a video\n \ + \ Video result = apiVideosInstance.update(videoId, videoUpdatePayload);\n\ + \ Debug.WriteLine(result);\n }\n \ + \ catch (ApiException e)\n {\n Debug.Print(\"\ + Exception when calling VideosApi.update: \" + e.Message );\n \ + \ Debug.Print(\"Status Code: \"+ e.ErrorCode);\n \ + \ Debug.Print(e.StackTrace);\n }\n }\n }\n}\n" + - language: php + code: "videos()->update($videoId, (new \\ApiVideo\\\ + Client\\Model\\VideoUpdatePayload())\n ->setPlayerId(\"pl4k0jvEUuaTdRAEjQ4Jfrgz\"\ + ) // The unique ID for the player you want to associate with your video.\n\ + \ ->setTitle(\"The new title\") // The title you want to use for your\ + \ video.\n ->setDescription(\"A new description\") // A brief description\ + \ of the video.\n ->setPublic(false) // Whether the video is publicly\ + \ available or not. False means it is set to private.\n ->setPanoramic(false)\ + \ // Whether the video is a 360 degree or immersive video.\n ->setMp4Support(true)\ + \ // Whether the player supports the mp4 format.\n ->setTags([\"tag1\"\ + , \"tag2\"]) // A list of terms or words you want to tag the video with.\ + \ Make sure the list includes all the tags you want as whatever you send\ + \ in this list will overwrite the existing list for the video.\n ->setMetadata(array(\ + \ // A list (array) of dictionaries where each dictionary contains a key\ + \ value pair that describes the video. As with tags, you must send the\ + \ complete list of metadata you want as whatever you send here will overwrite\ + \ the existing metadata for the video.\n new \\ApiVideo\\Client\\\ + Model\\Metadata([\"key\" => \"aa\", 'value' => \"bb\"]),\n new\ + \ \\ApiVideo\\Client\\Model\\Metadata([\"key\" => \"aa2\", 'value' =>\ + \ \"bb2\"])))); " + - language: swift + code: "// First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started\n\ + // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#update\ + \ \n" + /discarded/videos: + get: + description: List all the video objects that are associated with the current + workspace. + operationId: LIST-discarded-videos + parameters: + - description: The title of a specific video you want to find. The search will + match exactly to what term you provide and return any videos that contain + the same term as part of their titles. + example: My Video.mp4 + explode: true + in: query + name: title + required: false + schema: + type: string + style: form + - description: A tag is a category you create and apply to videos. You can search + for videos with particular tags by listing one or more here. Only videos + that have all the tags you list will be returned. + example: '["captions", "dialogue"]' + explode: true + in: query + name: tags[] + required: false + schema: + items: + type: string + type: array + style: form + - description: Videos can be tagged with metadata tags in key:value pairs. You + can search for videos with specific key value pairs using this parameter. + example: metadata[Author]=John Doe&metadata[Format]=Tutorial + explode: true + in: query + name: metadata + required: false + schema: + additionalProperties: + type: string + type: object + style: deepObject + x-is-deep-object: true + - description: Retrieve video objects by `description`. + example: New Zealand + explode: true + in: query + name: description + required: false + schema: + type: string + style: form + - description: Retrieve video objects that were recorded from a live stream + by `liveStreamId`. + example: li400mYKSgQ6xs7taUeSaEKr + explode: true + in: query + name: liveStreamId + required: false + schema: + type: string + style: form + - description: Use this parameter to sort videos by the their created time, + published time, updated time, or by title. + example: publishedAt + explode: true + in: query + name: sortBy + required: false + schema: + enum: + - title + - createdAt + - publishedAt + - updatedAt + type: string + style: form + - description: Use this parameter to sort results. `asc` is ascending and sorts + from A to Z. `desc` is descending and sorts from Z to A. + example: asc + explode: true + in: query + name: sortOrder + required: false + schema: + enum: + - asc + - desc + type: string + style: form + - description: 'Choose the number of search results to return per page. Minimum + value: 1' + example: 2 + explode: true + in: query + name: currentPage + required: false + schema: + default: 1 + type: integer + style: form + - description: Results per page. Allowed values 1-100, default is 25. + example: 30 + explode: true + in: query + name: pageSize + required: false + schema: + default: 25 + type: integer + style: form + responses: + "200": + content: + application/json: + examples: + response: + value: + data: + - videoId: vi4blUQJFrYWbaG44NChkH27 + playerId: pl45KFKdlddgk654dspkze + title: Maths video + description: An amazing video explaining the string theory + public: false + panoramic: false + mp4Support: true + tags: + - maths + - string theory + - video + metadata: + - key: Author + value: John Doe + - key: Format + value: Tutorial + publishedAt: 2019-12-16T08:25:51+00:00 + updatedAt: 2019-12-16T08:48:49+00:00 + discarded: true + discardedAt: 2024-10-16T08:48:49+00:00 + deletesAt: 2024-11-16T08:48:49+00:00 + source: + uri: /videos/c188ed58-3403-46a2-b91b-44603d10b2c9/source + assets: null + - videoId: vi4blUQJFrYWbaG44NChkH27 + title: Video Title + description: A description for your video. + public: false + panoramic: false + mp4Support: true + tags: + - books + - short stories + metadata: + - key: Author + value: John Doe + - key: Science Fiction + value: Cyberpunk + - key: Technology + value: Computers + publishedAt: 2019-12-16T08:25:51+00:00 + updatedAt: 2019-12-16T08:48:49+00:00 + discarded: true + discardedAt: 2024-10-16T08:48:49+00:00 + deletesAt: 2024-11-16T08:48:49+00:00 + source: + uri: /videos/vi4blUQJFrYWbaG44NChkH27/source + assets: null + - videoId: vi4blUQJFrYWbaG44NChkH27 + playerId: pl45KFKdlddgk654dspkze + title: My Video Title + description: A brief description of the video. + public: false + panoramic: false + mp4Support: true + tags: + - General + - Videos + metadata: + - key: Length + value: Short + publishedAt: 2019-12-16T08:25:51+00:00 + updatedAt: 2019-12-16T08:48:49+00:00 + discarded: true + discardedAt: 2024-10-16T08:48:49+00:00 + deletesAt: 2024-11-16T08:48:49+00:00 + source: + uri: /videos/vi4blUQJFrYWbaG44NChkH27/source + assets: null + pagination: + currentPage: 1 + pageSize: 25 + pagesTotal: 1 + itemsTotal: 11 + currentPageItems: 11 + links: + - rel: self + uri: https://ws.api.video/videos?currentPage=1 + - rel: first + uri: https://ws.api.video/videos?currentPage=1 + - rel: last + uri: https://ws.api.video/videos?currentPage=1 + schema: + $ref: '#/components/schemas/videos-list-response' + description: Success + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "400": + content: + application/json: + examples: + response: + value: + title: This parameter is out of the allowed range of values. + name: page + status: 400 + range: + min: 1 + problems: + - title: This parameter is out of the allowed range of values. + name: page + range: + min: 1 + - title: This parameter is out of the allowed range of values. + name: pageSize + range: + min: 10 + max: 100 + schema: + $ref: '#/components/schemas/bad-request' + description: Bad Request headers: X-RateLimit-Limit: description: The request limit per minute. @@ -2657,101 +3680,23 @@ paths: style: simple security: - apiKey: [] - summary: Delete a video object + summary: List all discarded video objects tags: - Videos x-client-description: - default: If you do not need a video any longer, you can send a request to - delete it. All you need is the videoId. - x-client-action: delete - x-doctave: - code-samples: - - language: go - code: "// First install the go client with \"go get github.com/apivideo/api.video-go-client\"\ - \n// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#delete\n\ - \npackage main\nimport (\n \"context\"\n \"fmt\"\n \"os\"\n \ - \ apivideosdk \"github.com/apivideo/api.video-go-client\"\n)\nfunc main()\ - \ {\n client := apivideosdk.ClientBuilder(\"YOUR_API_KEY\").Build()\n\ - \ // if you rather like to use the sandbox environment:\n // client\ - \ := apivideosdk.SandboxClientBuilder(\"YOUR_SANDBOX_API_KEY\").Build()\n\ - \ \n videoId := \"vi4k0jvEUuaTdRAEjQ4Jfrgz\" // string | The\ - \ video ID for the video you want to delete.\n err := client.Videos.Delete(videoId)\n\ - \ if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling\ - \ `Videos.Delete``: %v\\\n\", err)\n }\n} \n" - - language: node - code: "// First install the \"@api.video/nodejs-client\" npm package\n//\ - \ Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#delete\n\ - \nconst client = new ApiVideoClient({ apiKey: \"YOUR_API_KEY\" });\n\n\ - const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // the id of the video to\ - \ delete\nawait client.videos.delete(videoId); \n" - - language: python - code: | - # First install the api client with "pip install api.video" - # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#delete - - import apivideo - from apivideo.api import videos_api - from apivideo.model.not_found import NotFound - from pprint import pprint - # Enter a context with an instance of the API client - with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client: - # Create an instance of the API class - api_instance = videos_api.VideosApi(api_client) - video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The video ID for the video you want to delete. - # example passing only required values which don't have defaults set - try: - # Delete a video - api_instance.delete(video_id) - except apivideo.ApiException as e: - print("Exception when calling VideosApi->delete: %s\n" % e) - - language: java - code: "// First add the \"video.api:java-api-client\" maven dependency to\ - \ your project\n// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#delete\n\ - \nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ - import video.api.client.api.models.*;\nimport video.api.client.api.clients.VideosApi;\n\ - import java.util.*;\n \npublic class Example {\n public static void\ - \ main(String[] args) {\n ApiVideoClient client = new ApiVideoClient(\"\ - YOUR_API_KEY\");\n // if you rather like to use the sandbox environment:\n\ - \ // ApiVideoClient client = new ApiVideoClient(\"YOUR_SANDBOX_API_KEY\"\ - , ApiVideoClient.Environment.SANDBOX);\n \n VideosApi apiInstance\ - \ = client.videos();\n \n String videoId = \"vi4k0jvEUuaTdRAEjQ4Jfrgz\"\ - ; // The video ID for the video you want to delete.\n \n try {\n\ - \ apiInstance.delete(videoId);\n } catch (ApiException e) {\n\ - \ System.err.println(\"Exception when calling VideosApi#delete\"\ - );\n System.err.println(\"Status code: \" + e.getCode());\n \ - \ System.err.println(\"Reason: \" + e.getMessage());\n System.err.println(\"\ - Response headers: \" + e.getResponseHeaders());\n e.printStackTrace();\n\ - \ }\n }\n}\n" - - language: csharp - code: "// First add the \"ApiVideo\" NuGet package to your project\n// Documentation:\ - \ https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#delete\n\ - \nusing System.Diagnostics;\nusing ApiVideo.Client;\n\nnamespace Example\n\ - {\n public class deleteExample\n {\n public static void Main()\n\ - \ {\n var basePath = ApiVideoClient.Client.Environment.SANDBOX;\n\ - \ var apiKey = \"YOUR_API_KEY\";\n var apiInstance\ - \ = new ApiVideoClient(apiKey,basePath);\n var videoId = vi4k0jvEUuaTdRAEjQ4Jfrgz;\ - \ // string | The video ID for the video you want to delete.\n \ - \ var apiVideosInstance = apiInstance.Videos();\n try\n\ - \ {\n // Delete a video\n apiVideosInstance.delete(videoId);\n\ - \ }\n catch (ApiException e)\n {\n \ - \ Debug.Print(\"Exception when calling VideosApi.delete:\ - \ \" + e.Message );\n Debug.Print(\"Status Code: \"+ e.ErrorCode);\n\ - \ Debug.Print(e.StackTrace);\n }\n }\n\ - \ }\n} \n" - - language: php - code: "videos()->delete($videoId); " - - language: swift - code: | - // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started - // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#delete + default: This method returns a list of your discarded videos (with all their + details). With no parameters added, the API returns the first page of all + discarded videos. You can filter discarded videos using the parameters described + below. + x-client-action: listDiscarded + x-group-parameters: true + x-client-paginated: true + x-optional-object: true + /discarded/videos/{videoId}: get: - description: Retrieve the video details by video id. - operationId: GET-video + description: Retrieve the video details of a discarded video object by video + id. + operationId: GET-discarded-video parameters: - description: The unique identifier for the video you want details about. explode: false @@ -2784,18 +3729,14 @@ paths: value: John Doe - key: Format value: Tutorial - publishedAt: 2019-12-16T08:25:51.000Z - updatedAt: 2019-12-16T08:48:49.000Z + publishedAt: 2019-12-16T08:25:51+00:00 + updatedAt: 2019-12-16T08:48:49+00:00 + discarded: true + discardedAt: 2024-10-16T08:48:49+00:00 + deletesAt: 2024-11-16T08:48:49+00:00 source: uri: /videos/vi4blUQJFrYWbaG44NChkH27/source - assets: - iframe: - player: https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27 - hls: https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8 - thumbnail: https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg - mp4: https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4 + assets: null schema: $ref: '#/components/schemas/video' description: Success @@ -2889,114 +3830,19 @@ paths: style: simple security: - apiKey: [] - summary: Retrieve a video object + summary: Retrieve a discarded video object tags: - Videos x-client-description: default: This call provides the same information provided on video creation. For private videos, it will generate a unique token url. Use this to retrieve any details you need about a video, or set up a private viewing URL. - x-client-action: get - x-doctave: - code-samples: - - language: go - code: "// First install the go client with \"go get github.com/apivideo/api.video-go-client\"\ - \n// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#get\n\ - \npackage main\n\nimport (\n \"context\"\n \"fmt\"\n \"os\"\n\ - \ apivideosdk \"github.com/apivideo/api.video-go-client\"\n)\n\nfunc\ - \ main() {\n client := apivideosdk.ClientBuilder(\"YOUR_API_KEY\").Build()\n\ - \ // if you rather like to use the sandbox environment:\n // client\ - \ := apivideosdk.SandboxClientBuilder(\"YOUR_SANDBOX_API_KEY\").Build()\n\ - \ \n videoId := \"videoId_example\" // string | The unique identifier\ - \ for the video you want details about.\n\n \n res, err := client.Videos.Get(videoId)\n\ - \n if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling\ - \ `Videos.Get``: %v\\\n\", err)\n }\n // response from `Get`: Video\n\ - \ fmt.Fprintf(os.Stdout, \"Response from `Videos.Get`: %v\\\n\", res)\n\ - }\n" - - language: node - code: "// First install the \"@api.video/nodejs-client\" npm package\n//\ - \ Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#get\n\ - \nconst client = new ApiVideoClient({ apiKey: \"YOUR_API_KEY\" });\n\n\ - const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for\ - \ the video you want to retrieve.\nconst result = await client.videos.get(videoId);\ - \ \n" - - language: python - code: | - # First install the api client with "pip install api.video" - # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#get - - import apivideo - from apivideo.api import videos_api - from apivideo.model.not_found import NotFound - from apivideo.model.video import Video - from pprint import pprint - - # Enter a context with an instance of the API client - with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client: - # Create an instance of the API class - api_instance = videos_api.VideosApi(api_client) - video_id = "videoId_example" # str | The unique identifier for the video you want details about. - - # example passing only required values which don't have defaults set - try: - # Show a video - api_response = api_instance.get(video_id) - pprint(api_response) - except apivideo.ApiException as e: - print("Exception when calling VideosApi->get: %s\n" % e) - - language: java - code: "// First add the \"video.api:java-api-client\" maven dependency to\ - \ your project\n// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#get\n\ - \nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ - import video.api.client.api.models.*;\nimport video.api.client.api.clients.VideosApi;\n\ - import java.util.*;\n\npublic class Example {\n public static void main(String[]\ - \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_KEY\"\ - );\n // if you rather like to use the sandbox environment:\n //\ - \ ApiVideoClient client = new ApiVideoClient(\"YOUR_SANDBOX_API_KEY\"\ - , ApiVideoClient.Environment.SANDBOX);\n\n VideosApi apiInstance =\ - \ client.videos();\n \n String videoId = \"videoId_example\"; //\ - \ The unique identifier for the video you want details about.\n\n try\ - \ {\n Video result = apiInstance.get(videoId);\n System.out.println(result);\n\ - \ } catch (ApiException e) {\n System.err.println(\"Exception\ - \ when calling VideosApi#get\");\n System.err.println(\"Status code:\ - \ \" + e.getCode());\n System.err.println(\"Reason: \" + e.getMessage());\n\ - \ System.err.println(\"Response headers: \" + e.getResponseHeaders());\n\ - \ e.printStackTrace();\n }\n }\n} \n" - - language: csharp - code: "// First add the \"ApiVideo\" NuGet package to your project\n// Documentation:\ - \ https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#get\n\ - \nusing System.Diagnostics;\nusing ApiVideo.Client;\n\nnamespace Example\n\ - {\n public class getExample\n {\n public static void Main()\n\ - \ {\n var basePath = ApiVideoClient.Client.Environment.SANDBOX;\n\ - \ var apiKey = \"YOUR_API_KEY\";\n\n var apiInstance\ - \ = new ApiVideoClient(apiKey,basePath);\n\n var videoId =\ - \ videoId_example; // string | The unique identifier for the video you\ - \ want details about.\n var apiVideosInstance = apiInstance.Videos();\n\ - \ try\n {\n // Show a video\n \ - \ Video result = apiVideosInstance.get(videoId);\n \ - \ Debug.WriteLine(result);\n }\n catch (ApiException\ - \ e)\n {\n Debug.Print(\"Exception when calling\ - \ VideosApi.get: \" + e.Message );\n Debug.Print(\"Status\ - \ Code: \"+ e.ErrorCode);\n Debug.Print(e.StackTrace);\n\ - \ }\n }\n }\n} \n" - - language: php - code: "videos()->getStatus($videoId);\ - \ " - - language: swift - code: | - // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started - // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#get + x-client-action: getDiscarded patch: - description: Update the parameters associated with a video ID. - operationId: PATCH-video + description: Restore a discarded video + operationId: PATCH-discarded-video parameters: - - description: The video ID for the video you want to update. + - description: The video ID for the video you want to restore. example: vi4k0jvEUuaTdRAEjQ4Jfrgz explode: false in: path @@ -3009,7 +3855,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/video-update-payload' + $ref: '#/components/schemas/discarded-video-update-payload' required: true responses: "200": @@ -3034,18 +3880,14 @@ paths: value: John Doe - key: Format value: Tutorial - publishedAt: 2019-12-16T08:25:51.000Z - updatedAt: 2019-12-16T08:48:49.000Z + publishedAt: 2019-12-16T08:25:51+00:00 + updatedAt: 2019-12-16T08:48:49+00:00 + discarded: true + discardedAt: 2024-10-16T08:48:49+00:00 + deletesAt: 2024-11-16T08:48:49+00:00 source: uri: /videos/vi4blUQJFrYWbaG44NChkH27/source - assets: - iframe: - player: https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27 - hls: https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8 - thumbnail: https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg - mp4: https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4 + assets: null schema: $ref: '#/components/schemas/video' description: Success @@ -3077,19 +3919,10 @@ paths: response: value: type: https://docs.api.video/reference/invalid-attribute - title: This attribute must be a ISO-8601 date. - name: scheduledAt + title: An attribute is invalid. + detail: Value must be false. + name: discarded status: 400 - problems: - - type: https://docs.api.video/reference/invalid-attribute - title: This attribute must be a ISO-8601 date. - name: scheduledAt - - type: https://docs.api.video/reference/invalid-attribute - title: This attribute must be an array. - name: tags - - type: https://docs.api.video/reference/invalid-attribute - title: This attribute must be an array. - name: metadata schema: $ref: '#/components/schemas/bad-request' description: Bad Request @@ -3183,16 +4016,13 @@ paths: style: simple security: - apiKey: [] - summary: Update a video object + summary: Update a discarded video object tags: - Videos x-client-description: - default: "Updates the parameters associated with a video ID. The video object\ - \ you are updating is determined by the video ID you provide. \n\nNOTE:\ - \ If you are updating an array, you must provide the entire array as what\ - \ you provide here overwrites what is in the system rather than appending\ - \ to it.\n" - x-client-action: update + default: | + Use this endpoint to restore a discarded video when you have the Video Restore feature enabled. + x-client-action: updateDiscarded x-doctave: code-samples: - language: go @@ -3623,7 +4453,7 @@ paths: parameters: - description: 'Allowed: createdAt, ttl. You can use these to sort by when a token was created, or how much longer the token will be active (ttl - time - to live). Date and time is presented in ISO-8601 format.' + to live). Date and time is presented in ATOM UTC format.' example: ttl explode: true in: query @@ -3679,11 +4509,11 @@ paths: data: - token: to37YfoPDRR2pcDKa6LsUE0M ttl: 3600 - createdAt: 2020-12-02T10:26:46.000Z - expiresAt: 2020-12-02T11:26:46.000Z + createdAt: 2020-12-02T10:26:46+00:00 + expiresAt: 2020-12-02T11:26:46+00:00 - token: to1W3ZS9PdUBZWzzTEZr1B79 ttl: 0 - createdAt: 2020-12-02T10:26:28.000Z + createdAt: 2020-12-02T10:26:28+00:00 pagination: currentPage: 1 currentPageItems: 2 @@ -3913,8 +4743,8 @@ paths: value: token: to1tcmSFHeYY5KzyhOqVKMKb ttl: 3600 - createdAt: 2020-12-02T10:13:19.000Z - expiresAt: 2020-12-02T11:13:19.000Z + createdAt: 2020-12-02T10:13:19+00:00 + expiresAt: 2020-12-02T11:13:19+00:00 schema: $ref: '#/components/schemas/upload-token' description: Success @@ -4337,7 +5167,7 @@ paths: value: token: to1tcmSFHeYY5KzyhOqVKMKb ttl: 0 - createdAt: 2020-12-02T10:13:19.000Z + createdAt: 2020-12-02T10:13:19+00:00 schema: $ref: '#/components/schemas/upload-token' description: Success @@ -4599,7 +5429,10 @@ paths: value: John Doe - key: Format value: Tutorial - publishedAt: 4665-07-14T23:36:18.598Z + publishedAt: 2024-07-14T23:36:07+00:00 + discarded: false + discardedAt: null + deletesAt: null source: uri: /videos/vi4k0jvEUuaTdRAEjQ4Jfrgz/source assets: @@ -4793,7 +5626,7 @@ paths: `createdAt` - the time a live stream was created. `updatedAt` - the time a live stream was last updated. - When using `createdAt` or `updatedAt`, the API sorts the results based on the ISO-8601 time format. + When using `createdAt` or `updatedAt`, the API sorts the results based on the ATOM UTC time format. example: createdAt explode: true in: query @@ -4850,8 +5683,8 @@ paths: value: data: - liveStreamId: li400mYKSgQ6xs7taUeSaEKr - createdAt: 2020-01-31T10:17:47.000Z - updatedAt: 2020-03-09T13:19:43.000Z + createdAt: 2020-01-31T10:17:47+00:00 + updatedAt: 2020-03-09T13:19:43+00:00 streamKey: 30087931-229e-42cf-b5f9-e91bcc1f7332 restreams: - name: YouTube @@ -4871,8 +5704,8 @@ paths: hls: https://live.api.video/li400mYKSgQ6xs7taUeSaEKr.m3u8 thumbnail: https://live.api.video/li400mYKSgQ6xs7taUeSaEKr/thumbnail.jpg - liveStreamId: li4pqNqGUkhKfWcBGpZVLRY5 - createdAt: 2020-07-29T10:45:35.000Z - updatedAt: 2020-07-29T10:45:35.000Z + createdAt: 2020-07-29T10:45:35+00:00 + updatedAt: 2020-07-29T10:45:35+00:00 streamKey: cc1b4df0-d1c5-4064-a8f9-9f0368385135 restreams: - name: YouTube @@ -9306,7 +10139,7 @@ paths: operationId: GET_players parameters: - description: createdAt is the time the player was created. updatedAt is the - time the player was last updated. The time is presented in ISO-8601 format. + time the player was last updated. The time is presented in ATOM UTC format. example: createdAt explode: true in: query @@ -9535,7 +10368,7 @@ paths: \ req := apivideosdk.PlayerThemesApiListRequest{}\n \n req.SortBy(\"\ createdAt\") // string | createdAt is the time the player was created.\ \ updatedAt is the time the player was last updated. The time is presented\ - \ in ISO-8601 format.\n req.SortOrder(\"asc\") // string | Allowed:\ + \ in ATOM UTC format.\n req.SortOrder(\"asc\") // string | Allowed:\ \ asc, desc. Ascending for date and time means that earlier values precede\ \ later ones. Descending means that later values preced earlier ones.\n\ \ req.CurrentPage(int32(2)) // int32 | Choose the number of search\ @@ -9552,7 +10385,7 @@ paths: \nconst client = new ApiVideoClient({ apiKey: \"YOUR_API_KEY\" });\n\n\ const sortBy = 'createdAt'; // createdAt is the time the player was created.\ \ updatedAt is the time the player was last updated. The time is presented\ - \ in ISO-8601 format.\nconst sortOrder = 'asc'; // Allowed: asc, desc.\ + \ in ATOM UTC format.\nconst sortOrder = 'asc'; // Allowed: asc, desc.\ \ Ascending for date and time means that earlier values precede later\ \ ones. Descending means that later values preced earlier ones.\nconst\ \ currentPage = 2; // Choose the number of search results to return per\ @@ -9575,7 +10408,7 @@ paths: with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client: # Create an instance of the API class api_instance = player_themes_api.PlayerThemesApi(api_client) - sort_by = "createdAt" # str | createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ISO-8601 format. (optional) + sort_by = "createdAt" # str | createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ATOM UTC format. (optional) sort_order = "asc" # str | Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones. (optional) current_page = 2 # int | Choose the number of search results to return per page. Minimum value: 1 (optional) if omitted the server will use the default value of 1 page_size = 30 # int | Results per page. Allowed values 1-100, default is 25. (optional) if omitted the server will use the default value of 25 @@ -9600,7 +10433,7 @@ paths: , ApiVideoClient.Environment.SANDBOX);\n\n PlayerThemesApi apiInstance\ \ = client.playerThemes();\n \n String sortBy = \"createdAt\"; //\ \ createdAt is the time the player was created. updatedAt is the time\ - \ the player was last updated. The time is presented in ISO-8601 format.\n\ + \ the player was last updated. The time is presented in ATOM UTC format.\n\ \ String sortOrder = \"asc\"; // Allowed: asc, desc. Ascending for\ \ date and time means that earlier values precede later ones. Descending\ \ means that later values preced earlier ones.\n Integer currentPage\ @@ -9624,15 +10457,15 @@ paths: \ var apiKey = \"YOUR_API_KEY\";\n\n var apiInstance\ \ = new ApiVideoClient(apiKey,basePath);\n\n var sortBy = createdAt;\ \ // string | createdAt is the time the player was created. updatedAt\ - \ is the time the player was last updated. The time is presented in ISO-8601\ - \ format. (optional) \n var sortOrder = asc; // string | Allowed:\ - \ asc, desc. Ascending for date and time means that earlier values precede\ - \ later ones. Descending means that later values preced earlier ones.\ - \ (optional) \n var currentPage = 2; // int? | Choose the\ - \ number of search results to return per page. Minimum value: 1 (optional)\ - \ (default to 1)\n var pageSize = 30; // int? | Results per\ - \ page. Allowed values 1-100, default is 25. (optional) (default to 25)\n\ - \ var apiPlayerThemesInstance = apiInstance.PlayerThemes();\n\ + \ is the time the player was last updated. The time is presented in ATOM\ + \ UTC format. (optional) \n var sortOrder = asc; // string\ + \ | Allowed: asc, desc. Ascending for date and time means that earlier\ + \ values precede later ones. Descending means that later values preced\ + \ earlier ones. (optional) \n var currentPage = 2; // int?\ + \ | Choose the number of search results to return per page. Minimum value:\ + \ 1 (optional) (default to 1)\n var pageSize = 30; // int?\ + \ | Results per page. Allowed values 1-100, default is 25. (optional)\ + \ (default to 25)\n var apiPlayerThemesInstance = apiInstance.PlayerThemes();\n\ \ try\n {\n // List all players\n\ \ PlayerThemesListResponse result = apiPlayerThemesInstance.list(sortBy,\ \ sortOrder, currentPage, pageSize);\n Debug.WriteLine(result);\n\ @@ -9647,7 +10480,7 @@ paths: \nrequire __DIR__ . '/vendor/autoload.php';\n\n$playerThemes = $client->playerThemes()->list(array(\n\ \ 'sortBy' => 'createdAt', // createdAt is the time the player was\ \ created. updatedAt is the time the player was last updated. The time\ - \ is presented in ISO-8601 format.\n 'sortOrder' => 'asc', // ->setAllowed(asc,\ + \ is presented in ATOM UTC format.\n 'sortOrder' => 'asc', // ->setAllowed(asc,\ \ desc. Ascending for date and time means that earlier values precede\ \ later ones. Descending means that later values preced earlier ones.)\n\ \ 'currentPage' => 2, // Choose the number of search results to return\ @@ -12343,11 +13176,11 @@ paths: 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 + - emittedAt: 2024-05-29T07+00:00:00:00 metricValue: 2 - - emittedAt: 2024-05-29T08:00:00+00:00 + - emittedAt: 2024-05-29T08+00:00:00:00 metricValue: 1 - - emittedAt: 2024-05-29T09:00:00+00:00 + - emittedAt: 2024-05-29T09+00:00:00:00 metricValue: 1 pagination: currentPage: 1 @@ -12613,12 +13446,12 @@ paths: value: data: - webhookId: webhook_XXXXXXXXXXXXXXX - createdAt: 2021-01-08T14:12:18.000Z + createdAt: 2021-01-08T14:12:18+00:00 events: - video.encoding.quality.completed url: http://clientnotificationserver.com/notif?myquery=query - webhookId: webhook_XXXXXXXXXYYYYYY - createdAt: 2021-01-12T12:12:12.000Z + createdAt: 2021-01-12T12:12:12+00:00 events: - video.encoding.quality.completed url: http://clientnotificationserver.com/notif?myquery=query2 @@ -12846,7 +13679,7 @@ paths: response: value: webhookId: webhook_XXXXXXXXXXXXXXX - createdAt: 2021-01-08T14:12:18.000Z + createdAt: 2021-01-08T14:12:18+00:00 events: - video.encoding.quality.completed url: http://clientnotificationserver.com/notif?myquery=query @@ -13314,7 +14147,7 @@ paths: response: value: webhookId: webhook_XXXXXXXXXXXXXXX - createdAt: 2021-01-08T14:12:18.000Z + createdAt: 2021-01-08T14:12:18+00:00 events: - video.encoding.quality.completed url: http://clientnotificationserver.com/notif?myquery=query @@ -13495,8 +14328,8 @@ components: live-stream-response-example: value: liveStreamId: li4pqNqGUkhKfWcBGpZVLRY5 - createdAt: 2020-07-29T10:45:35.000Z - updatedAt: 2020-07-29T10:45:35.000Z + createdAt: 2020-07-29T10:45:35+00:00 + updatedAt: 2020-07-29T10:45:35+00:00 streamKey: cc1b4df0-d1c5-4064-a8f9-9f0368385135 restreams: - name: YouTube @@ -13828,8 +14661,11 @@ components: value: John Doe - key: Format value: Tutorial - createdAt: 4251-03-03T12:52:03.085Z - publishedAt: 4665-07-14T23:36:18.598Z + createdAt: 2024-03-03T12:52:03+00:00 + publishedAt: 2024-07-14T23:36:07+00:00 + discarded: false + discardedAt: null + deletesAt: null actions: - video_delete - video_download @@ -13840,7 +14676,8 @@ components: example: vi4k0jvEUuaTdRAEjQ4Prklg type: string createdAt: - description: When a video was created, presented in ISO-8601 format. + description: When a video was created, presented in ATOM UTC format. + example: 2024-05-28T11:15:07Z format: date-time type: string title: @@ -13855,16 +14692,37 @@ components: type: string publishedAt: description: The date and time the API created the video. Date and time - are provided using ISO-8601 UTC format. - example: 2019-12-16T08:25:51Z + are provided using ATOM UTC format. + example: 2024-05-28T11:15:07Z format: date-time type: string updatedAt: description: The date and time the video was updated. Date and time are - provided using ISO-8601 UTC format. - example: 2019-12-16T08:15:51Z + provided using ATOM UTC format. + example: 2024-05-28T11:15:07Z + format: date-time + type: string + discardedAt: + description: The date and time the video was discarded. The API populates + this field only if you have the Video Restore feature enabled and discard + a video. Date and time are provided using ATOM UTC format. + example: 2024-05-28T11:15:07Z + format: date-time + nullable: true + type: string + deletesAt: + description: The date and time the video will be permanently deleted. The + API populates this field only if you have the Video Restore feature enabled + and discard a video. Discarded videos are pemanently deleted after 90 + days. Date and time are provided using ATOM UTC format. + example: 2024-05-28T11:15:07Z format: date-time + nullable: true type: string + discarded: + description: Returns `true` for videos you discarded when you have the Video + Restore feature enabled. Returns `false` for every other video. + type: boolean tags: description: "One array of tags (each tag is a string) in order to categorize\ \ a video. Tags may include spaces. \n" @@ -13874,7 +14732,7 @@ components: type: array metadata: description: | - Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata/) allows you to define a key that allows any value pair. + Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. example: '[{"key":"Author", "value":"John Doe"}, {"key":"Format", "value":"Tutorial"}]' items: $ref: '#/components/schemas/metadata' @@ -13910,14 +14768,15 @@ components: watermark: example: watermarkId: watermark_1BWr2L5MTQwxGkuxKjzh6i - createdAt: 2000-01-23T04:56:07.000+00:00 + createdAt: 2019-06-24T11:45:01Z properties: watermarkId: description: The unique identifier of the watermark. example: watermark_1BWr2L5MTQwxGkuxKjzh6i type: string createdAt: - description: When the watermark was created, presented in ISO-8601 format. + description: When the watermark was created, presented in ATOM UTC format. + example: 2019-06-24T11:45:01Z format: date-time type: string title: Watermark @@ -13945,9 +14804,9 @@ components: uri: /videos/search?currentPage=6&pageSize=20 data: - watermarkId: watermark_1BWr2L5MTQwxGkuxKjzh6i - createdAt: 2000-01-23T04:56:07.000+00:00 + createdAt: 2019-06-24T11:45:01Z - watermarkId: watermark_1BWr2L5MTQwxGkuxKjzh6i - createdAt: 2000-01-23T04:56:07.000+00:00 + createdAt: 2019-06-24T11:45:01Z properties: data: items: @@ -14054,12 +14913,12 @@ components: example: pl45KFKdlddgk654dspkze type: string createdAt: - description: When the player was created, presented in ISO-8601 format. + description: When the player was created, presented in ATOM UTC format. example: 2020-01-31T10:17:47Z format: date-time type: string updatedAt: - description: When the player was last updated, presented in ISO-8601 format. + description: When the player was last updated, presented in ATOM UTC format. example: 2020-01-31T10:18:47Z format: date-time type: string @@ -14314,12 +15173,12 @@ components: $ref: '#/components/schemas/restreams-response-object' type: array createdAt: - description: When the player was created, presented in ISO-8601 format. + description: When the player was created, presented in ATOM UTC format. example: 2020-01-31T10:17:47Z format: date-time type: string updatedAt: - description: When the player was last updated, presented in ISO-8601 format. + description: When the player was last updated, presented in ATOM UTC format. example: 2020-01-31T10:18:47Z format: date-time type: string @@ -14336,8 +15195,8 @@ components: example: play type: string emittedAt: - description: When an event occurred, presented in ISO-8601 format. - example: 2019-06-24T11:45:01.109Z + description: When an event occurred, presented in ATOM UTC format. + example: 2019-06-24T11:45:01Z format: date-time type: string at: @@ -14350,7 +15209,7 @@ components: type: object webhook: example: - createdAt: 2019-06-24T11:45:01.109Z + createdAt: 2019-06-24T11:45:01Z webhookId: webhook_XXXXXXXXXXXXXXX events: '["video.encoding.quality.completed"]' url: http://clientnotificationserver.com/notif?myquery=query @@ -14360,8 +15219,8 @@ components: example: webhook_XXXXXXXXXXXXXXX type: string createdAt: - description: When an webhook was created, presented in ISO-8601 format. - example: 2019-06-24T11:45:01.109Z + description: When an webhook was created, presented in ATOM UTC format. + example: 2019-06-24T11:45:01Z format: date-time type: string events: @@ -14509,12 +15368,12 @@ components: minimum: 0 type: integer createdAt: - description: When the token was created, displayed in ISO-8601 format. + description: When the token was created, displayed in ATOM UTC format. example: 2019-12-16T08:25:51Z format: date-time type: string expiresAt: - description: When the token expires, displayed in ISO-8601 format. + description: When the token expires, displayed in ATOM UTC format. example: 2019-12-16T09:25:51Z format: date-time nullable: true @@ -14579,8 +15438,11 @@ components: value: John Doe - key: Format value: Tutorial - createdAt: 4251-03-03T12:52:03.085Z - publishedAt: 4665-07-14T23:36:18.598Z + createdAt: 2024-03-03T12:52:03+00:00 + publishedAt: 2024-07-14T23:36:07+00:00 + discarded: false + discardedAt: null + deletesAt: null actions: - video_delete - video_download @@ -14597,8 +15459,11 @@ components: value: John Doe - key: Format value: Tutorial - createdAt: 4251-03-03T12:52:03.085Z - publishedAt: 4665-07-14T23:36:18.598Z + createdAt: 2024-03-03T12:52:03+00:00 + publishedAt: 2024-07-14T23:36:07+00:00 + discarded: false + discardedAt: null + deletesAt: null actions: - video_delete - video_download @@ -14697,8 +15562,7 @@ components: type: array metadata: description: 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. Read more on [dynamic metadata](https://api.video/blog/endpoints/dynamic-metadata/). + for your video. example: '[{"key": "Author", "value": "John Doe"}]' items: $ref: '#/components/schemas/metadata' @@ -14807,13 +15671,23 @@ components: description: A list (array) of dictionaries where each dictionary contains a key value pair that describes the video. As with tags, you must send the complete list of metadata you want as whatever you send here will - overwrite the existing metadata for the video. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata/) - allows you to define a key that allows any value pair. + overwrite the existing metadata for the video. items: $ref: '#/components/schemas/metadata' type: array title: VideoUpdatePayload type: object + discarded-video-update-payload: + example: + discarded: false + properties: + discarded: + description: Use this parameter to restore a discarded video when you have + the Video Restore feature enabled. This parameter only accepts `false` + as a value! + type: boolean + title: DiscardedVideoUpdatePayload + type: object token-list-response: example: pagination: @@ -15490,11 +16364,11 @@ components: rel: last uri: /videos/search?currentPage=6&pageSize=20 data: - - createdAt: 2019-06-24T11:45:01.109Z + - createdAt: 2019-06-24T11:45:01Z webhookId: webhook_XXXXXXXXXXXXXXX events: '["video.encoding.quality.completed"]' url: http://clientnotificationserver.com/notif?myquery=query - - createdAt: 2019-06-24T11:45:01.109Z + - createdAt: 2019-06-24T11:45:01Z webhookId: webhook_XXXXXXXXXXXXXXX events: '["video.encoding.quality.completed"]' url: http://clientnotificationserver.com/notif?myquery=query diff --git a/api_videos.go b/api_videos.go index 4b0106f..deca724 100644 --- a/api_videos.go +++ b/api_videos.go @@ -87,6 +87,55 @@ func (r VideosApiListRequest) PageSize(pageSize int32) VideosApiListRequest { return r } +type VideosApiListDiscardedRequest struct { + title *string + tags *[]string + metadata *map[string]string + description *string + liveStreamId *string + sortBy *string + sortOrder *string + currentPage *int32 + pageSize *int32 +} + +func (r VideosApiListDiscardedRequest) Title(title string) VideosApiListDiscardedRequest { + r.title = &title + return r +} +func (r VideosApiListDiscardedRequest) Tags(tags []string) VideosApiListDiscardedRequest { + r.tags = &tags + return r +} +func (r VideosApiListDiscardedRequest) Metadata(metadata map[string]string) VideosApiListDiscardedRequest { + r.metadata = &metadata + return r +} +func (r VideosApiListDiscardedRequest) Description(description string) VideosApiListDiscardedRequest { + r.description = &description + return r +} +func (r VideosApiListDiscardedRequest) LiveStreamId(liveStreamId string) VideosApiListDiscardedRequest { + r.liveStreamId = &liveStreamId + return r +} +func (r VideosApiListDiscardedRequest) SortBy(sortBy string) VideosApiListDiscardedRequest { + r.sortBy = &sortBy + return r +} +func (r VideosApiListDiscardedRequest) SortOrder(sortOrder string) VideosApiListDiscardedRequest { + r.sortOrder = &sortOrder + return r +} +func (r VideosApiListDiscardedRequest) CurrentPage(currentPage int32) VideosApiListDiscardedRequest { + r.currentPage = ¤tPage + return r +} +func (r VideosApiListDiscardedRequest) PageSize(pageSize int32) VideosApiListDiscardedRequest { + r.pageSize = &pageSize + return r +} + type VideosServiceI interface { /* * Create Create a video object @@ -307,6 +356,23 @@ type VideosServiceI interface { PickThumbnailWithContext(ctx context.Context, videoId string, videoThumbnailPickPayload VideoThumbnailPickPayload) (*Video, error) + /* + * GetDiscarded Retrieve a discarded video object + * @param videoId The unique identifier for the video you want details about. + * @return VideosApiGetDiscardedRequest + */ + + GetDiscarded(videoId string) (*Video, error) + + /* + * GetDiscarded Retrieve a discarded video object + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param videoId The unique identifier for the video you want details about. + * @return VideosApiGetDiscardedRequest + */ + + GetDiscardedWithContext(ctx context.Context, videoId string) (*Video, error) + /* * GetStatus Retrieve video status and details * @param videoId The unique identifier for the video you want the status for. @@ -323,6 +389,38 @@ type VideosServiceI interface { */ GetStatusWithContext(ctx context.Context, videoId string) (*VideoStatus, error) + + /* + * ListDiscarded List all discarded video objects + * @return VideosApiListDiscardedRequest + */ + + ListDiscarded(r VideosApiListDiscardedRequest) (*VideosListResponse, error) + + /* + * ListDiscarded List all discarded video objects + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return VideosApiListDiscardedRequest + */ + + ListDiscardedWithContext(ctx context.Context, r VideosApiListDiscardedRequest) (*VideosListResponse, error) + + /* + * UpdateDiscarded Update a discarded video object + * @param videoId The video ID for the video you want to restore. + * @return VideosApiUpdateDiscardedRequest + */ + + UpdateDiscarded(videoId string, discardedVideoUpdatePayload DiscardedVideoUpdatePayload) (*Video, error) + + /* + * UpdateDiscarded Update a discarded video object + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param videoId The video ID for the video you want to restore. + * @return VideosApiUpdateDiscardedRequest + */ + + UpdateDiscardedWithContext(ctx context.Context, videoId string, discardedVideoUpdatePayload DiscardedVideoUpdatePayload) (*Video, error) } // VideosService communicating with the Videos @@ -897,7 +995,7 @@ func (s *VideosService) UpdateWithContext(ctx context.Context, videoId string, v /* * Delete Delete a video object - * If you do not need a video any longer, you can send a request to delete it. All you need is the videoId. + * If you do not need a video any longer, you can send a request to delete it. All you need is the videoId. By default, deleted videos cannot be recovered. If you have the Video Restore feature enabled, this operation will discard the video instead of permanently deleting it. Make sure you subscribe to the Video Restore feature if you want to be able to restore deleted videos! The Video Restore feature retains videos for 90 days, after which the videos are permanently deleted * @param videoId The video ID for the video you want to delete. * @return VideosApiDeleteRequest @@ -911,7 +1009,7 @@ func (s *VideosService) Delete(videoId string) error { /* * Delete Delete a video object - * If you do not need a video any longer, you can send a request to delete it. All you need is the videoId. + * If you do not need a video any longer, you can send a request to delete it. All you need is the videoId. By default, deleted videos cannot be recovered. If you have the Video Restore feature enabled, this operation will discard the video instead of permanently deleting it. Make sure you subscribe to the Video Restore feature if you want to be able to restore deleted videos! The Video Restore feature retains videos for 90 days, after which the videos are permanently deleted * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param videoId The video ID for the video you want to delete. * @return VideosApiDeleteRequest @@ -1194,6 +1292,53 @@ func (s *VideosService) PickThumbnailWithContext(ctx context.Context, videoId st } +/* + * GetDiscarded Retrieve a discarded video object + * This call provides the same information provided on video creation. For private videos, it will generate a unique token url. Use this to retrieve any details you need about a video, or set up a private viewing URL. + + * @param videoId The unique identifier for the video you want details about. + * @return VideosApiGetDiscardedRequest + */ + +func (s *VideosService) GetDiscarded(videoId string) (*Video, error) { + + return s.GetDiscardedWithContext(context.Background(), videoId) + +} + +/* + * GetDiscarded Retrieve a discarded video object + * This call provides the same information provided on video creation. For private videos, it will generate a unique token url. Use this to retrieve any details you need about a video, or set up a private viewing URL. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param videoId The unique identifier for the video you want details about. + * @return VideosApiGetDiscardedRequest + */ + +func (s *VideosService) GetDiscardedWithContext(ctx context.Context, videoId string) (*Video, error) { + var localVarPostBody interface{} + + localVarPath := "/discarded/videos/{videoId}" + localVarPath = strings.Replace(localVarPath, "{"+"videoId"+"}", url.PathEscape(parameterToString(videoId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + + req, err := s.client.prepareRequest(ctx, http.MethodGet, localVarPath, localVarPostBody, localVarHeaderParams, localVarQueryParams) + if err != nil { + return nil, err + } + + res := new(Video) + _, err = s.client.do(req, res) + + if err != nil { + return nil, err + } + + return res, nil + +} + /* * GetStatus Retrieve video status and details * This method provides upload status & encoding status to determine when the video is uploaded or ready to playback. Once encoding is completed, the response also lists the available stream qualities. @@ -1240,3 +1385,137 @@ func (s *VideosService) GetStatusWithContext(ctx context.Context, videoId string return res, nil } + +/* + * ListDiscarded List all discarded video objects + * This method returns a list of your discarded videos (with all their details). With no parameters added, the API returns the first page of all discarded videos. You can filter discarded videos using the parameters described below. + + * @return VideosApiListDiscardedRequest + */ + +func (s *VideosService) ListDiscarded(r VideosApiListDiscardedRequest) (*VideosListResponse, error) { + + return s.ListDiscardedWithContext(context.Background(), r) + +} + +/* + * ListDiscarded List all discarded video objects + * This method returns a list of your discarded videos (with all their details). With no parameters added, the API returns the first page of all discarded videos. You can filter discarded videos using the parameters described below. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return VideosApiListDiscardedRequest + */ + +func (s *VideosService) ListDiscardedWithContext(ctx context.Context, r VideosApiListDiscardedRequest) (*VideosListResponse, error) { + var localVarPostBody interface{} + + localVarPath := "/discarded/videos" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + + if r.title != nil { + localVarQueryParams.Add("title", parameterToString(*r.title, "")) + } + if r.tags != nil { + t := *r.tags + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("tags[]", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("tags[]", parameterToString(t, "multi")) + } + } + if r.metadata != nil { + addDeepQueryParams(r.metadata, "metadata", localVarQueryParams) + } + if r.description != nil { + localVarQueryParams.Add("description", parameterToString(*r.description, "")) + } + if r.liveStreamId != nil { + localVarQueryParams.Add("liveStreamId", parameterToString(*r.liveStreamId, "")) + } + if r.sortBy != nil { + localVarQueryParams.Add("sortBy", parameterToString(*r.sortBy, "")) + } + if r.sortOrder != nil { + localVarQueryParams.Add("sortOrder", parameterToString(*r.sortOrder, "")) + } + if r.currentPage != nil { + localVarQueryParams.Add("currentPage", parameterToString(*r.currentPage, "")) + } + if r.pageSize != nil { + localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) + } + + req, err := s.client.prepareRequest(ctx, http.MethodGet, localVarPath, localVarPostBody, localVarHeaderParams, localVarQueryParams) + if err != nil { + return nil, err + } + + res := new(VideosListResponse) + _, err = s.client.do(req, res) + + if err != nil { + return nil, err + } + + return res, nil + +} + +/* + * UpdateDiscarded Update a discarded video object + * Use this endpoint to restore a discarded video when you have the Video Restore feature enabled. + + + + * @param videoId The video ID for the video you want to restore. + * @return VideosApiUpdateDiscardedRequest + */ + +func (s *VideosService) UpdateDiscarded(videoId string, discardedVideoUpdatePayload DiscardedVideoUpdatePayload) (*Video, error) { + + return s.UpdateDiscardedWithContext(context.Background(), videoId, discardedVideoUpdatePayload) + +} + +/* + * UpdateDiscarded Update a discarded video object + * Use this endpoint to restore a discarded video when you have the Video Restore feature enabled. + + + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param videoId The video ID for the video you want to restore. + * @return VideosApiUpdateDiscardedRequest + */ + +func (s *VideosService) UpdateDiscardedWithContext(ctx context.Context, videoId string, discardedVideoUpdatePayload DiscardedVideoUpdatePayload) (*Video, error) { + var localVarPostBody interface{} + + localVarPath := "/discarded/videos/{videoId}" + localVarPath = strings.Replace(localVarPath, "{"+"videoId"+"}", url.PathEscape(parameterToString(videoId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + + // body params + localVarPostBody = discardedVideoUpdatePayload + + req, err := s.client.prepareRequest(ctx, http.MethodPatch, localVarPath, localVarPostBody, localVarHeaderParams, localVarQueryParams) + if err != nil { + return nil, err + } + + res := new(Video) + _, err = s.client.do(req, res) + + if err != nil { + return nil, err + } + + return res, nil + +} diff --git a/client.go b/client.go index b96f1be..7436733 100644 --- a/client.go +++ b/client.go @@ -255,7 +255,7 @@ func (c *Client) prepareRequest( req.Header.Set("AV-Origin-Sdk", originSdkHeaderValue) } - req.Header.Set("AV-Origin-Client", "go:1.4.1") + req.Header.Set("AV-Origin-Client", "go:1.4.2") for headerName := range headerParams { req.Header.Set(headerName, headerParams[headerName]) @@ -530,7 +530,7 @@ func (c *Client) auth(req *http.Request) (*http.Request, error) { req.Header.Set("AV-Origin-Sdk", originSdkHeaderValue) } - req.Header.Set("AV-Origin-Client", "go:1.4.1") + req.Header.Set("AV-Origin-Client", "go:1.4.2") resp, err := c.httpClient.Do(req) diff --git a/docs/DiscardedVideoUpdatePayload.md b/docs/DiscardedVideoUpdatePayload.md new file mode 100644 index 0000000..c33770d --- /dev/null +++ b/docs/DiscardedVideoUpdatePayload.md @@ -0,0 +1,56 @@ +# DiscardedVideoUpdatePayload + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Discarded** | Pointer to **bool** | Use this parameter to restore a discarded video when you have the Video Restore feature enabled. This parameter only accepts `false` as a value! | [optional] + +## Methods + +### NewDiscardedVideoUpdatePayload + +`func NewDiscardedVideoUpdatePayload() *DiscardedVideoUpdatePayload` + +NewDiscardedVideoUpdatePayload instantiates a new DiscardedVideoUpdatePayload object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDiscardedVideoUpdatePayloadWithDefaults + +`func NewDiscardedVideoUpdatePayloadWithDefaults() *DiscardedVideoUpdatePayload` + +NewDiscardedVideoUpdatePayloadWithDefaults instantiates a new DiscardedVideoUpdatePayload object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDiscarded + +`func (o *DiscardedVideoUpdatePayload) GetDiscarded() bool` + +GetDiscarded returns the Discarded field if non-nil, zero value otherwise. + +### GetDiscardedOk + +`func (o *DiscardedVideoUpdatePayload) GetDiscardedOk() (*bool, bool)` + +GetDiscardedOk returns a tuple with the Discarded field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDiscarded + +`func (o *DiscardedVideoUpdatePayload) SetDiscarded(v bool)` + +SetDiscarded sets Discarded field to given value. + +### HasDiscarded + +`func (o *DiscardedVideoUpdatePayload) HasDiscarded() bool` + +HasDiscarded returns a boolean if a field has been set. + + +[[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 71af06d..065e556 100644 --- a/docs/LiveStream.md +++ b/docs/LiveStream.md @@ -12,8 +12,8 @@ Name | Type | Description | Notes **PlayerId** | Pointer to **string** | The unique identifier for the player. | [optional] **Broadcasting** | Pointer to **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** | [**[]RestreamsResponseObject**](RestreamsResponseObject.md) | Returns the list of restream destinations. | -**CreatedAt** | Pointer to **string** | When the player was created, presented in ISO-8601 format. | [optional] -**UpdatedAt** | Pointer to **string** | When the player was last updated, presented in ISO-8601 format. | [optional] +**CreatedAt** | Pointer to **string** | When the player was created, presented in ATOM UTC format. | [optional] +**UpdatedAt** | Pointer to **string** | When the player was last updated, presented in ATOM UTC format. | [optional] ## Methods diff --git a/docs/LiveStreams.md b/docs/LiveStreams.md index 472f081..20bf6b4 100644 --- a/docs/LiveStreams.md +++ b/docs/LiveStreams.md @@ -298,7 +298,7 @@ func main() { req.StreamKey("dw-dew8-q6w9-k67w-1ws8") // string | The unique stream key that allows you to stream videos. req.Name("My Video") // string | You can filter live streams by their name or a part of their name. - req.SortBy("createdAt") // string | Enables you to sort live stream results. Allowed attributes: `name`, `createdAt`, `updatedAt`. `name` - the name of the live stream. `createdAt` - the time a live stream was created. `updatedAt` - the time a live stream was last updated. When using `createdAt` or `updatedAt`, the API sorts the results based on the ISO-8601 time format. + req.SortBy("createdAt") // string | Enables you to sort live stream results. Allowed attributes: `name`, `createdAt`, `updatedAt`. `name` - the name of the live stream. `createdAt` - the time a live stream was created. `updatedAt` - the time a live stream was last updated. When using `createdAt` or `updatedAt`, the API sorts the results based on the ATOM UTC time format. req.SortOrder("desc") // string | Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones. For title, it is 0-9 and A-Z ascending and Z-A, 9-0 descending. req.CurrentPage(int32(2)) // int32 | Choose the number of search results to return per page. Minimum value: 1 (default to 1) req.PageSize(int32(30)) // int32 | Results per page. Allowed values 1-100, default is 25. (default to 25) @@ -325,7 +325,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **streamKey** | **string** | The unique stream key that allows you to stream videos. | **name** | **string** | You can filter live streams by their name or a part of their name. | -**sortBy** | **string** | Enables you to sort live stream results. Allowed attributes: `name`, `createdAt`, `updatedAt`. `name` - the name of the live stream. `createdAt` - the time a live stream was created. `updatedAt` - the time a live stream was last updated. When using `createdAt` or `updatedAt`, the API sorts the results based on the ISO-8601 time format. | +**sortBy** | **string** | Enables you to sort live stream results. Allowed attributes: `name`, `createdAt`, `updatedAt`. `name` - the name of the live stream. `createdAt` - the time a live stream was created. `updatedAt` - the time a live stream was last updated. When using `createdAt` or `updatedAt`, the API sorts the results based on the ATOM UTC time format. | **sortOrder** | **string** | Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones. For title, it is 0-9 and A-Z ascending and Z-A, 9-0 descending. | **currentPage** | **int32** | Choose the number of search results to return per page. Minimum value: 1 | [default to 1] **pageSize** | **int32** | Results per page. Allowed values 1-100, default is 25. | [default to 25] diff --git a/docs/PlayerSessionEvent.md b/docs/PlayerSessionEvent.md index 3c49181..b5548c4 100644 --- a/docs/PlayerSessionEvent.md +++ b/docs/PlayerSessionEvent.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | Pointer to **string** | Possible values are: ready, play, pause, resume, seek.backward, seek.forward, end | [optional] -**EmittedAt** | Pointer to **string** | When an event occurred, presented in ISO-8601 format. | [optional] +**EmittedAt** | Pointer to **string** | When an event occurred, presented in ATOM UTC format. | [optional] **At** | Pointer to **int32** | | [optional] **From** | Pointer to **int32** | | [optional] **To** | Pointer to **int32** | | [optional] diff --git a/docs/PlayerTheme.md b/docs/PlayerTheme.md index c3b8ac7..9b9b294 100644 --- a/docs/PlayerTheme.md +++ b/docs/PlayerTheme.md @@ -21,8 +21,8 @@ Name | Type | Description | Notes **HideTitle** | Pointer to **bool** | enable/disable title. Default: false | [optional] **ForceLoop** | Pointer to **bool** | enable/disable looping. Default: false | [optional] **PlayerId** | **string** | | -**CreatedAt** | Pointer to **string** | When the player was created, presented in ISO-8601 format. | [optional] -**UpdatedAt** | Pointer to **string** | When the player was last updated, presented in ISO-8601 format. | [optional] +**CreatedAt** | Pointer to **string** | When the player was created, presented in ATOM UTC format. | [optional] +**UpdatedAt** | Pointer to **string** | When the player was last updated, presented in ATOM UTC format. | [optional] **Assets** | Pointer to [**PlayerThemeAssets**](PlayerThemeAssets.md) | | [optional] ## Methods diff --git a/docs/PlayerThemes.md b/docs/PlayerThemes.md index 71bd1d0..ce0e050 100644 --- a/docs/PlayerThemes.md +++ b/docs/PlayerThemes.md @@ -295,7 +295,7 @@ func main() { // client := apivideosdk.SandboxClientBuilder("YOU_SANDBOX_API_KEY").Build() req := apivideosdk.PlayerThemesApiListRequest{} - req.SortBy("createdAt") // string | createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ISO-8601 format. + req.SortBy("createdAt") // string | createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ATOM UTC format. req.SortOrder("asc") // string | Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones. req.CurrentPage(int32(2)) // int32 | Choose the number of search results to return per page. Minimum value: 1 (default to 1) req.PageSize(int32(30)) // int32 | Results per page. Allowed values 1-100, default is 25. (default to 25) @@ -320,7 +320,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sortBy** | **string** | createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ISO-8601 format. | +**sortBy** | **string** | createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ATOM UTC format. | **sortOrder** | **string** | Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones. | **currentPage** | **int32** | Choose the number of search results to return per page. Minimum value: 1 | [default to 1] **pageSize** | **int32** | Results per page. Allowed values 1-100, default is 25. | [default to 25] diff --git a/docs/UploadToken.md b/docs/UploadToken.md index 70df10b..6f65461 100644 --- a/docs/UploadToken.md +++ b/docs/UploadToken.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Token** | Pointer to **string** | The unique identifier for the token you will use to authenticate an upload. | [optional] **Ttl** | Pointer to **int32** | Time-to-live - how long the upload token is valid for. | [optional] -**CreatedAt** | Pointer to **string** | When the token was created, displayed in ISO-8601 format. | [optional] -**ExpiresAt** | Pointer to **NullableString** | When the token expires, displayed in ISO-8601 format. | [optional] +**CreatedAt** | Pointer to **string** | When the token was created, displayed in ATOM UTC format. | [optional] +**ExpiresAt** | Pointer to **NullableString** | When the token expires, displayed in ATOM UTC format. | [optional] ## Methods diff --git a/docs/UploadTokens.md b/docs/UploadTokens.md index 2ad289b..b04ac3b 100644 --- a/docs/UploadTokens.md +++ b/docs/UploadTokens.md @@ -227,7 +227,7 @@ func main() { // client := apivideosdk.SandboxClientBuilder("YOU_SANDBOX_API_KEY").Build() req := apivideosdk.UploadTokensApiListRequest{} - req.SortBy("ttl") // string | Allowed: createdAt, ttl. You can use these to sort by when a token was created, or how much longer the token will be active (ttl - time to live). Date and time is presented in ISO-8601 format. + req.SortBy("ttl") // string | Allowed: createdAt, ttl. You can use these to sort by when a token was created, or how much longer the token will be active (ttl - time to live). Date and time is presented in ATOM UTC format. req.SortOrder("asc") // string | Allowed: asc, desc. Ascending is 0-9 or A-Z. Descending is 9-0 or Z-A. req.CurrentPage(int32(2)) // int32 | Choose the number of search results to return per page. Minimum value: 1 (default to 1) req.PageSize(int32(30)) // int32 | Results per page. Allowed values 1-100, default is 25. (default to 25) @@ -252,7 +252,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sortBy** | **string** | Allowed: createdAt, ttl. You can use these to sort by when a token was created, or how much longer the token will be active (ttl - time to live). Date and time is presented in ISO-8601 format. | +**sortBy** | **string** | Allowed: createdAt, ttl. You can use these to sort by when a token was created, or how much longer the token will be active (ttl - time to live). Date and time is presented in ATOM UTC format. | **sortOrder** | **string** | Allowed: asc, desc. Ascending is 0-9 or A-Z. Descending is 9-0 or Z-A. | **currentPage** | **int32** | Choose the number of search results to return per page. Minimum value: 1 | [default to 1] **pageSize** | **int32** | Results per page. Allowed values 1-100, default is 25. | [default to 25] diff --git a/docs/Video.md b/docs/Video.md index 9f9c936..37c541a 100644 --- a/docs/Video.md +++ b/docs/Video.md @@ -5,13 +5,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **VideoId** | **string** | The unique identifier of the video object. | -**CreatedAt** | Pointer to **string** | When a video was created, presented in ISO-8601 format. | [optional] +**CreatedAt** | Pointer to **string** | When a video was created, presented in ATOM UTC format. | [optional] **Title** | Pointer to **string** | The title of the video content. | [optional] **Description** | Pointer to **string** | A description for the video content. | [optional] -**PublishedAt** | Pointer to **string** | The date and time the API created the video. Date and time are provided using ISO-8601 UTC format. | [optional] -**UpdatedAt** | Pointer to **string** | The date and time the video was updated. Date and time are provided using ISO-8601 UTC format. | [optional] +**PublishedAt** | Pointer to **string** | The date and time the API created the video. Date and time are provided using ATOM UTC format. | [optional] +**UpdatedAt** | Pointer to **string** | The date and time the video was updated. Date and time are provided using ATOM UTC format. | [optional] +**DiscardedAt** | Pointer to **NullableString** | The date and time the video was discarded. The API populates this field only if you have the Video Restore feature enabled and discard a video. Date and time are provided using ATOM UTC format. | [optional] +**DeletesAt** | Pointer to **NullableString** | The date and time the video will be permanently deleted. The API populates this field only if you have the Video Restore feature enabled and discard a video. Discarded videos are pemanently deleted after 90 days. Date and time are provided using ATOM UTC format. | [optional] +**Discarded** | Pointer to **bool** | Returns `true` for videos you discarded when you have the Video Restore feature enabled. Returns `false` for every other video. | [optional] **Tags** | Pointer to **[]string** | One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces. | [optional] -**Metadata** | Pointer to [**[]Metadata**](Metadata.md) | Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata/) allows you to define a key that allows any value pair. | [optional] +**Metadata** | Pointer to [**[]Metadata**](Metadata.md) | Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. | [optional] **Source** | Pointer to [**VideoSource**](VideoSource.md) | | [optional] **Assets** | Pointer to [**VideoAssets**](VideoAssets.md) | | [optional] **PlayerId** | Pointer to **string** | The id of the player that will be applied on the video. | [optional] @@ -183,6 +186,101 @@ SetUpdatedAt sets UpdatedAt field to given value. HasUpdatedAt returns a boolean if a field has been set. +### GetDiscardedAt + +`func (o *Video) GetDiscardedAt() string` + +GetDiscardedAt returns the DiscardedAt field if non-nil, zero value otherwise. + +### GetDiscardedAtOk + +`func (o *Video) GetDiscardedAtOk() (*string, bool)` + +GetDiscardedAtOk returns a tuple with the DiscardedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDiscardedAt + +`func (o *Video) SetDiscardedAt(v string)` + +SetDiscardedAt sets DiscardedAt field to given value. + +### HasDiscardedAt + +`func (o *Video) HasDiscardedAt() bool` + +HasDiscardedAt returns a boolean if a field has been set. + +### SetDiscardedAtNil + +`func (o *Video) SetDiscardedAtNil(b bool)` + + SetDiscardedAtNil sets the value for DiscardedAt to be an explicit nil + +### UnsetDiscardedAt +`func (o *Video) UnsetDiscardedAt()` + +UnsetDiscardedAt ensures that no value is present for DiscardedAt, not even an explicit nil +### GetDeletesAt + +`func (o *Video) GetDeletesAt() string` + +GetDeletesAt returns the DeletesAt field if non-nil, zero value otherwise. + +### GetDeletesAtOk + +`func (o *Video) GetDeletesAtOk() (*string, bool)` + +GetDeletesAtOk returns a tuple with the DeletesAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeletesAt + +`func (o *Video) SetDeletesAt(v string)` + +SetDeletesAt sets DeletesAt field to given value. + +### HasDeletesAt + +`func (o *Video) HasDeletesAt() bool` + +HasDeletesAt returns a boolean if a field has been set. + +### SetDeletesAtNil + +`func (o *Video) SetDeletesAtNil(b bool)` + + SetDeletesAtNil sets the value for DeletesAt to be an explicit nil + +### UnsetDeletesAt +`func (o *Video) UnsetDeletesAt()` + +UnsetDeletesAt ensures that no value is present for DeletesAt, not even an explicit nil +### GetDiscarded + +`func (o *Video) GetDiscarded() bool` + +GetDiscarded returns the Discarded field if non-nil, zero value otherwise. + +### GetDiscardedOk + +`func (o *Video) GetDiscardedOk() (*bool, bool)` + +GetDiscardedOk returns a tuple with the Discarded field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDiscarded + +`func (o *Video) SetDiscarded(v bool)` + +SetDiscarded sets Discarded field to given value. + +### HasDiscarded + +`func (o *Video) HasDiscarded() bool` + +HasDiscarded returns a boolean if a field has been set. + ### GetTags `func (o *Video) GetTags() []string` diff --git a/docs/VideoCreationPayload.md b/docs/VideoCreationPayload.md index c6f5efe..fd8b5ba 100644 --- a/docs/VideoCreationPayload.md +++ b/docs/VideoCreationPayload.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **Mp4Support** | Pointer to **bool** | Enables mp4 version in addition to streamed version. | [optional] [default to true] **PlayerId** | Pointer to **string** | The unique identification number for your video player. | [optional] **Tags** | Pointer to **[]string** | A list of tags you want to use to describe your video. | [optional] -**Metadata** | Pointer to [**[]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. Read more on [dynamic metadata](https://api.video/blog/endpoints/dynamic-metadata/). | [optional] +**Metadata** | Pointer to [**[]Metadata**](Metadata.md) | A list of key value pairs that you use to provide metadata for your video. | [optional] **Clip** | Pointer to [**VideoClip**](VideoClip.md) | | [optional] **Watermark** | Pointer to [**VideoWatermark**](VideoWatermark.md) | | [optional] diff --git a/docs/VideoUpdatePayload.md b/docs/VideoUpdatePayload.md index c162f7e..b3efaad 100644 --- a/docs/VideoUpdatePayload.md +++ b/docs/VideoUpdatePayload.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **Panoramic** | Pointer to **bool** | Whether the video is a 360 degree or immersive video. | [optional] **Mp4Support** | Pointer to **bool** | Whether the player supports the mp4 format. | [optional] **Tags** | Pointer to **[]string** | A list of terms or words you want to tag the video with. Make sure the list includes all the tags you want as whatever you send in this list will overwrite the existing list for the video. | [optional] -**Metadata** | Pointer to [**[]Metadata**](Metadata.md) | A list (array) of dictionaries where each dictionary contains a key value pair that describes the video. As with tags, you must send the complete list of metadata you want as whatever you send here will overwrite the existing metadata for the video. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata/) allows you to define a key that allows any value pair. | [optional] +**Metadata** | Pointer to [**[]Metadata**](Metadata.md) | A list (array) of dictionaries where each dictionary contains a key value pair that describes the video. As with tags, you must send the complete list of metadata you want as whatever you send here will overwrite the existing metadata for the video. | [optional] ## Methods diff --git a/docs/Videos.md b/docs/Videos.md index d6720f7..b60ffa6 100644 --- a/docs/Videos.md +++ b/docs/Videos.md @@ -13,7 +13,10 @@ Method | HTTP request | Description [**List**](Videos.md#List) | **Get** /videos | List all video objects [**UploadThumbnail**](Videos.md#UploadThumbnail) | **Post** /videos/{videoId}/thumbnail | Upload a thumbnail [**PickThumbnail**](Videos.md#PickThumbnail) | **Patch** /videos/{videoId}/thumbnail | Set a thumbnail +[**GetDiscarded**](Videos.md#GetDiscarded) | **Get** /discarded/videos/{videoId} | Retrieve a discarded video object [**GetStatus**](Videos.md#GetStatus) | **Get** /videos/{videoId}/status | Retrieve video status and details +[**ListDiscarded**](Videos.md#ListDiscarded) | **Get** /discarded/videos | List all discarded video objects +[**UpdateDiscarded**](Videos.md#UpdateDiscarded) | **Patch** /discarded/videos/{videoId} | Update a discarded video object @@ -484,7 +487,7 @@ func main() { req.Title("My Video.mp4") // string | The title of a specific video you want to find. The search will match exactly to what term you provide and return any videos that contain the same term as part of their titles. req.Tags([]string{"Inner_example"}) // []string | A tag is a category you create and apply to videos. You can search for videos with particular tags by listing one or more here. Only videos that have all the tags you list will be returned. - req.Metadata(map[string]string{"key": "TODO"}) // map[string]string | Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata/) allows you to define a key that allows any value pair. + req.Metadata(map[string]string{"key": "TODO"}) // map[string]string | Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter. req.Description("New Zealand") // string | Retrieve video objects by `description`. req.LiveStreamId("li400mYKSgQ6xs7taUeSaEKr") // string | Retrieve video objects that were recorded from a live stream by `liveStreamId`. req.SortBy("publishedAt") // string | Use this parameter to sort videos by the their created time, published time, updated time, or by title. @@ -514,7 +517,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **title** | **string** | The title of a specific video you want to find. The search will match exactly to what term you provide and return any videos that contain the same term as part of their titles. | **tags** | **[]string** | A tag is a category you create and apply to videos. You can search for videos with particular tags by listing one or more here. Only videos that have all the tags you list will be returned. | -**metadata** | [**map[string]**](.md) | Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata/) allows you to define a key that allows any value pair. | +**metadata** | [**map[string]**](.md) | Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter. | **description** | **string** | Retrieve video objects by `description`. | **liveStreamId** | **string** | Retrieve video objects that were recorded from a live stream by `liveStreamId`. | **sortBy** | **string** | Use this parameter to sort videos by the their created time, published time, updated time, or by title. | @@ -664,6 +667,69 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## GetDiscarded + +> GetDiscarded(videoId string) (*Video, error) + +> GetDiscardedWithContext(ctx context.Context, videoId string) (*Video, error) + + +Retrieve a discarded video object + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + apivideosdk "github.com/apivideo/api.video-go-client" +) + +func main() { + client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build() + // if you rather like to use the sandbox environment: + // client := apivideosdk.SandboxClientBuilder("YOU_SANDBOX_API_KEY").Build() + + videoId := "videoId_example" // string | The unique identifier for the video you want details about. + + + res, err := client.Videos.GetDiscarded(videoId) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `Videos.GetDiscarded``: %v\n", err) + } + // response from `GetDiscarded`: Video + fmt.Fprintf(os.Stdout, "Response from `Videos.GetDiscarded`: %v\n", res) +} +``` +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**videoId** | **string** | The unique identifier for the video you want details about. | + +### Other Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + +### Return type + +[**Video**](Video.md) + +[[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) + + ## GetStatus > GetStatus(videoId string) (*VideoStatus, error) @@ -726,3 +792,148 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +## ListDiscarded + +> ListDiscarded(r VideosApiListDiscardedRequest) (*VideosListResponse, error) + + +> ListDiscardedWithContext(ctx context.Context, r VideosApiListDiscardedRequest) (*VideosListResponse, error) + + + +List all discarded video objects + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + apivideosdk "github.com/apivideo/api.video-go-client" +) + +func main() { + client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build() + // if you rather like to use the sandbox environment: + // client := apivideosdk.SandboxClientBuilder("YOU_SANDBOX_API_KEY").Build() + req := apivideosdk.VideosApiListDiscardedRequest{} + + req.Title("My Video.mp4") // string | The title of a specific video you want to find. The search will match exactly to what term you provide and return any videos that contain the same term as part of their titles. + req.Tags([]string{"Inner_example"}) // []string | A tag is a category you create and apply to videos. You can search for videos with particular tags by listing one or more here. Only videos that have all the tags you list will be returned. + req.Metadata(map[string]string{"key": "TODO"}) // map[string]string | Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter. + req.Description("New Zealand") // string | Retrieve video objects by `description`. + req.LiveStreamId("li400mYKSgQ6xs7taUeSaEKr") // string | Retrieve video objects that were recorded from a live stream by `liveStreamId`. + req.SortBy("publishedAt") // string | Use this parameter to sort videos by the their created time, published time, updated time, or by title. + req.SortOrder("asc") // string | Use this parameter to sort results. `asc` is ascending and sorts from A to Z. `desc` is descending and sorts from Z to A. + req.CurrentPage(int32(2)) // int32 | Choose the number of search results to return per page. Minimum value: 1 (default to 1) + req.PageSize(int32(30)) // int32 | Results per page. Allowed values 1-100, default is 25. (default to 25) + + res, err := client.Videos.ListDiscarded(req) + + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `Videos.ListDiscarded``: %v\n", err) + } + // response from `ListDiscarded`: VideosListResponse + fmt.Fprintf(os.Stdout, "Response from `Videos.ListDiscarded`: %v\n", res) +} +``` +### Path Parameters + + + +### Other Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**title** | **string** | The title of a specific video you want to find. The search will match exactly to what term you provide and return any videos that contain the same term as part of their titles. | +**tags** | **[]string** | A tag is a category you create and apply to videos. You can search for videos with particular tags by listing one or more here. Only videos that have all the tags you list will be returned. | +**metadata** | [**map[string]**](.md) | Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter. | +**description** | **string** | Retrieve video objects by `description`. | +**liveStreamId** | **string** | Retrieve video objects that were recorded from a live stream by `liveStreamId`. | +**sortBy** | **string** | Use this parameter to sort videos by the their created time, published time, updated time, or by title. | +**sortOrder** | **string** | Use this parameter to sort results. `asc` is ascending and sorts from A to Z. `desc` is descending and sorts from Z to A. | +**currentPage** | **int32** | Choose the number of search results to return per page. Minimum value: 1 | [default to 1] +**pageSize** | **int32** | Results per page. Allowed values 1-100, default is 25. | [default to 25] + +### Return type + +[**VideosListResponse**](VideosListResponse.md) + +[[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) + + +## UpdateDiscarded + +> UpdateDiscarded(videoId string, discardedVideoUpdatePayload DiscardedVideoUpdatePayload) (*Video, error) + +> UpdateDiscardedWithContext(ctx context.Context, videoId string, discardedVideoUpdatePayload DiscardedVideoUpdatePayload) (*Video, error) + + +Update a discarded video object + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + apivideosdk "github.com/apivideo/api.video-go-client" +) + +func main() { + client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build() + // if you rather like to use the sandbox environment: + // client := apivideosdk.SandboxClientBuilder("YOU_SANDBOX_API_KEY").Build() + + videoId := "vi4k0jvEUuaTdRAEjQ4Jfrgz" // string | The video ID for the video you want to restore. + discardedVideoUpdatePayload := *apivideosdk.NewDiscardedVideoUpdatePayload() // DiscardedVideoUpdatePayload | + + + res, err := client.Videos.UpdateDiscarded(videoId, discardedVideoUpdatePayload) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `Videos.UpdateDiscarded``: %v\n", err) + } + // response from `UpdateDiscarded`: Video + fmt.Fprintf(os.Stdout, "Response from `Videos.UpdateDiscarded`: %v\n", res) +} +``` +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**videoId** | **string** | The video ID for the video you want to restore. | + +### Other Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**discardedVideoUpdatePayload** | [**DiscardedVideoUpdatePayload**](DiscardedVideoUpdatePayload.md) | | + +### Return type + +[**Video**](Video.md) + +[[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/Watermark.md b/docs/Watermark.md index 3285ea0..a59b35f 100644 --- a/docs/Watermark.md +++ b/docs/Watermark.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **WatermarkId** | Pointer to **string** | The unique identifier of the watermark. | [optional] -**CreatedAt** | Pointer to **string** | When the watermark was created, presented in ISO-8601 format. | [optional] +**CreatedAt** | Pointer to **string** | When the watermark was created, presented in ATOM UTC format. | [optional] ## Methods diff --git a/docs/Webhook.md b/docs/Webhook.md index b505008..474a627 100644 --- a/docs/Webhook.md +++ b/docs/Webhook.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **WebhookId** | Pointer to **string** | Unique identifier of the webhook | [optional] -**CreatedAt** | Pointer to **string** | When an webhook was created, presented in ISO-8601 format. | [optional] +**CreatedAt** | Pointer to **string** | When an webhook was created, presented in ATOM UTC format. | [optional] **Events** | Pointer to **[]string** | A list of events that will trigger the webhook. | [optional] **Url** | Pointer to **string** | URL of the webhook | [optional] diff --git a/model_discarded_video_update_payload.go b/model_discarded_video_update_payload.go new file mode 100644 index 0000000..c2eaaa5 --- /dev/null +++ b/model_discarded_video_update_payload.go @@ -0,0 +1,97 @@ +/* + * api.video + * + * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. + * + * API version: 1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apivideosdk + +import ( +//"encoding/json" +) + +// DiscardedVideoUpdatePayload struct for DiscardedVideoUpdatePayload +type DiscardedVideoUpdatePayload struct { + // Use this parameter to restore a discarded video when you have the Video Restore feature enabled. This parameter only accepts `false` as a value! + Discarded *bool `json:"discarded,omitempty"` +} + +// NewDiscardedVideoUpdatePayload instantiates a new DiscardedVideoUpdatePayload object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDiscardedVideoUpdatePayload() *DiscardedVideoUpdatePayload { + this := DiscardedVideoUpdatePayload{} + return &this +} + +// NewDiscardedVideoUpdatePayloadWithDefaults instantiates a new DiscardedVideoUpdatePayload object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDiscardedVideoUpdatePayloadWithDefaults() *DiscardedVideoUpdatePayload { + this := DiscardedVideoUpdatePayload{} + return &this +} + +// GetDiscarded returns the Discarded field value if set, zero value otherwise. +func (o *DiscardedVideoUpdatePayload) GetDiscarded() bool { + if o == nil || o.Discarded == nil { + var ret bool + return ret + } + return *o.Discarded +} + +// GetDiscardedOk returns a tuple with the Discarded field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DiscardedVideoUpdatePayload) GetDiscardedOk() (*bool, bool) { + if o == nil || o.Discarded == nil { + return nil, false + } + return o.Discarded, true +} + +// HasDiscarded returns a boolean if a field has been set. +func (o *DiscardedVideoUpdatePayload) HasDiscarded() bool { + if o != nil && o.Discarded != nil { + return true + } + + return false +} + +// SetDiscarded gets a reference to the given bool and assigns it to the Discarded field. +func (o *DiscardedVideoUpdatePayload) SetDiscarded(v bool) { + o.Discarded = &v +} + +type NullableDiscardedVideoUpdatePayload struct { + value *DiscardedVideoUpdatePayload + isSet bool +} + +func (v NullableDiscardedVideoUpdatePayload) Get() *DiscardedVideoUpdatePayload { + return v.value +} + +func (v *NullableDiscardedVideoUpdatePayload) Set(val *DiscardedVideoUpdatePayload) { + v.value = val + v.isSet = true +} + +func (v NullableDiscardedVideoUpdatePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableDiscardedVideoUpdatePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDiscardedVideoUpdatePayload(val *DiscardedVideoUpdatePayload) *NullableDiscardedVideoUpdatePayload { + return &NullableDiscardedVideoUpdatePayload{value: val, isSet: true} +} diff --git a/model_live_stream.go b/model_live_stream.go index 524b310..cace2af 100644 --- a/model_live_stream.go +++ b/model_live_stream.go @@ -31,9 +31,9 @@ type LiveStream struct { Broadcasting *bool `json:"broadcasting,omitempty"` // Returns the list of restream destinations. Restreams []RestreamsResponseObject `json:"restreams"` - // When the player was created, presented in ISO-8601 format. + // When the player was created, presented in ATOM UTC format. CreatedAt *string `json:"createdAt,omitempty"` - // When the player was last updated, presented in ISO-8601 format. + // When the player was last updated, presented in ATOM UTC format. UpdatedAt *string `json:"updatedAt,omitempty"` } diff --git a/model_player_session_event.go b/model_player_session_event.go index a712f07..610c7ad 100644 --- a/model_player_session_event.go +++ b/model_player_session_event.go @@ -18,7 +18,7 @@ import ( type PlayerSessionEvent struct { // Possible values are: ready, play, pause, resume, seek.backward, seek.forward, end Type *string `json:"type,omitempty"` - // When an event occurred, presented in ISO-8601 format. + // When an event occurred, presented in ATOM UTC format. EmittedAt *string `json:"emittedAt,omitempty"` At *int32 `json:"at,omitempty"` From *int32 `json:"from,omitempty"` diff --git a/model_player_theme.go b/model_player_theme.go index d0b0ad6..1155762 100644 --- a/model_player_theme.go +++ b/model_player_theme.go @@ -49,9 +49,9 @@ type PlayerTheme struct { // enable/disable looping. Default: false ForceLoop *bool `json:"forceLoop,omitempty"` PlayerId string `json:"playerId"` - // When the player was created, presented in ISO-8601 format. + // When the player was created, presented in ATOM UTC format. CreatedAt *string `json:"createdAt,omitempty"` - // When the player was last updated, presented in ISO-8601 format. + // When the player was last updated, presented in ATOM UTC format. UpdatedAt *string `json:"updatedAt,omitempty"` Assets *PlayerThemeAssets `json:"assets,omitempty"` } diff --git a/model_upload_token.go b/model_upload_token.go index ab50867..fe3d803 100644 --- a/model_upload_token.go +++ b/model_upload_token.go @@ -20,9 +20,9 @@ type UploadToken struct { Token *string `json:"token,omitempty"` // Time-to-live - how long the upload token is valid for. Ttl *int32 `json:"ttl,omitempty"` - // When the token was created, displayed in ISO-8601 format. + // When the token was created, displayed in ATOM UTC format. CreatedAt *string `json:"createdAt,omitempty"` - // When the token expires, displayed in ISO-8601 format. + // When the token expires, displayed in ATOM UTC format. ExpiresAt *NullableString `json:"expiresAt,omitempty"` } diff --git a/model_video.go b/model_video.go index becf8c1..48d2e37 100644 --- a/model_video.go +++ b/model_video.go @@ -18,19 +18,25 @@ import ( type Video struct { // The unique identifier of the video object. VideoId string `json:"videoId"` - // When a video was created, presented in ISO-8601 format. + // When a video was created, presented in ATOM UTC format. CreatedAt *string `json:"createdAt,omitempty"` // The title of the video content. Title *string `json:"title,omitempty"` // A description for the video content. Description *string `json:"description,omitempty"` - // The date and time the API created the video. Date and time are provided using ISO-8601 UTC format. + // The date and time the API created the video. Date and time are provided using ATOM UTC format. PublishedAt *string `json:"publishedAt,omitempty"` - // The date and time the video was updated. Date and time are provided using ISO-8601 UTC format. + // The date and time the video was updated. Date and time are provided using ATOM UTC format. UpdatedAt *string `json:"updatedAt,omitempty"` + // The date and time the video was discarded. The API populates this field only if you have the Video Restore feature enabled and discard a video. Date and time are provided using ATOM UTC format. + DiscardedAt *NullableString `json:"discardedAt,omitempty"` + // The date and time the video will be permanently deleted. The API populates this field only if you have the Video Restore feature enabled and discard a video. Discarded videos are pemanently deleted after 90 days. Date and time are provided using ATOM UTC format. + DeletesAt *NullableString `json:"deletesAt,omitempty"` + // Returns `true` for videos you discarded when you have the Video Restore feature enabled. Returns `false` for every other video. + Discarded *bool `json:"discarded,omitempty"` // One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces. Tags *[]string `json:"tags,omitempty"` - // Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata/) allows you to define a key that allows any value pair. + // Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. Metadata *[]Metadata `json:"metadata,omitempty"` Source *VideoSource `json:"source,omitempty"` Assets *VideoAssets `json:"assets,omitempty"` @@ -246,6 +252,124 @@ func (o *Video) SetUpdatedAt(v string) { o.UpdatedAt = &v } +// GetDiscardedAt returns the DiscardedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Video) GetDiscardedAt() string { + if o == nil || o.DiscardedAt.Get() == nil { + var ret string + return ret + } + return *o.DiscardedAt.Get() +} + +// GetDiscardedAtOk returns a tuple with the DiscardedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Video) GetDiscardedAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DiscardedAt.Get(), o.DiscardedAt.IsSet() +} + +// HasDiscardedAt returns a boolean if a field has been set. +func (o *Video) HasDiscardedAt() bool { + if o != nil && o.DiscardedAt.IsSet() { + return true + } + + return false +} + +// SetDiscardedAt gets a reference to the given NullableString and assigns it to the DiscardedAt field. +func (o *Video) SetDiscardedAt(v string) { + o.DiscardedAt.Set(&v) +} + +// SetDiscardedAtNil sets the value for DiscardedAt to be an explicit nil +func (o *Video) SetDiscardedAtNil() { + o.DiscardedAt.Set(nil) +} + +// UnsetDiscardedAt ensures that no value is present for DiscardedAt, not even an explicit nil +func (o *Video) UnsetDiscardedAt() { + o.DiscardedAt.Unset() +} + +// GetDeletesAt returns the DeletesAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Video) GetDeletesAt() string { + if o == nil || o.DeletesAt.Get() == nil { + var ret string + return ret + } + return *o.DeletesAt.Get() +} + +// GetDeletesAtOk returns a tuple with the DeletesAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Video) GetDeletesAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DeletesAt.Get(), o.DeletesAt.IsSet() +} + +// HasDeletesAt returns a boolean if a field has been set. +func (o *Video) HasDeletesAt() bool { + if o != nil && o.DeletesAt.IsSet() { + return true + } + + return false +} + +// SetDeletesAt gets a reference to the given NullableString and assigns it to the DeletesAt field. +func (o *Video) SetDeletesAt(v string) { + o.DeletesAt.Set(&v) +} + +// SetDeletesAtNil sets the value for DeletesAt to be an explicit nil +func (o *Video) SetDeletesAtNil() { + o.DeletesAt.Set(nil) +} + +// UnsetDeletesAt ensures that no value is present for DeletesAt, not even an explicit nil +func (o *Video) UnsetDeletesAt() { + o.DeletesAt.Unset() +} + +// GetDiscarded returns the Discarded field value if set, zero value otherwise. +func (o *Video) GetDiscarded() bool { + if o == nil || o.Discarded == nil { + var ret bool + return ret + } + return *o.Discarded +} + +// GetDiscardedOk returns a tuple with the Discarded field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Video) GetDiscardedOk() (*bool, bool) { + if o == nil || o.Discarded == nil { + return nil, false + } + return o.Discarded, true +} + +// HasDiscarded returns a boolean if a field has been set. +func (o *Video) HasDiscarded() bool { + if o != nil && o.Discarded != nil { + return true + } + + return false +} + +// SetDiscarded gets a reference to the given bool and assigns it to the Discarded field. +func (o *Video) SetDiscarded(v bool) { + o.Discarded = &v +} + // GetTags returns the Tags field value if set, zero value otherwise. func (o *Video) GetTags() []string { if o == nil || o.Tags == nil { diff --git a/model_video_creation_payload.go b/model_video_creation_payload.go index 2dcf82c..ce6d281 100644 --- a/model_video_creation_payload.go +++ b/model_video_creation_payload.go @@ -32,7 +32,7 @@ type VideoCreationPayload struct { PlayerId *string `json:"playerId,omitempty"` // A list of tags you want to use to describe your video. Tags *[]string `json:"tags,omitempty"` - // 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. Read more on [dynamic metadata](https://api.video/blog/endpoints/dynamic-metadata/). + // A list of key value pairs that you use to provide metadata for your video. Metadata *[]Metadata `json:"metadata,omitempty"` Clip *VideoClip `json:"clip,omitempty"` Watermark *VideoWatermark `json:"watermark,omitempty"` diff --git a/model_video_update_payload.go b/model_video_update_payload.go index b1e59f2..05b8b21 100644 --- a/model_video_update_payload.go +++ b/model_video_update_payload.go @@ -30,7 +30,7 @@ type VideoUpdatePayload struct { Mp4Support *bool `json:"mp4Support,omitempty"` // A list of terms or words you want to tag the video with. Make sure the list includes all the tags you want as whatever you send in this list will overwrite the existing list for the video. Tags *[]string `json:"tags,omitempty"` - // A list (array) of dictionaries where each dictionary contains a key value pair that describes the video. As with tags, you must send the complete list of metadata you want as whatever you send here will overwrite the existing metadata for the video. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata/) allows you to define a key that allows any value pair. + // A list (array) of dictionaries where each dictionary contains a key value pair that describes the video. As with tags, you must send the complete list of metadata you want as whatever you send here will overwrite the existing metadata for the video. Metadata *[]Metadata `json:"metadata,omitempty"` } diff --git a/model_watermark.go b/model_watermark.go index 1d1a927..2ab5958 100644 --- a/model_watermark.go +++ b/model_watermark.go @@ -18,7 +18,7 @@ import ( type Watermark struct { // The unique identifier of the watermark. WatermarkId *string `json:"watermarkId,omitempty"` - // When the watermark was created, presented in ISO-8601 format. + // When the watermark was created, presented in ATOM UTC format. CreatedAt *string `json:"createdAt,omitempty"` } diff --git a/model_webhook.go b/model_webhook.go index 7f86c4d..c512b6a 100644 --- a/model_webhook.go +++ b/model_webhook.go @@ -18,7 +18,7 @@ import ( type Webhook struct { // Unique identifier of the webhook WebhookId *string `json:"webhookId,omitempty"` - // When an webhook was created, presented in ISO-8601 format. + // When an webhook was created, presented in ATOM UTC format. CreatedAt *string `json:"createdAt,omitempty"` // A list of events that will trigger the webhook. Events *[]string `json:"events,omitempty"`