diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 39d2d96..5dd3179 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -68,6 +68,7 @@ Sources/Models/RestreamsRequestObject.swift Sources/Models/RestreamsResponseObject.swift Sources/Models/TokenCreationPayload.swift Sources/Models/TokenListResponse.swift +Sources/Models/TooManyRequests.swift Sources/Models/UploadToken.swift Sources/Models/Video.swift Sources/Models/VideoAssets.swift @@ -151,6 +152,7 @@ docs/RestreamsRequestObject.md docs/RestreamsResponseObject.md docs/TokenCreationPayload.md docs/TokenListResponse.md +docs/TooManyRequests.md docs/UploadToken.md docs/UploadTokensAPI.md docs/Video.md diff --git a/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 b/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 index ee88061..644fa0c 100644 --- a/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 +++ b/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 @@ -1 +1 @@ -5678c55d78ebee898e89b47215b59cb855d1997cdda9202292548ec786d8e9f5 \ No newline at end of file +d7b342ceb1a4805da9e3d6355384e34c1a99e1300d01cac3ae3218c5738f11f1 \ No newline at end of file diff --git a/README.md b/README.md index f1bf467..882fb7d 100644 --- a/README.md +++ b/README.md @@ -309,6 +309,7 @@ Method | HTTP request | Description - [RestreamsResponseObject](https://github.com/apivideo/api.video-swift-client/blob/main/docs/RestreamsResponseObject.md) - [TokenCreationPayload](https://github.com/apivideo/api.video-swift-client/blob/main/docs/TokenCreationPayload.md) - [TokenListResponse](https://github.com/apivideo/api.video-swift-client/blob/main/docs/TokenListResponse.md) + - [TooManyRequests](https://github.com/apivideo/api.video-swift-client/blob/main/docs/TooManyRequests.md) - [UploadToken](https://github.com/apivideo/api.video-swift-client/blob/main/docs/UploadToken.md) - [Video](https://github.com/apivideo/api.video-swift-client/blob/main/docs/Video.md) - [VideoAssets](https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideoAssets.md) diff --git a/Sources/APIs/AnalyticsAPI.swift b/Sources/APIs/AnalyticsAPI.swift index 96135f2..34d65e4 100644 --- a/Sources/APIs/AnalyticsAPI.swift +++ b/Sources/APIs/AnalyticsAPI.swift @@ -53,6 +53,7 @@ open class AnalyticsAPI { Get play events for live stream - GET /analytics/live-streams/plays - Retrieve filtered analytics about the number of plays for your live streams in a project. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter from: (query) Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. - parameter dimension: (query) Use this query parameter to define the dimension that you want analytics for. - `liveStreamId`: Returns analytics based on the public live stream identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. - parameter to: (query) Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) @@ -129,6 +130,7 @@ open class AnalyticsAPI { Get play events for video - GET /analytics/videos/plays - Retrieve filtered analytics about the number of plays for your videos in a project. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter from: (query) Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. - parameter dimension: (query) Use this query parameter to define the dimension that you want analytics for. - `videoId`: Returns analytics based on the public video identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. - parameter to: (query) Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) diff --git a/Sources/APIs/CaptionsAPI.swift b/Sources/APIs/CaptionsAPI.swift index 6fc6141..80a6534 100644 --- a/Sources/APIs/CaptionsAPI.swift +++ b/Sources/APIs/CaptionsAPI.swift @@ -38,6 +38,7 @@ open class CaptionsAPI { Upload a caption - POST /videos/{videoId}/captions/{language} - Upload a VTT file to add captions to your video. More information can be found [here](https://docs.api.video/vod/add-captions) + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter videoId: (path) The unique identifier for the video you want to add a caption to. - parameter language: (path) A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). - This parameter **only accepts dashes for separators**, for example `fr-CA`. If you use a different separator in your request, the API returns an error. - When the value in your request does not match any covered language, the API returns an error. - You can find the list of supported tags [here](https://docs.api.video/vod/add-captions#supported-caption-language-tags). - parameter file: (form) The video text track (VTT) you want to upload. @@ -99,6 +100,7 @@ open class CaptionsAPI { - Retrieve a caption for a video in a specific language. If the language is available, the caption is returned. Otherwise, you will get a error indicating the caption was not found. Tutorials that use the [captions endpoint](https://api.video/blog/endpoints/captions). + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter videoId: (path) The unique identifier for the video you want captions for. - parameter language: (path) A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). - This parameter **only accepts dashes for separators**, for example `fr-CA`. If you use a different separator in your request, the API returns an error. - When the value in your request does not match any covered language, the API returns an error. - You can find the list of supported tags [here](https://docs.api.video/vod/add-captions#supported-caption-language-tags). - returns: RequestBuilder @@ -154,6 +156,7 @@ Tutorials that use the [captions endpoint](https://api.video/blog/endpoints/capt Update a caption - PATCH /videos/{videoId}/captions/{language} - To have the captions on automatically, use this method to set default: true. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter videoId: (path) The unique identifier for the video you want to have automatic captions for. - parameter language: (path) A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). - This parameter **only accepts dashes for separators**, for example `fr-CA`. If you use a different separator in your request, the API returns an error. - When the value in your request does not match any covered language, the API returns an error. - You can find the list of supported tags [here](https://docs.api.video/vod/add-captions#supported-caption-language-tags). - parameter captionsUpdatePayload: (body) @@ -209,6 +212,7 @@ Tutorials that use the [captions endpoint](https://api.video/blog/endpoints/capt Delete a caption - DELETE /videos/{videoId}/captions/{language} - Delete a caption in a specific language by by video id. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter videoId: (path) The unique identifier for the video you want to delete a caption from. - parameter language: (path) A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). - This parameter **only accepts dashes for separators**, for example `fr-CA`. If you use a different separator in your request, the API returns an error. - When the value in your request does not match any covered language, the API returns an error. - You can find the list of supported tags [here](https://docs.api.video/vod/add-captions#supported-caption-language-tags). - returns: RequestBuilder @@ -264,6 +268,7 @@ Tutorials that use the [captions endpoint](https://api.video/blog/endpoints/capt List video captions - GET /videos/{videoId}/captions - Retrieve a list of available captions by video id. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter videoId: (path) The unique identifier for the video you want to retrieve a list of captions for. - parameter currentPage: (query) Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) - parameter pageSize: (query) Results per page. Allowed values 1-100, default is 25. (optional, default to 25) diff --git a/Sources/APIs/ChaptersAPI.swift b/Sources/APIs/ChaptersAPI.swift index 17b7ed7..f202b4f 100644 --- a/Sources/APIs/ChaptersAPI.swift +++ b/Sources/APIs/ChaptersAPI.swift @@ -38,6 +38,7 @@ open class ChaptersAPI { Upload a chapter - POST /videos/{videoId}/chapters/{language} - Upload a VTT file to add chapters to your video. Chapters help break the video into sections. Read our [tutorial](https://api.video/blog/tutorials/adding-chapters-to-your-videos/) for more details. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter videoId: (path) The unique identifier for the video you want to upload a chapter for. - parameter language: (path) A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. - parameter file: (form) The VTT file describing the chapters you want to upload. @@ -97,6 +98,7 @@ open class ChaptersAPI { Retrieve a chapter - GET /videos/{videoId}/chapters/{language} - Retrieve a chapter for by video id in a specific language. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter videoId: (path) The unique identifier for the video you want to show a chapter for. - parameter language: (path) A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. - returns: RequestBuilder @@ -151,6 +153,7 @@ open class ChaptersAPI { Delete a chapter - DELETE /videos/{videoId}/chapters/{language} - Delete a chapter in a specific language by providing the video ID for the video you want to delete the chapter from and the language the chapter is in. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter videoId: (path) The unique identifier for the video you want to delete a chapter from. - parameter language: (path) A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. - returns: RequestBuilder @@ -206,6 +209,7 @@ open class ChaptersAPI { List video chapters - GET /videos/{videoId}/chapters - Retrieve a list of all chapters for by video id. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter videoId: (path) The unique identifier for the video you want to retrieve a list of chapters for. - parameter currentPage: (query) Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) - parameter pageSize: (query) Results per page. Allowed values 1-100, default is 25. (optional, default to 25) diff --git a/Sources/APIs/LiveStreamsAPI.swift b/Sources/APIs/LiveStreamsAPI.swift index a23a2c1..14c0caf 100644 --- a/Sources/APIs/LiveStreamsAPI.swift +++ b/Sources/APIs/LiveStreamsAPI.swift @@ -36,6 +36,7 @@ open class LiveStreamsAPI { Create live stream - POST /live-streams - Creates a livestream object. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter liveStreamCreationPayload: (body) - returns: RequestBuilder */ @@ -82,6 +83,7 @@ open class LiveStreamsAPI { Retrieve live stream - GET /live-streams/{liveStreamId} - Get a livestream by id. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter liveStreamId: (path) The unique ID for the live stream you want to watch. - returns: RequestBuilder */ @@ -132,6 +134,7 @@ open class LiveStreamsAPI { Update a live stream - PATCH /live-streams/{liveStreamId} - Updates the livestream object. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter liveStreamId: (path) The unique ID for the live stream that you want to update information for such as player details. - parameter liveStreamUpdatePayload: (body) - returns: RequestBuilder @@ -182,6 +185,7 @@ open class LiveStreamsAPI { Delete a live stream - DELETE /live-streams/{liveStreamId} - If you do not need a live stream any longer, you can send a request to delete it. All you need is the liveStreamId. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter liveStreamId: (path) The unique ID for the live stream that you want to remove. - returns: RequestBuilder */ @@ -253,6 +257,7 @@ open class LiveStreamsAPI { List all live streams - GET /live-streams - Get the list of livestreams on the workspace. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter streamKey: (query) The unique stream key that allows you to stream videos. (optional) - parameter name: (query) You can filter live streams by their name or a part of their name. (optional) - parameter sortBy: (query) 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. (optional) @@ -313,6 +318,7 @@ open class LiveStreamsAPI { Upload a thumbnail - POST /live-streams/{liveStreamId}/thumbnail - Upload the thumbnail for the livestream. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter liveStreamId: (path) The unique ID for the live stream you want to upload. - parameter file: (form) The image to be added as a thumbnail. The mime type should be image/jpeg, image/png or image/webp. The max allowed size is 8 MiB. - returns: RequestBuilder @@ -367,6 +373,7 @@ open class LiveStreamsAPI { Delete a thumbnail - DELETE /live-streams/{liveStreamId}/thumbnail - Send the unique identifier for a live stream to delete its thumbnail. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter liveStreamId: (path) The unique identifier of the live stream whose thumbnail you want to delete. - returns: RequestBuilder */ diff --git a/Sources/APIs/PlayerThemesAPI.swift b/Sources/APIs/PlayerThemesAPI.swift index 04652cf..2117c95 100644 --- a/Sources/APIs/PlayerThemesAPI.swift +++ b/Sources/APIs/PlayerThemesAPI.swift @@ -36,6 +36,7 @@ open class PlayerThemesAPI { Create a player - POST /players - Create a player for your video, and customise it. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter playerThemeCreationPayload: (body) - returns: RequestBuilder */ @@ -82,6 +83,7 @@ open class PlayerThemesAPI { Retrieve a player - GET /players/{playerId} - Retreive a player theme by player id. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter playerId: (path) The unique identifier for the player you want to retrieve. - returns: RequestBuilder */ @@ -132,6 +134,7 @@ open class PlayerThemesAPI { Update a player - PATCH /players/{playerId} - Use a player ID to update specific details for a player. NOTE: It may take up to 10 min before the new player configuration is available from our CDN. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter playerId: (path) The unique identifier for the player. - parameter playerThemeUpdatePayload: (body) - returns: RequestBuilder @@ -182,6 +185,7 @@ open class PlayerThemesAPI { Delete a player - DELETE /players/{playerId} - Delete a player if you no longer need it. You can delete any player that you have the player ID for. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter playerId: (path) The unique identifier for the player you want to delete. - returns: RequestBuilder */ @@ -251,6 +255,7 @@ open class PlayerThemesAPI { List all player themes - GET /players - Retrieve a list of all the player themes you created, as well as details about each one. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter sortBy: (query) 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) - parameter sortOrder: (query) Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones. (optional) - parameter currentPage: (query) Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) @@ -308,6 +313,7 @@ open class PlayerThemesAPI { Upload a logo - POST /players/{playerId}/logo - Upload an image file as a logo for your player. The image should fit within these constraints: - The image mime type must be `image/jpeg` or `image/png`. api.video recommends using `png` images with transparent background. - The image size should be a maximum of 200px width x 100px. - The file size should be a maximum of 100 KiB. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter playerId: (path) The unique identifier for the player. - parameter file: (form) The name of the file you want to use for your logo. - parameter link: (form) A public link that you want to advertise in your player. For example, you could add a link to your company. When a viewer clicks on your logo, they will be taken to this address. (optional) @@ -364,6 +370,7 @@ open class PlayerThemesAPI { Delete logo - DELETE /players/{playerId}/logo - Delete the logo associated to a player. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter playerId: (path) The unique identifier for the player. - returns: RequestBuilder */ diff --git a/Sources/APIs/UploadTokensAPI.swift b/Sources/APIs/UploadTokensAPI.swift index 6b49242..d8e6e42 100644 --- a/Sources/APIs/UploadTokensAPI.swift +++ b/Sources/APIs/UploadTokensAPI.swift @@ -36,6 +36,7 @@ open class UploadTokensAPI { Generate an upload token - POST /upload-tokens - Generates an upload token that can be used to replace the API Key. More information can be found [here](https://docs.api.video/vod/delegated-upload-tokens) + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter tokenCreationPayload: (body) - returns: RequestBuilder */ @@ -82,6 +83,7 @@ open class UploadTokensAPI { Retrieve upload token - GET /upload-tokens/{uploadToken} - Retrieve details about a specific upload token by id. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter uploadToken: (path) The unique identifier for the token you want information about. - returns: RequestBuilder */ @@ -131,6 +133,7 @@ open class UploadTokensAPI { Delete an upload token - DELETE /upload-tokens/{uploadToken} - Delete an existing upload token. This is especially useful for tokens you may have created that do not expire. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter uploadToken: (path) The unique identifier for the upload token you want to delete. Deleting a token will make it so the token can no longer be used for authentication. - returns: RequestBuilder */ @@ -199,6 +202,7 @@ open class UploadTokensAPI { List all active upload tokens - GET /upload-tokens - Retrieve a list of all currently active delegated tokens. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter sortBy: (query) 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. (optional) - parameter sortOrder: (query) Allowed: asc, desc. Ascending is 0-9 or A-Z. Descending is 9-0 or Z-A. (optional) - parameter currentPage: (query) Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) diff --git a/Sources/APIs/VideosAPI.swift b/Sources/APIs/VideosAPI.swift index 5bcd506..150e65d 100644 --- a/Sources/APIs/VideosAPI.swift +++ b/Sources/APIs/VideosAPI.swift @@ -36,6 +36,7 @@ open class VideosAPI { Create a video object - POST /videos - Creates a video object. More information on video objects can be found [here](https://docs.api.video/reference/api/Videos). + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter videoCreationPayload: (body) video to create - returns: RequestBuilder