Skip to content

Commit 6ccd947

Browse files
authored
Add summary feature
1 parent a1aba73 commit 6ccd947

23 files changed

+2088
-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+
[**get()**](https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/SummariesApi.md#get) | Get summary details | **GET** `/summaries/{summaryId}/source`
196+
[**update()**](https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/SummariesApi.md#update) | Update summary details | **PATCH** `/summaries/{summaryId}/source`
197+
[**delete()**](https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/SummariesApi.md#delete) | Delete video summary | **DELETE** `/summaries/{summaryId}`
198+
[**list()**](https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/SummariesApi.md#list) | List summaries | **GET** `/summaries`
199+
200+
189201
#### TagsApi
190202

191203
Method | Description | HTTP request
@@ -266,10 +278,13 @@ 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)
272285
- [FilterBy2](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/FilterBy2.md)
286+
- [GetSummaries](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/GetSummaries.md)
287+
- [InlineObject](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/InlineObject.md)
273288
- [Link](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/Link.md)
274289
- [ListTagsResponse](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/ListTagsResponse.md)
275290
- [ListTagsResponseData](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/ListTagsResponseData.md)
@@ -293,10 +308,13 @@ Method | Description | HTTP request
293308
- [RefreshTokenPayload](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/RefreshTokenPayload.md)
294309
- [RestreamsRequestObject](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/RestreamsRequestObject.md)
295310
- [RestreamsResponseObject](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/RestreamsResponseObject.md)
311+
- [SummaryObject](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/SummaryObject.md)
312+
- [SummarySource](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/SummarySource.md)
296313
- [TokenCreationPayload](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/TokenCreationPayload.md)
297314
- [TokenListResponse](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/TokenListResponse.md)
298315
- [TooManyRequests](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/TooManyRequests.md)
299316
- [UnrecognizedRequestUrl](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/UnrecognizedRequestUrl.md)
317+
- [UpdateSummaryRequest](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/UpdateSummaryRequest.md)
300318
- [UploadToken](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/UploadToken.md)
301319
- [Video](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/Video.md)
302320
- [VideoAssets](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/VideoAssets.md)

docs/Api/SummariesApi.md

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
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+
[**get()**](SummariesApi.md#get) | Get summary details | **GET** /summaries/{summaryId}/source
9+
[**update()**](SummariesApi.md#update) | Update summary details | **PATCH** /summaries/{summaryId}/source
10+
[**delete()**](SummariesApi.md#delete) | Delete video summary | **DELETE** /summaries/{summaryId}
11+
[**list()**](SummariesApi.md#list) | List summaries | **GET** /summaries
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+
`inlineObject` | [**\ApiVideo\Client\Model\InlineObject**](../Model/InlineObject.md)| |
27+
28+
29+
30+
31+
### Return type
32+
33+
[**\ApiVideo\Client\Model\SummaryObject**](../Model/SummaryObject.md)
34+
35+
36+
37+
38+
39+
## **`get()` - Get summary details**
40+
41+
42+
43+
Get all details for a summary.
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 retrieve. |
52+
53+
54+
55+
56+
### Return type
57+
58+
[**\ApiVideo\Client\Model\SummarySource**](../Model/SummarySource.md)
59+
60+
61+
62+
63+
64+
## **`update()` - Update summary details**
65+
66+
67+
68+
Update details for a summary. Note that this operation is only allowed for summary objects where `sourceStatus` is `missing`.
69+
70+
### Arguments
71+
72+
73+
74+
Name | Type | Description | Notes
75+
------------- | ------------- | ------------- | -------------
76+
`summaryId` | **string**| The unique identifier of the summary source you want to update. |
77+
`updateSummaryRequest` | [**\ApiVideo\Client\Model\UpdateSummaryRequest**](../Model/UpdateSummaryRequest.md)| |
78+
79+
80+
81+
82+
### Return type
83+
84+
[**\ApiVideo\Client\Model\SummarySource**](../Model/SummarySource.md)
85+
86+
87+
88+
89+
90+
## **`delete()` - Delete video summary**
91+
92+
93+
94+
Delete a summary tied to a video.
95+
96+
### Arguments
97+
98+
99+
100+
Name | Type | Description | Notes
101+
------------- | ------------- | ------------- | -------------
102+
`summaryId` | **string**| The unique identifier of the summary you want to delete. |
103+
104+
105+
106+
107+
### Return type
108+
109+
void (empty response body)
110+
111+
112+
113+
114+
115+
## **`list()` - List summaries**
116+
117+
118+
119+
List all summarries for your videos in a project.
120+
121+
### Arguments
122+
123+
124+
125+
126+
127+
128+
This endpoint does not need any parameter.
129+
130+
### Return type
131+
132+
[**\ApiVideo\Client\Model\GetSummaries**](../Model/GetSummaries.md)
133+
134+
135+
136+

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/GetSummaries.md

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

docs/Model/InlineObject.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# # InlineObject
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**videoId** | **string** | Create a summary of a video using the video ID. | [optional]
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/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/SummaryObject.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# # SummaryObject
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/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/UpdateSummaryRequest.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# # UpdateSummaryRequest
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)