From 7d1a040d70e3c687dbcca146056e0fded33f9ba8 Mon Sep 17 00:00:00 2001 From: szekelyzol Date: Fri, 18 Oct 2024 15:25:32 +0200 Subject: [PATCH 1/8] Add summary feature --- oas_apivideo.yaml | 454 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 454 insertions(+) diff --git a/oas_apivideo.yaml b/oas_apivideo.yaml index 29de866c..82d79b1f 100644 --- a/oas_apivideo.yaml +++ b/oas_apivideo.yaml @@ -1044,6 +1044,306 @@ paths: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. status: 429 + /summaries: + post: + tags: + - Summaries + summary: Generate video summary + description: Generate a title, abstract, and key takeaways for a video. + x-client-description: + default: 'Generate a title, abstract, and key takeaways for a video.' + operationId: POST_summaries + requestBody: + required: true + content: + applictaion/json: + schema: + type: object + properties: + videoId: + type: string + description: Create a summary of a video using the video ID. + example: vi4k0jvEUuaTdRAEjQ4Jfrgz + origin: + type: string + enum: [auto] + description: |- + Use this parameter to define how the API generates the summary. The only allowed value is `auto`, which means that the API generates a summary automatically. + + If you do not set this parameter, **the API will not generate a summary automatically**. + + In this case, `sourceStatus` will return `missing`, and you have to manually add a summary using the `PATCH /summaries/{summaryId}/source` endpoint operation. + example: auto + responses: + '201': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/summary-object' + examples: + Summary created: + value: + summaryId: 'summary_1CGHWuXjhxmeH4WiZ51234' + createdAt: '2024-07-14T23:36:07+00:00' + updatedAt: '2024-07-14T23:36:07+00:00' + videoId: 'vilkR8K3N7yrRcxcMt91234' + origin: auto + sourceStatus: completed + '409': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/conflict-error' + examples: + Summary already exists: + value: + type: https://docs.api.video/reference/summary-already-exists + title: A summary already exists or is being created on this video. + status: 409 + detail: You can delete the existing summary and generate a new one. + name: videoId + get: + tags: + - Summaries + summary: List summaries + description: List all summarries for your videos in a project. + x-client-description: + default: 'List all summarries for your videos in a project.' + operationId: GET_summaries + responses: + '200': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/get-summaries' + examples: + List all summaries: + value: + data: + - summaryId: 'summary_1CGHWuXjhxmeH4WiZ51234' + createdAt: '2024-07-14T23:36:07+00:00' + updatedAt: '2024-07-14T23:36:07+00:00' + videoId: 'vilkR8K3N7yrRcxcMt91234' + origin: auto + sourceStatus: completed + - summaryId: 'summary_123HWuXjhxmeH4WiZ55678' + createdAt: '2024-07-15T23:36:07+00:00' + updatedAt: '2024-07-15T23:36:07+00:00' + videoId: 'vibaBXK3N7yrRcxcMt95678' + origin: auto + sourceStatus: waiting + /summaries/{summaryId}: + delete: + tags: + - Summaries + summary: Delete video summary + description: Delete a summary tied to a video. + x-client-description: + default: 'Delete a summary tied to a video.' + operationId: DELETE_summaries-summaryId + parameters: + - name: summaryId + in: path + description: The unique identifier of the summary you want to delete. + required: true + style: simple + explode: false + schema: + type: string + example: 'summary_1CGHWuXjhxmeH4WiZ51234' + responses: + '204': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: No Content + /summaries/{summaryId}/source: + get: + tags: + - Summaries + summary: Get summary details + description: Get all details for a summary + x-client-description: + default: 'Get all details for a summary.' + operationId: GET_summaries-summaryId-source + parameters: + - name: summaryId + in: path + description: The unique identifier of the summary source you want to retrieve. + required: true + style: simple + explode: false + schema: + type: string + example: 'summary_1CGHWuXjhxmeH4WiZ51234' + responses: + '200': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/summary-source' + '404': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/not-found' + examples: + response: + value: + type: 'https://docs.api.video/reference/resource-not-found' + title: The requested resource was not found. + name: summaryId + status: 404 + patch: + tags: + - Summaries + summary: Update summary details + description: Update details for a summary. Note that this operation is only allowed for summary objects where `sourceStatus` is `missing`. + x-client-description: + default: 'Update details for a summary. Note that this operation is only allowed for summary objects where `sourceStatus` is `missing`.' + operationId: PATCH_summaries-summaryId-source + parameters: + - name: summaryId + in: path + description: The unique identifier of the summary source you want to update. + required: true + style: simple + explode: false + schema: + type: string + example: 'summary_1CGHWuXjhxmeH4WiZ51234' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/update-summary-request' + responses: + '201': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/summary-source' + '409': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/conflict-error' + examples: + Summary already exists: + value: + type: https://docs.api.video/reference/summary-already-exists + title: A summary already exists or is being created on this video. + status: 409 + detail: You can delete the existing summary and generate a new one. '/videos/{videoId}/source': post: tags: @@ -3366,6 +3666,33 @@ paths: title: The requested resource was not found. name: videoId status: 404 + '409': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/conflict-error' + examples: + Summary already exists: + value: + type: https://docs.api.video/reference/summary-already-exists + title: A summary already exists or is being created on this video. + status: 409 + detail: You can delete the existing summary and generate a new one. + name: transcriptSummary '429': headers: X-RateLimit-Limit: @@ -14646,12 +14973,16 @@ components: type: object properties: type: + description: A link to the error documentation. type: string title: + description: A description of the error that occurred. type: string name: + description: The name of the parameter that caused the error. type: string status: + description: The HTTP status code. type: integer too-many-requests: title: TooManyRequests @@ -15465,8 +15796,122 @@ components: - The default value is `false`. - If you define a video language using the `language` parameter, the API uses that language to transcribe the video. If you do not define a language, the API detects it based on the video. - When the API generates a transcript, it will be available as a caption for the video. + transcriptSummary: + type: boolean + description: |- + Use this parameter to enable summarization. We recommend using this parameter together with `transcript: true`. + + - When `true`, the API generates a summary for the video, based on the transcription. + - The default value is `false`. + - If you define a video language using the `language` parameter, the API uses that language to summarize the video. If you do not define a language, the API detects it based on the video. required: - title + update-summary-request: + type: object + properties: + title: + type: string + description: A video title, based on the contents of the video. + example: 'A short lecture on quantum theory' + abstract: + type: string + description: A short outline of the contents of the video. + example: 'In this lecture, we discuss how complicated quantum theory is, using the famous example of Schrödingers cat. We also discuss practical applications like quantum computing.' + takeaways: + type: array + description: A list of 3 key points from the video, in chronological order. + maxItems: 3 + items: + type: string + example: + - Quantum theory is complicated. + - Schrödinger's cat is neither dead, nor alive. + - Quantum computers are super cool. + conflict-error: + type: object + properties: + type: + description: A link to the error documentation. + type: string + title: + description: A description of the error that occurred. + type: string + name: + description: The name of the parameter that caused the error. + type: string + status: + description: The HTTP status code. + type: integer + detail: + description: A solution for the error. + type: string + summary-source: + type: object + properties: + title: + type: string + description: A video title, based on the contents of the video. + example: 'A short lecture on quantum theory' + abstract: + type: string + description: A short outline of the contents of the video. The length of an `abstract` depends on the amount of content in a video that can be transcribed. The API condenses the contents into minimum 20, maximum 300 words. + example: 'In this lecture, we discuss how complicated quantum theory is, using the famous example of Schrödingers cat. We also discuss practical applications like quantum computing.' + takeaways: + type: array + description: A list of 3 key points from the video, in chronological order. + maxItems: 3 + items: + type: string + example: + - Quantum theory is complicated. + - Schrödinger's cat is neither dead, nor alive. + - Quantum computers are super cool. + get-summaries: + type: object + properties: + data: + description: An array of summary objects. + type: array + items: + $ref: '#/components/schemas/summary-object' + summary-object: + type: object + properties: + summaryId: + type: string + description: The unique identifier of the summary object. + example: 'summary_1CGHWuXjhxmeH4WiZ51234' + createdAt: + description: Returns the date and time when the summary was created in ATOM date-time format. + type: string + format: date-time + example: '2024-05-28T11:15:07+00:00' + updatedAt: + description: Returns the date and time when the summary was last updated in ATOM date-time format. + type: string + format: date-time + example: '2024-05-28T11:15:07+00:00' + videoId: + type: string + description: The unique identifier of the video object. + example: 'vi4k0jvEUuaTdRAEjQ4Prklg' + origin: + description: |- + Returns the origin of how the summary was created. + + - `api` means that no summary was generated automatically. You can add summary manually using the `PATCH /summaries/{summaryId}/source` endpoint operation. Until this happens, `sourceStatus` returns `missing`. + - `auto` means that the API generated the summary automatically. + sourceStatus: + type: string + description: |- + Returns the current status of summary generation. + + `missing`: the input for a summary is not present. + `waiting` : the input video is being processed and a summary will be generated. + `failed`: a technical issue prevented summary generation. + `completed`: the summary is generated. + `unprocessable`: the API rules the source video to be unsuitable for summary generation. An example for this is an input video that has no audio. + enum: [missing, waiting, failed, completed, unprocessable] video-upload-payload: required: - file @@ -15564,6 +16009,14 @@ components: - The default value is `false`. - If you define a video language using the `language` parameter, the API uses that language to transcribe the video. If you do not define a language, the API detects it based on the video. - When the API generates a transcript, it will be available as a caption for the video. + transcriptSummary: + type: boolean + description: |- + Use this parameter to enable summarization. + + - When `true`, the API generates a summary for the video, based on the transcription. + - The default value is `false`. + - If you define a video language using the `language` parameter, the API uses that language to summarize the video. If you do not define a language, the API detects it based on the video. example: playerId: pl45KFKdlddgk654dspkze title: String theory @@ -15571,6 +16024,7 @@ components: public: false language: 'en' transcript: true + transcriptSummary: true panoramic: false mp4Support: true tags: From e1b91f7c1eba3bb893efe4ce71c74c94bbcf6a26 Mon Sep 17 00:00:00 2001 From: szekelyzol Date: Fri, 18 Oct 2024 16:49:53 +0200 Subject: [PATCH 2/8] Add missing attributes --- oas_apivideo.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/oas_apivideo.yaml b/oas_apivideo.yaml index 82d79b1f..57021143 100644 --- a/oas_apivideo.yaml +++ b/oas_apivideo.yaml @@ -1050,9 +1050,12 @@ paths: - Summaries summary: Generate video summary description: Generate a title, abstract, and key takeaways for a video. + x-client-action: create x-client-description: default: 'Generate a title, abstract, and key takeaways for a video.' operationId: POST_summaries + security: + - apiKey: [] requestBody: required: true content: @@ -1135,6 +1138,7 @@ paths: - Summaries summary: List summaries description: List all summarries for your videos in a project. + x-client-action: list x-client-description: default: 'List all summarries for your videos in a project.' operationId: GET_summaries @@ -1180,9 +1184,12 @@ paths: - Summaries summary: Delete video summary description: Delete a summary tied to a video. + x-client-action: delete x-client-description: default: 'Delete a summary tied to a video.' operationId: DELETE_summaries-summaryId + security: + - apiKey: [] parameters: - name: summaryId in: path @@ -1215,9 +1222,12 @@ paths: - Summaries summary: Get summary details description: Get all details for a summary + x-client-action: get x-client-description: default: 'Get all details for a summary.' operationId: GET_summaries-summaryId-source + security: + - apiKey: [] parameters: - name: summaryId in: path @@ -1279,6 +1289,7 @@ paths: - Summaries summary: Update summary details description: Update details for a summary. Note that this operation is only allowed for summary objects where `sourceStatus` is `missing`. + x-client-action: update x-client-description: default: 'Update details for a summary. Note that this operation is only allowed for summary objects where `sourceStatus` is `missing`.' operationId: PATCH_summaries-summaryId-source From df9f48cac8095b576ea8fc245e577920bb782c8e Mon Sep 17 00:00:00 2001 From: szekelyzol Date: Fri, 18 Oct 2024 15:25:32 +0200 Subject: [PATCH 3/8] Add summary feature --- oas_apivideo.yaml | 454 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 454 insertions(+) diff --git a/oas_apivideo.yaml b/oas_apivideo.yaml index 29de866c..82d79b1f 100644 --- a/oas_apivideo.yaml +++ b/oas_apivideo.yaml @@ -1044,6 +1044,306 @@ paths: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. status: 429 + /summaries: + post: + tags: + - Summaries + summary: Generate video summary + description: Generate a title, abstract, and key takeaways for a video. + x-client-description: + default: 'Generate a title, abstract, and key takeaways for a video.' + operationId: POST_summaries + requestBody: + required: true + content: + applictaion/json: + schema: + type: object + properties: + videoId: + type: string + description: Create a summary of a video using the video ID. + example: vi4k0jvEUuaTdRAEjQ4Jfrgz + origin: + type: string + enum: [auto] + description: |- + Use this parameter to define how the API generates the summary. The only allowed value is `auto`, which means that the API generates a summary automatically. + + If you do not set this parameter, **the API will not generate a summary automatically**. + + In this case, `sourceStatus` will return `missing`, and you have to manually add a summary using the `PATCH /summaries/{summaryId}/source` endpoint operation. + example: auto + responses: + '201': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/summary-object' + examples: + Summary created: + value: + summaryId: 'summary_1CGHWuXjhxmeH4WiZ51234' + createdAt: '2024-07-14T23:36:07+00:00' + updatedAt: '2024-07-14T23:36:07+00:00' + videoId: 'vilkR8K3N7yrRcxcMt91234' + origin: auto + sourceStatus: completed + '409': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/conflict-error' + examples: + Summary already exists: + value: + type: https://docs.api.video/reference/summary-already-exists + title: A summary already exists or is being created on this video. + status: 409 + detail: You can delete the existing summary and generate a new one. + name: videoId + get: + tags: + - Summaries + summary: List summaries + description: List all summarries for your videos in a project. + x-client-description: + default: 'List all summarries for your videos in a project.' + operationId: GET_summaries + responses: + '200': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/get-summaries' + examples: + List all summaries: + value: + data: + - summaryId: 'summary_1CGHWuXjhxmeH4WiZ51234' + createdAt: '2024-07-14T23:36:07+00:00' + updatedAt: '2024-07-14T23:36:07+00:00' + videoId: 'vilkR8K3N7yrRcxcMt91234' + origin: auto + sourceStatus: completed + - summaryId: 'summary_123HWuXjhxmeH4WiZ55678' + createdAt: '2024-07-15T23:36:07+00:00' + updatedAt: '2024-07-15T23:36:07+00:00' + videoId: 'vibaBXK3N7yrRcxcMt95678' + origin: auto + sourceStatus: waiting + /summaries/{summaryId}: + delete: + tags: + - Summaries + summary: Delete video summary + description: Delete a summary tied to a video. + x-client-description: + default: 'Delete a summary tied to a video.' + operationId: DELETE_summaries-summaryId + parameters: + - name: summaryId + in: path + description: The unique identifier of the summary you want to delete. + required: true + style: simple + explode: false + schema: + type: string + example: 'summary_1CGHWuXjhxmeH4WiZ51234' + responses: + '204': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: No Content + /summaries/{summaryId}/source: + get: + tags: + - Summaries + summary: Get summary details + description: Get all details for a summary + x-client-description: + default: 'Get all details for a summary.' + operationId: GET_summaries-summaryId-source + parameters: + - name: summaryId + in: path + description: The unique identifier of the summary source you want to retrieve. + required: true + style: simple + explode: false + schema: + type: string + example: 'summary_1CGHWuXjhxmeH4WiZ51234' + responses: + '200': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/summary-source' + '404': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/not-found' + examples: + response: + value: + type: 'https://docs.api.video/reference/resource-not-found' + title: The requested resource was not found. + name: summaryId + status: 404 + patch: + tags: + - Summaries + summary: Update summary details + description: Update details for a summary. Note that this operation is only allowed for summary objects where `sourceStatus` is `missing`. + x-client-description: + default: 'Update details for a summary. Note that this operation is only allowed for summary objects where `sourceStatus` is `missing`.' + operationId: PATCH_summaries-summaryId-source + parameters: + - name: summaryId + in: path + description: The unique identifier of the summary source you want to update. + required: true + style: simple + explode: false + schema: + type: string + example: 'summary_1CGHWuXjhxmeH4WiZ51234' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/update-summary-request' + responses: + '201': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/summary-source' + '409': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/conflict-error' + examples: + Summary already exists: + value: + type: https://docs.api.video/reference/summary-already-exists + title: A summary already exists or is being created on this video. + status: 409 + detail: You can delete the existing summary and generate a new one. '/videos/{videoId}/source': post: tags: @@ -3366,6 +3666,33 @@ paths: title: The requested resource was not found. name: videoId status: 404 + '409': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/conflict-error' + examples: + Summary already exists: + value: + type: https://docs.api.video/reference/summary-already-exists + title: A summary already exists or is being created on this video. + status: 409 + detail: You can delete the existing summary and generate a new one. + name: transcriptSummary '429': headers: X-RateLimit-Limit: @@ -14646,12 +14973,16 @@ components: type: object properties: type: + description: A link to the error documentation. type: string title: + description: A description of the error that occurred. type: string name: + description: The name of the parameter that caused the error. type: string status: + description: The HTTP status code. type: integer too-many-requests: title: TooManyRequests @@ -15465,8 +15796,122 @@ components: - The default value is `false`. - If you define a video language using the `language` parameter, the API uses that language to transcribe the video. If you do not define a language, the API detects it based on the video. - When the API generates a transcript, it will be available as a caption for the video. + transcriptSummary: + type: boolean + description: |- + Use this parameter to enable summarization. We recommend using this parameter together with `transcript: true`. + + - When `true`, the API generates a summary for the video, based on the transcription. + - The default value is `false`. + - If you define a video language using the `language` parameter, the API uses that language to summarize the video. If you do not define a language, the API detects it based on the video. required: - title + update-summary-request: + type: object + properties: + title: + type: string + description: A video title, based on the contents of the video. + example: 'A short lecture on quantum theory' + abstract: + type: string + description: A short outline of the contents of the video. + example: 'In this lecture, we discuss how complicated quantum theory is, using the famous example of Schrödingers cat. We also discuss practical applications like quantum computing.' + takeaways: + type: array + description: A list of 3 key points from the video, in chronological order. + maxItems: 3 + items: + type: string + example: + - Quantum theory is complicated. + - Schrödinger's cat is neither dead, nor alive. + - Quantum computers are super cool. + conflict-error: + type: object + properties: + type: + description: A link to the error documentation. + type: string + title: + description: A description of the error that occurred. + type: string + name: + description: The name of the parameter that caused the error. + type: string + status: + description: The HTTP status code. + type: integer + detail: + description: A solution for the error. + type: string + summary-source: + type: object + properties: + title: + type: string + description: A video title, based on the contents of the video. + example: 'A short lecture on quantum theory' + abstract: + type: string + description: A short outline of the contents of the video. The length of an `abstract` depends on the amount of content in a video that can be transcribed. The API condenses the contents into minimum 20, maximum 300 words. + example: 'In this lecture, we discuss how complicated quantum theory is, using the famous example of Schrödingers cat. We also discuss practical applications like quantum computing.' + takeaways: + type: array + description: A list of 3 key points from the video, in chronological order. + maxItems: 3 + items: + type: string + example: + - Quantum theory is complicated. + - Schrödinger's cat is neither dead, nor alive. + - Quantum computers are super cool. + get-summaries: + type: object + properties: + data: + description: An array of summary objects. + type: array + items: + $ref: '#/components/schemas/summary-object' + summary-object: + type: object + properties: + summaryId: + type: string + description: The unique identifier of the summary object. + example: 'summary_1CGHWuXjhxmeH4WiZ51234' + createdAt: + description: Returns the date and time when the summary was created in ATOM date-time format. + type: string + format: date-time + example: '2024-05-28T11:15:07+00:00' + updatedAt: + description: Returns the date and time when the summary was last updated in ATOM date-time format. + type: string + format: date-time + example: '2024-05-28T11:15:07+00:00' + videoId: + type: string + description: The unique identifier of the video object. + example: 'vi4k0jvEUuaTdRAEjQ4Prklg' + origin: + description: |- + Returns the origin of how the summary was created. + + - `api` means that no summary was generated automatically. You can add summary manually using the `PATCH /summaries/{summaryId}/source` endpoint operation. Until this happens, `sourceStatus` returns `missing`. + - `auto` means that the API generated the summary automatically. + sourceStatus: + type: string + description: |- + Returns the current status of summary generation. + + `missing`: the input for a summary is not present. + `waiting` : the input video is being processed and a summary will be generated. + `failed`: a technical issue prevented summary generation. + `completed`: the summary is generated. + `unprocessable`: the API rules the source video to be unsuitable for summary generation. An example for this is an input video that has no audio. + enum: [missing, waiting, failed, completed, unprocessable] video-upload-payload: required: - file @@ -15564,6 +16009,14 @@ components: - The default value is `false`. - If you define a video language using the `language` parameter, the API uses that language to transcribe the video. If you do not define a language, the API detects it based on the video. - When the API generates a transcript, it will be available as a caption for the video. + transcriptSummary: + type: boolean + description: |- + Use this parameter to enable summarization. + + - When `true`, the API generates a summary for the video, based on the transcription. + - The default value is `false`. + - If you define a video language using the `language` parameter, the API uses that language to summarize the video. If you do not define a language, the API detects it based on the video. example: playerId: pl45KFKdlddgk654dspkze title: String theory @@ -15571,6 +16024,7 @@ components: public: false language: 'en' transcript: true + transcriptSummary: true panoramic: false mp4Support: true tags: From 127921f693e89128723bac5c17b0065b4fc7006f Mon Sep 17 00:00:00 2001 From: szekelyzol Date: Fri, 18 Oct 2024 16:49:53 +0200 Subject: [PATCH 4/8] Add missing attributes --- oas_apivideo.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/oas_apivideo.yaml b/oas_apivideo.yaml index 82d79b1f..57021143 100644 --- a/oas_apivideo.yaml +++ b/oas_apivideo.yaml @@ -1050,9 +1050,12 @@ paths: - Summaries summary: Generate video summary description: Generate a title, abstract, and key takeaways for a video. + x-client-action: create x-client-description: default: 'Generate a title, abstract, and key takeaways for a video.' operationId: POST_summaries + security: + - apiKey: [] requestBody: required: true content: @@ -1135,6 +1138,7 @@ paths: - Summaries summary: List summaries description: List all summarries for your videos in a project. + x-client-action: list x-client-description: default: 'List all summarries for your videos in a project.' operationId: GET_summaries @@ -1180,9 +1184,12 @@ paths: - Summaries summary: Delete video summary description: Delete a summary tied to a video. + x-client-action: delete x-client-description: default: 'Delete a summary tied to a video.' operationId: DELETE_summaries-summaryId + security: + - apiKey: [] parameters: - name: summaryId in: path @@ -1215,9 +1222,12 @@ paths: - Summaries summary: Get summary details description: Get all details for a summary + x-client-action: get x-client-description: default: 'Get all details for a summary.' operationId: GET_summaries-summaryId-source + security: + - apiKey: [] parameters: - name: summaryId in: path @@ -1279,6 +1289,7 @@ paths: - Summaries summary: Update summary details description: Update details for a summary. Note that this operation is only allowed for summary objects where `sourceStatus` is `missing`. + x-client-action: update x-client-description: default: 'Update details for a summary. Note that this operation is only allowed for summary objects where `sourceStatus` is `missing`.' operationId: PATCH_summaries-summaryId-source From d0fc5a2bef9b6f43035fe419d96844e690d2b0ba Mon Sep 17 00:00:00 2001 From: Olivier Lando Date: Mon, 21 Oct 2024 09:08:56 +0200 Subject: [PATCH 5/8] Clients related fixes --- oas_apivideo.yaml | 104 ++++++++--- .../client/api/clients/SummariesApiTest.java | 162 ++++++++++++++++++ .../client/api/clients/SummariesApiTest.java | 162 ++++++++++++++++++ 3 files changed, 401 insertions(+), 27 deletions(-) create mode 100644 templates/java/statics/android/src/test/java/video/api/client/api/clients/SummariesApiTest.java create mode 100644 templates/java/statics/java/src/test/java/video/api/client/api/clients/SummariesApiTest.java diff --git a/oas_apivideo.yaml b/oas_apivideo.yaml index 57021143..666c0e3d 100644 --- a/oas_apivideo.yaml +++ b/oas_apivideo.yaml @@ -1059,24 +1059,9 @@ paths: requestBody: required: true content: - applictaion/json: + application/json: schema: - type: object - properties: - videoId: - type: string - description: Create a summary of a video using the video ID. - example: vi4k0jvEUuaTdRAEjQ4Jfrgz - origin: - type: string - enum: [auto] - description: |- - Use this parameter to define how the API generates the summary. The only allowed value is `auto`, which means that the API generates a summary automatically. - - If you do not set this parameter, **the API will not generate a summary automatically**. - - In this case, `sourceStatus` will return `missing`, and you have to manually add a summary using the `PATCH /summaries/{summaryId}/source` endpoint operation. - example: auto + $ref: '#/components/schemas/summary-creation-payload' responses: '201': headers: @@ -1096,7 +1081,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/summary-object' + $ref: '#/components/schemas/summary' examples: Summary created: value: @@ -1142,6 +1127,29 @@ paths: x-client-description: default: 'List all summarries for your videos in a project.' operationId: GET_summaries + parameters: + - name: sortBy + in: query + description: 'Allowed: createdAt. You can search by the time watermark were created at.' + required: false + style: form + explode: true + schema: + type: string + example: createdAt + - name: sortOrder + in: query + description: 'Allowed: asc, desc. asc is ascending and sorts from A to Z. desc is descending and sorts from Z to A.' + required: false + style: form + explode: true + schema: + type: string + example: asc + - $ref: '#/components/parameters/current-page' + - $ref: '#/components/parameters/page-size' + x-group-parameters: true + x-client-paginated: true responses: '200': headers: @@ -1161,7 +1169,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/get-summaries' + $ref: '#/components/schemas/summaries-list-response' examples: List all summaries: value: @@ -1177,7 +1185,20 @@ paths: updatedAt: '2024-07-15T23:36:07+00:00' videoId: 'vibaBXK3N7yrRcxcMt95678' origin: auto - sourceStatus: waiting + sourceStatus: waiting + pagination: + currentPage: 1 + pageSize: 25 + pagesTotal: 1 + itemsTotal: 11 + currentPageItems: 11 + links: + - rel: self + uri: 'https://ws.api.video/summaries?currentPage=1' + - rel: first + uri: 'https://ws.api.video/summaries?currentPage=1' + - rel: last + uri: 'https://ws.api.video/summaries?currentPage=1' /summaries/{summaryId}: delete: tags: @@ -1222,7 +1243,7 @@ paths: - Summaries summary: Get summary details description: Get all details for a summary - x-client-action: get + x-client-action: getSummarySource x-client-description: default: 'Get all details for a summary.' operationId: GET_summaries-summaryId-source @@ -1308,7 +1329,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/update-summary-request' + $ref: '#/components/schemas/summary-update-payload' responses: '201': headers: @@ -15817,7 +15838,26 @@ components: - If you define a video language using the `language` parameter, the API uses that language to summarize the video. If you do not define a language, the API detects it based on the video. required: - title - update-summary-request: + summary-creation-payload: + required: + - videoId + type: object + properties: + videoId: + type: string + description: Create a summary of a video using the video ID. + example: vi4k0jvEUuaTdRAEjQ4Jfrgz + origin: + type: string + enum: [auto] + description: |- + Use this parameter to define how the API generates the summary. The only allowed value is `auto`, which means that the API generates a summary automatically. + + If you do not set this parameter, **the API will not generate a summary automatically**. + + In this case, `sourceStatus` will return `missing`, and you have to manually add a summary using the `PATCH /summaries/{summaryId}/source` endpoint operation. + example: auto + summary-update-payload: type: object properties: title: @@ -15877,15 +15917,21 @@ components: - Quantum theory is complicated. - Schrödinger's cat is neither dead, nor alive. - Quantum computers are super cool. - get-summaries: + summaries-list-response: type: object + title: Summaries properties: data: - description: An array of summary objects. type: array + description: An array of summary objects. items: - $ref: '#/components/schemas/summary-object' - summary-object: + $ref: '#/components/schemas/summary' + pagination: + $ref: '#/components/schemas/pagination' + required: + - data + - pagination + summary: type: object properties: summaryId: @@ -15907,6 +15953,10 @@ components: description: The unique identifier of the video object. example: 'vi4k0jvEUuaTdRAEjQ4Prklg' origin: + type: string + enum: + - api + - auto description: |- Returns the origin of how the summary was created. diff --git a/templates/java/statics/android/src/test/java/video/api/client/api/clients/SummariesApiTest.java b/templates/java/statics/android/src/test/java/video/api/client/api/clients/SummariesApiTest.java new file mode 100644 index 00000000..ef9907da --- /dev/null +++ b/templates/java/statics/android/src/test/java/video/api/client/api/clients/SummariesApiTest.java @@ -0,0 +1,162 @@ +/* + * api.video Java API client + * 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. + * + * The version of the OpenAPI document: 1 + * Contact: ecosystem@api.video + * + * NOTE: This class is auto generated. + * Do not edit the class manually. + */ + +package video.api.client.api.clients; + +import video.api.client.api.ApiException; +import video.api.client.api.models.*; + +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatNoException; +import static org.assertj.core.api.Assertions.assertThatThrownBy; + +/** + * API tests for SummariesApi + */ +@DisplayName("SummariesApi") +public class SummariesApiTest extends AbstractApiTest { + + private final SummariesApi api = apiClientMock.summaries(); + + @Nested + @DisplayName("create") + class create { + private static final String PAYLOADS_PATH = "/payloads/summaries/create/"; + + @Test + @DisplayName("required parameters") + public void requiredParametersTest() { + answerOnAnyRequest(201, "{}"); + + assertThatThrownBy(() -> api.create(new SummaryCreationPayload())) + .hasMessage("Missing the required parameter 'summaryCreationPayload.videoId' when calling create"); + + assertThatThrownBy(() -> api.create(null)) + .hasMessage("Missing the required parameter 'summaryCreationPayload' when calling create"); + + assertThatNoException().isThrownBy(() -> api.create(new SummaryCreationPayload().videoId("123"))); + } + + @Test + @DisplayName("409 response") + public void responseWithStatus409Test() throws ApiException { + answerOnAnyRequest(409, readResourceFile(PAYLOADS_PATH + "responses/409.json")); + + assertThatThrownBy(() -> api.create(new SummaryCreationPayload().videoId("123"))) + .isInstanceOf(ApiException.class) + .satisfies(e -> assertThat(((ApiException) e).getCode()).isEqualTo(409)) + .hasMessage("A summary already exists or is being created on this video."); + + } + } + + @Nested + @DisplayName("get") + class get { + private static final String PAYLOADS_PATH = "/payloads/summaries/get/"; + + @Test + @DisplayName("required parameters") + public void requiredParametersTest() { + answerOnAnyRequest(201, "{}"); + + assertThatNoException().isThrownBy(() -> api.getSummarySource("summary_1CGHWuXjhxmeH4WiZ51234")); + + assertThatThrownBy(() -> api.getSummarySource(null)) + .hasMessage("Missing the required parameter 'summaryId' when calling getSummarySource"); + } + + @Test + @DisplayName("404 response") + public void responseWithStatus404Test() throws ApiException { + answerOnAnyRequest(404, readResourceFile(PAYLOADS_PATH + "responses/404.json")); + + assertThatThrownBy(() -> api.getSummarySource("summary_1CGHWuXjhxmeH4WiZ51234")).isInstanceOf(ApiException.class) + .satisfies(e -> assertThat(((ApiException) e).getCode()).isEqualTo(404)) + .hasMessage("The requested resource was not found."); + + } + } + + @Nested + @DisplayName("update") + class update { + private static final String PAYLOADS_PATH = "/payloads/summaries/update/"; + + @Test + @DisplayName("required parameters") + public void requiredParametersTest() { + answerOnAnyRequest(201, "{}"); + + assertThatNoException() + .isThrownBy(() -> api.update("summary_1CGHWuXjhxmeH4WiZ51234", new SummaryUpdatePayload())); + assertThatThrownBy(() -> api.update(null, null)) + .hasMessage("Missing the required parameter 'summaryId' when calling update"); + } + + @Test + @DisplayName("409 response") + public void responseWithStatus409Test() throws ApiException { + answerOnAnyRequest(409, readResourceFile(PAYLOADS_PATH + "responses/409.json")); + + assertThatThrownBy(() -> api.update("summary_1CGHWuXjhxmeH4WiZ51234", new SummaryUpdatePayload())) + .isInstanceOf(ApiException.class) + .satisfies(e -> assertThat(((ApiException) e).getCode()).isEqualTo(409)) + .hasMessage("A summary already exists or is being created on this video."); + } + } + + @Nested + @DisplayName("delete") + class delete { + private static final String PAYLOADS_PATH = "/payloads/summaries/delete/"; + + @Test + @DisplayName("required parameters") + public void requiredParametersTest() { + answerOnAnyRequest(201, "{}"); + + assertThatNoException().isThrownBy(() -> api.delete("summary_1CGHWuXjhxmeH4WiZ51234")); + assertThatThrownBy(() -> api.delete(null)) + .hasMessage("Missing the required parameter 'summaryId' when calling delete"); + } + } + + @Nested + @DisplayName("list") + class list { + private static final String PAYLOADS_PATH = "/payloads/summaries/list/"; + + @Test + @DisplayName("required parameters") + public void requiredParametersTest() { + answerOnAnyRequest(201, "{}"); + + assertThatNoException().isThrownBy(() -> api.list()); + assertThatNoException().isThrownBy(() -> api.list()); + // + } + + @Test + @DisplayName("200 response") + public void responseWithStatus200Test() throws ApiException { + answerOnAnyRequest(200, readResourceFile(PAYLOADS_PATH + "responses/200.json")); + + Page execute = api.list().execute(); + + } + } + +} diff --git a/templates/java/statics/java/src/test/java/video/api/client/api/clients/SummariesApiTest.java b/templates/java/statics/java/src/test/java/video/api/client/api/clients/SummariesApiTest.java new file mode 100644 index 00000000..ef9907da --- /dev/null +++ b/templates/java/statics/java/src/test/java/video/api/client/api/clients/SummariesApiTest.java @@ -0,0 +1,162 @@ +/* + * api.video Java API client + * 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. + * + * The version of the OpenAPI document: 1 + * Contact: ecosystem@api.video + * + * NOTE: This class is auto generated. + * Do not edit the class manually. + */ + +package video.api.client.api.clients; + +import video.api.client.api.ApiException; +import video.api.client.api.models.*; + +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatNoException; +import static org.assertj.core.api.Assertions.assertThatThrownBy; + +/** + * API tests for SummariesApi + */ +@DisplayName("SummariesApi") +public class SummariesApiTest extends AbstractApiTest { + + private final SummariesApi api = apiClientMock.summaries(); + + @Nested + @DisplayName("create") + class create { + private static final String PAYLOADS_PATH = "/payloads/summaries/create/"; + + @Test + @DisplayName("required parameters") + public void requiredParametersTest() { + answerOnAnyRequest(201, "{}"); + + assertThatThrownBy(() -> api.create(new SummaryCreationPayload())) + .hasMessage("Missing the required parameter 'summaryCreationPayload.videoId' when calling create"); + + assertThatThrownBy(() -> api.create(null)) + .hasMessage("Missing the required parameter 'summaryCreationPayload' when calling create"); + + assertThatNoException().isThrownBy(() -> api.create(new SummaryCreationPayload().videoId("123"))); + } + + @Test + @DisplayName("409 response") + public void responseWithStatus409Test() throws ApiException { + answerOnAnyRequest(409, readResourceFile(PAYLOADS_PATH + "responses/409.json")); + + assertThatThrownBy(() -> api.create(new SummaryCreationPayload().videoId("123"))) + .isInstanceOf(ApiException.class) + .satisfies(e -> assertThat(((ApiException) e).getCode()).isEqualTo(409)) + .hasMessage("A summary already exists or is being created on this video."); + + } + } + + @Nested + @DisplayName("get") + class get { + private static final String PAYLOADS_PATH = "/payloads/summaries/get/"; + + @Test + @DisplayName("required parameters") + public void requiredParametersTest() { + answerOnAnyRequest(201, "{}"); + + assertThatNoException().isThrownBy(() -> api.getSummarySource("summary_1CGHWuXjhxmeH4WiZ51234")); + + assertThatThrownBy(() -> api.getSummarySource(null)) + .hasMessage("Missing the required parameter 'summaryId' when calling getSummarySource"); + } + + @Test + @DisplayName("404 response") + public void responseWithStatus404Test() throws ApiException { + answerOnAnyRequest(404, readResourceFile(PAYLOADS_PATH + "responses/404.json")); + + assertThatThrownBy(() -> api.getSummarySource("summary_1CGHWuXjhxmeH4WiZ51234")).isInstanceOf(ApiException.class) + .satisfies(e -> assertThat(((ApiException) e).getCode()).isEqualTo(404)) + .hasMessage("The requested resource was not found."); + + } + } + + @Nested + @DisplayName("update") + class update { + private static final String PAYLOADS_PATH = "/payloads/summaries/update/"; + + @Test + @DisplayName("required parameters") + public void requiredParametersTest() { + answerOnAnyRequest(201, "{}"); + + assertThatNoException() + .isThrownBy(() -> api.update("summary_1CGHWuXjhxmeH4WiZ51234", new SummaryUpdatePayload())); + assertThatThrownBy(() -> api.update(null, null)) + .hasMessage("Missing the required parameter 'summaryId' when calling update"); + } + + @Test + @DisplayName("409 response") + public void responseWithStatus409Test() throws ApiException { + answerOnAnyRequest(409, readResourceFile(PAYLOADS_PATH + "responses/409.json")); + + assertThatThrownBy(() -> api.update("summary_1CGHWuXjhxmeH4WiZ51234", new SummaryUpdatePayload())) + .isInstanceOf(ApiException.class) + .satisfies(e -> assertThat(((ApiException) e).getCode()).isEqualTo(409)) + .hasMessage("A summary already exists or is being created on this video."); + } + } + + @Nested + @DisplayName("delete") + class delete { + private static final String PAYLOADS_PATH = "/payloads/summaries/delete/"; + + @Test + @DisplayName("required parameters") + public void requiredParametersTest() { + answerOnAnyRequest(201, "{}"); + + assertThatNoException().isThrownBy(() -> api.delete("summary_1CGHWuXjhxmeH4WiZ51234")); + assertThatThrownBy(() -> api.delete(null)) + .hasMessage("Missing the required parameter 'summaryId' when calling delete"); + } + } + + @Nested + @DisplayName("list") + class list { + private static final String PAYLOADS_PATH = "/payloads/summaries/list/"; + + @Test + @DisplayName("required parameters") + public void requiredParametersTest() { + answerOnAnyRequest(201, "{}"); + + assertThatNoException().isThrownBy(() -> api.list()); + assertThatNoException().isThrownBy(() -> api.list()); + // + } + + @Test + @DisplayName("200 response") + public void responseWithStatus200Test() throws ApiException { + answerOnAnyRequest(200, readResourceFile(PAYLOADS_PATH + "responses/200.json")); + + Page execute = api.list().execute(); + + } + } + +} From 771e90c1072ac0d544911935cf11d7de1f9c5bf3 Mon Sep 17 00:00:00 2001 From: Olivier Lando Date: Mon, 21 Oct 2024 11:22:40 +0200 Subject: [PATCH 6/8] Fix Java & Android tests --- .../java/video/api/client/api/clients/SummariesApiTest.java | 5 +++-- .../java/video/api/client/api/clients/SummariesApiTest.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/templates/java/statics/android/src/test/java/video/api/client/api/clients/SummariesApiTest.java b/templates/java/statics/android/src/test/java/video/api/client/api/clients/SummariesApiTest.java index ef9907da..505dee6c 100644 --- a/templates/java/statics/android/src/test/java/video/api/client/api/clients/SummariesApiTest.java +++ b/templates/java/statics/android/src/test/java/video/api/client/api/clients/SummariesApiTest.java @@ -65,7 +65,7 @@ public void responseWithStatus409Test() throws ApiException { @Nested @DisplayName("get") class get { - private static final String PAYLOADS_PATH = "/payloads/summaries/get/"; + private static final String PAYLOADS_PATH = "/payloads/summaries/getSummarySource/"; @Test @DisplayName("required parameters") @@ -83,7 +83,8 @@ public void requiredParametersTest() { public void responseWithStatus404Test() throws ApiException { answerOnAnyRequest(404, readResourceFile(PAYLOADS_PATH + "responses/404.json")); - assertThatThrownBy(() -> api.getSummarySource("summary_1CGHWuXjhxmeH4WiZ51234")).isInstanceOf(ApiException.class) + assertThatThrownBy(() -> api.getSummarySource("summary_1CGHWuXjhxmeH4WiZ51234")) + .isInstanceOf(ApiException.class) .satisfies(e -> assertThat(((ApiException) e).getCode()).isEqualTo(404)) .hasMessage("The requested resource was not found."); diff --git a/templates/java/statics/java/src/test/java/video/api/client/api/clients/SummariesApiTest.java b/templates/java/statics/java/src/test/java/video/api/client/api/clients/SummariesApiTest.java index ef9907da..c602ff1d 100644 --- a/templates/java/statics/java/src/test/java/video/api/client/api/clients/SummariesApiTest.java +++ b/templates/java/statics/java/src/test/java/video/api/client/api/clients/SummariesApiTest.java @@ -65,7 +65,7 @@ public void responseWithStatus409Test() throws ApiException { @Nested @DisplayName("get") class get { - private static final String PAYLOADS_PATH = "/payloads/summaries/get/"; + private static final String PAYLOADS_PATH = "/payloads/summaries/getSummarySource/"; @Test @DisplayName("required parameters") From 8281bbda5ba81a790dde206067f96e1983bdf3f5 Mon Sep 17 00:00:00 2001 From: szekelyzol Date: Mon, 21 Oct 2024 12:23:02 +0200 Subject: [PATCH 7/8] Add missing query parameters to Get summaries --- oas_apivideo.yaml | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/oas_apivideo.yaml b/oas_apivideo.yaml index 666c0e3d..027cb484 100644 --- a/oas_apivideo.yaml +++ b/oas_apivideo.yaml @@ -1128,23 +1128,64 @@ paths: default: 'List all summarries for your videos in a project.' operationId: GET_summaries parameters: + - name: videoId + in: query + required: false + description: Use this parameter to filter for a summary that belongs to a specific video. + schema: + type: string + example: vilkR8K3N7yrRcxcMt91234 + - name: origin + in: query + required: false + description: 'Use this parameter to filter for summaries based on the way they were created: automatically or manually via the API.' + schema: + type: string + enum: [auto, api] + example: auto + - name: sourceStatus + in: query + required: false + description: | + Use this parameter to filter for summaries based on the current status of the summary source. + + These are the available statuses: + + `missing`: the input for a summary is not present. + `waiting` : the input video is being processed and a summary will be generated. + `failed`: a technical issue prevented summary generation. + `completed`: the summary is generated. + `unprocessable`: the API rules the source video to be unsuitable for summary generation. An example for this is an input video that has no audio. + schema: + type: string + enum: [missing, waiting, failed, completed, unprocessable] + example: auto - name: sortBy in: query - description: 'Allowed: createdAt. You can search by the time watermark were created at.' + description: | + Use this parameter to choose which field the API will use to sort the response data. The default is `value`. + + These are the available fields to sort by: + + - `createdAt`: Sorts the results based on date and timestamps when summaries were created. + - `updatedAt`: Sorts the results based on date and timestamps when summaries were last updated. + - `videoId`: Sorts the results based on video IDs. required: false style: form explode: true schema: type: string + enum: [createdAt, updatedAt, videoId] example: createdAt - name: sortOrder in: query - description: 'Allowed: asc, desc. asc is ascending and sorts from A to Z. desc is descending and sorts from Z to A.' + 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.' required: false style: form explode: true schema: type: string + enum: [asc, desc] example: asc - $ref: '#/components/parameters/current-page' - $ref: '#/components/parameters/page-size' From fc163d62e4b8494e8b6928b270f10822e1ccbc5c Mon Sep 17 00:00:00 2001 From: Olivier Lando Date: Mon, 21 Oct 2024 15:18:23 +0200 Subject: [PATCH 8/8] Bump clients versions --- config/android.yaml | 2 ++ config/csharp.yaml | 2 ++ config/go.yaml | 2 ++ config/java.yaml | 2 ++ config/nodejs.yaml | 2 ++ config/php.yaml | 2 ++ config/python.yaml | 2 ++ config/swift5-uploader.yaml | 2 ++ config/swift5.yaml | 3 +++ 9 files changed, 19 insertions(+) diff --git a/config/android.yaml b/config/android.yaml index dde14241..af13b4fb 100644 --- a/config/android.yaml +++ b/config/android.yaml @@ -1,4 +1,6 @@ changelog: + - 1.6.5 (2024-10-21): + - Add summary feature - 1.6.4 (2024-10-08): - Add transcript feature - 1.6.3 (2024-09-30): diff --git a/config/csharp.yaml b/config/csharp.yaml index 50e188ba..c1faa6f3 100644 --- a/config/csharp.yaml +++ b/config/csharp.yaml @@ -1,4 +1,6 @@ changelog: + - 1.6.5 (2024-10-21): + - Add summary feature - 1.6.4 (2024-10-08): - Add transcript feature - 1.6.3 (2024-09-30): diff --git a/config/go.yaml b/config/go.yaml index 10ced6d5..e2f639a8 100644 --- a/config/go.yaml +++ b/config/go.yaml @@ -1,4 +1,6 @@ changelog: + - 1.4.5 (2024-10-21): + - Add summary feature - 1.4.4 (2024-10-08): - Add transcript feature - 1.4.3 (2024-09-30): diff --git a/config/java.yaml b/config/java.yaml index abeac760..5fd2b147 100644 --- a/config/java.yaml +++ b/config/java.yaml @@ -1,4 +1,6 @@ changelog: + - 1.4.5 (2024-10-21): + - Add summary feature - 1.4.4 (2024-10-08): - Add transcript feature - 1.4.3 (2024-09-30): diff --git a/config/nodejs.yaml b/config/nodejs.yaml index 836bb659..6d8d9dc0 100644 --- a/config/nodejs.yaml +++ b/config/nodejs.yaml @@ -1,4 +1,6 @@ changelog: + - 2.6.6 (2024-10-21): + - Add summary feature - 2.6.5 (2024-10-17): - Fix postinstall script - 2.6.4 (2024-10-08): diff --git a/config/php.yaml b/config/php.yaml index de983220..abbcac8b 100644 --- a/config/php.yaml +++ b/config/php.yaml @@ -1,4 +1,6 @@ changelog: + - 1.4.5 (2024-10-21): + - Add summary feature - 1.4.4 (2024-10-08): - Add transcript feature - 1.4.3 (2024-09-30): diff --git a/config/python.yaml b/config/python.yaml index 6f7bacd2..abb449df 100644 --- a/config/python.yaml +++ b/config/python.yaml @@ -1,4 +1,6 @@ changelog: + - 1.4.5 (2024-10-21): + - Add summary feature - 1.4.4 (2024-10-08): - Add transcript feature - 1.4.3 (2024-09-30): diff --git a/config/swift5-uploader.yaml b/config/swift5-uploader.yaml index 2a0e6294..8d8f137f 100644 --- a/config/swift5-uploader.yaml +++ b/config/swift5-uploader.yaml @@ -1,4 +1,6 @@ changelog: + - 1.2.5 (2024-10-21): + - Add support for Alamofire 5.10 - 1.2.4 (2024-10-08): - Add transcript feature - 1.2.3 (2024-04-25): diff --git a/config/swift5.yaml b/config/swift5.yaml index 6ea4aed9..6d2c9e74 100644 --- a/config/swift5.yaml +++ b/config/swift5.yaml @@ -1,4 +1,7 @@ changelog: + - 1.3.5 (2024-10-21): + - Add summary feature + - Add support for Alamofire 5.10 - 1.3.4 (2024-10-08): - Add transcript feature - 1.3.3 (2024-09-30):