Skip to content

Commit 3cf31dc

Browse files
author
olivierapivideo
authored
Add summary feature
1 parent a1aba73 commit 3cf31dc

23 files changed

+2168
-21
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
- [ChaptersApi](#chaptersapi)
2525
- [LiveStreamsApi](#livestreamsapi)
2626
- [PlayerThemesApi](#playerthemesapi)
27+
- [SummariesApi](#summariesapi)
2728
- [TagsApi](#tagsapi)
2829
- [UploadTokensApi](#uploadtokensapi)
2930
- [VideosApi](#videosapi)
@@ -186,6 +187,17 @@ Method | Description | HTTP request
186187
[**deleteLogo()**](https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/PlayerThemesApi.md#deleteLogo) | Delete logo | **DELETE** `/players/{playerId}/logo`
187188

188189

190+
#### SummariesApi
191+
192+
Method | Description | HTTP request
193+
------------- | ------------- | -------------
194+
[**create()**](https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/SummariesApi.md#create) | Generate video summary | **POST** `/summaries`
195+
[**update()**](https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/SummariesApi.md#update) | Update summary details | **PATCH** `/summaries/{summaryId}/source`
196+
[**delete()**](https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/SummariesApi.md#delete) | Delete video summary | **DELETE** `/summaries/{summaryId}`
197+
[**list()**](https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/SummariesApi.md#list) | List summaries | **GET** `/summaries`
198+
[**getSummarySource()**](https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/SummariesApi.md#getSummarySource) | Get summary details | **GET** `/summaries/{summaryId}/source`
199+
200+
189201
#### TagsApi
190202

191203
Method | Description | HTTP request
@@ -266,6 +278,7 @@ Method | Description | HTTP request
266278
- [CaptionsUpdatePayload](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/CaptionsUpdatePayload.md)
267279
- [Chapter](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/Chapter.md)
268280
- [ChaptersListResponse](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/ChaptersListResponse.md)
281+
- [ConflictError](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/ConflictError.md)
269282
- [DiscardedVideoUpdatePayload](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/DiscardedVideoUpdatePayload.md)
270283
- [FilterBy](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/FilterBy.md)
271284
- [FilterBy1](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/FilterBy1.md)
@@ -293,6 +306,11 @@ Method | Description | HTTP request
293306
- [RefreshTokenPayload](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/RefreshTokenPayload.md)
294307
- [RestreamsRequestObject](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/RestreamsRequestObject.md)
295308
- [RestreamsResponseObject](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/RestreamsResponseObject.md)
309+
- [SummariesListResponse](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/SummariesListResponse.md)
310+
- [Summary](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/Summary.md)
311+
- [SummaryCreationPayload](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/SummaryCreationPayload.md)
312+
- [SummarySource](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/SummarySource.md)
313+
- [SummaryUpdatePayload](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/SummaryUpdatePayload.md)
296314
- [TokenCreationPayload](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/TokenCreationPayload.md)
297315
- [TokenListResponse](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/TokenListResponse.md)
298316
- [TooManyRequests](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/TooManyRequests.md)

docs/Api/SummariesApi.md

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# ApiVideo\Client\Api\SummariesApi
2+
3+
All URIs are relative to https://ws.api.video.
4+
5+
Method | Description | HTTP request
6+
------------- | ------------- | -------------
7+
[**create()**](SummariesApi.md#create) | Generate video summary | **POST** /summaries
8+
[**update()**](SummariesApi.md#update) | Update summary details | **PATCH** /summaries/{summaryId}/source
9+
[**delete()**](SummariesApi.md#delete) | Delete video summary | **DELETE** /summaries/{summaryId}
10+
[**list()**](SummariesApi.md#list) | List summaries | **GET** /summaries
11+
[**getSummarySource()**](SummariesApi.md#getSummarySource) | Get summary details | **GET** /summaries/{summaryId}/source
12+
13+
14+
## **`create()` - Generate video summary**
15+
16+
17+
18+
Generate a title, abstract, and key takeaways for a video.
19+
20+
### Arguments
21+
22+
23+
24+
Name | Type | Description | Notes
25+
------------- | ------------- | ------------- | -------------
26+
`summaryCreationPayload` | [**\ApiVideo\Client\Model\SummaryCreationPayload**](../Model/SummaryCreationPayload.md)| |
27+
28+
29+
30+
31+
### Return type
32+
33+
[**\ApiVideo\Client\Model\Summary**](../Model/Summary.md)
34+
35+
36+
37+
38+
39+
## **`update()` - Update summary details**
40+
41+
42+
43+
Update details for a summary. Note that this operation is only allowed for summary objects where `sourceStatus` is `missing`.
44+
45+
### Arguments
46+
47+
48+
49+
Name | Type | Description | Notes
50+
------------- | ------------- | ------------- | -------------
51+
`summaryId` | **string**| The unique identifier of the summary source you want to update. |
52+
`summaryUpdatePayload` | [**\ApiVideo\Client\Model\SummaryUpdatePayload**](../Model/SummaryUpdatePayload.md)| |
53+
54+
55+
56+
57+
### Return type
58+
59+
[**\ApiVideo\Client\Model\SummarySource**](../Model/SummarySource.md)
60+
61+
62+
63+
64+
65+
## **`delete()` - Delete video summary**
66+
67+
68+
69+
Delete a summary tied to a video.
70+
71+
### Arguments
72+
73+
74+
75+
Name | Type | Description | Notes
76+
------------- | ------------- | ------------- | -------------
77+
`summaryId` | **string**| The unique identifier of the summary you want to delete. |
78+
79+
80+
81+
82+
### Return type
83+
84+
void (empty response body)
85+
86+
87+
88+
89+
90+
## **`list()` - List summaries**
91+
92+
93+
94+
List all summarries for your videos in a project.
95+
96+
### Arguments
97+
98+
99+
100+
101+
102+
Note: `queryParams` argument is an associative array with the keys listed below.
103+
104+
Name | Type | Description | Notes
105+
------------- | ------------- | ------------- | -------------
106+
`sortBy` | **string**| Allowed: createdAt. You can search by the time watermark were created at. | [optional]
107+
`sortOrder` | **string**| Allowed: asc, desc. asc is ascending and sorts from A to Z. desc is descending and sorts from Z to A. | [optional]
108+
`currentPage` | **int**| Choose the number of search results to return per page. Minimum value: 1 | [optional] [default to 1]
109+
`pageSize` | **int**| Results per page. Allowed values 1-100, default is 25. | [optional] [default to 25]
110+
111+
112+
113+
114+
115+
116+
### Return type
117+
118+
[**\ApiVideo\Client\Model\SummariesListResponse**](../Model/SummariesListResponse.md)
119+
120+
121+
122+
123+
124+
## **`getSummarySource()` - Get summary details**
125+
126+
127+
128+
Get all details for a summary.
129+
130+
### Arguments
131+
132+
133+
134+
Name | Type | Description | Notes
135+
------------- | ------------- | ------------- | -------------
136+
`summaryId` | **string**| The unique identifier of the summary source you want to retrieve. |
137+
138+
139+
140+
141+
### Return type
142+
143+
[**\ApiVideo\Client\Model\SummarySource**](../Model/SummarySource.md)
144+
145+
146+
147+

docs/Model/ConflictError.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# # ConflictError
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**type** | **string** | A link to the error documentation. | [optional]
8+
**title** | **string** | A description of the error that occurred. | [optional]
9+
**name** | **string** | The name of the parameter that caused the error. | [optional]
10+
**status** | **int** | The HTTP status code. | [optional]
11+
**detail** | **string** | A solution for the error. | [optional]
12+
13+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

docs/Model/NotFound.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**type** | **string** | | [optional]
8-
**title** | **string** | | [optional]
9-
**name** | **string** | | [optional]
10-
**status** | **int** | | [optional]
7+
**type** | **string** | A link to the error documentation. | [optional]
8+
**title** | **string** | A description of the error that occurred. | [optional]
9+
**name** | **string** | The name of the parameter that caused the error. | [optional]
10+
**status** | **int** | The HTTP status code. | [optional]
1111

1212
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

docs/Model/SummariesListResponse.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# # SummariesListResponse
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**data** | [**\ApiVideo\Client\Model\Summary[]**](Summary.md) | An array of summary objects. |
8+
**pagination** | [**\ApiVideo\Client\Model\Pagination**](Pagination.md) | |
9+
10+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

docs/Model/Summary.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# # Summary
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**summaryId** | **string** | The unique identifier of the summary object. | [optional]
8+
**createdAt** | [**\DateTime**](\DateTime.md) | Returns the date and time when the summary was created in ATOM date-time format. | [optional]
9+
**updatedAt** | [**\DateTime**](\DateTime.md) | Returns the date and time when the summary was last updated in ATOM date-time format. | [optional]
10+
**videoId** | **string** | The unique identifier of the video object. | [optional]
11+
**origin** | **mixed** | 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. | [optional]
12+
**sourceStatus** | **string** | 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. | [optional]
13+
14+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

docs/Model/SummaryCreationPayload.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# # SummaryCreationPayload
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**videoId** | **string** | Create a summary of a video using the video ID. |
8+
**origin** | **string** | 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. | [optional]
9+
10+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

docs/Model/SummarySource.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# # SummarySource
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**title** | **string** | A video title, based on the contents of the video. | [optional]
8+
**abstract** | **string** | 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. | [optional]
9+
**takeaways** | **string[]** | A list of 3 key points from the video, in chronological order. | [optional]
10+
11+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

docs/Model/SummaryUpdatePayload.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# # SummaryUpdatePayload
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**title** | **string** | A video title, based on the contents of the video. | [optional]
8+
**abstract** | **string** | A short outline of the contents of the video. | [optional]
9+
**takeaways** | **string[]** | A list of 3 key points from the video, in chronological order. | [optional]
10+
11+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

docs/Model/VideoCreationPayload.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ Name | Type | Description | Notes
1717
**watermark** | [**\ApiVideo\Client\Model\VideoWatermark**](VideoWatermark.md) | | [optional]
1818
**language** | **string** | Use this parameter to set the language of the video. When this parameter is set, the API creates a transcript of the video using the language you specify. You must use the [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. `language` is a permanent attribute of the video. You can update it to another language using the [`PATCH /videos/{videoId}`](https://docs.api.video/reference/api/Videos#update-a-video-object) operation. This triggers the API to generate a new transcript using a different language. | [optional]
1919
**transcript** | **bool** | Use this parameter to enable transcription. - When `true`, the API generates a transcript for the video. - 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. | [optional]
20+
**transcriptSummary** | **bool** | 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. | [optional]
2021

2122
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

0 commit comments

Comments
 (0)