Skip to content

Commit 93d196b

Browse files
Merge pull request #231 from apivideo/add-summary-feature-docs
Add summary feature
2 parents fb634b2 + 86dcd1f commit 93d196b

33 files changed

+1168
-6
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Changelog
22
All changes to this project will be documented in this file.
33

4+
## [2.6.6] - 2024-10-21
5+
- Add summary feature
6+
47
## [2.6.5] - 2024-10-17
58
- Fix postinstall script
69

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
- [ChaptersApi](#chaptersapi)
2121
- [LiveStreamsApi](#livestreamsapi)
2222
- [PlayerThemesApi](#playerthemesapi)
23+
- [SummariesApi](#summariesapi)
2324
- [TagsApi](#tagsapi)
2425
- [UploadTokensApi](#uploadtokensapi)
2526
- [VideosApi](#videosapi)
@@ -162,6 +163,17 @@ Method | Description | HTTP request
162163
[**deleteLogo()**](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/api/PlayerThemesApi.md#deleteLogo) | Delete logo | **DELETE** `/players/{playerId}/logo`
163164

164165

166+
#### SummariesApi
167+
168+
Method | Description | HTTP request
169+
------------- | ------------- | -------------
170+
[**create()**](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/api/SummariesApi.md#create) | Generate video summary | **POST** `/summaries`
171+
[**update()**](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/api/SummariesApi.md#update) | Update summary details | **PATCH** `/summaries/{summaryId}/source`
172+
[**delete()**](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/api/SummariesApi.md#delete) | Delete video summary | **DELETE** `/summaries/{summaryId}`
173+
[**list()**](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/api/SummariesApi.md#list) | List summaries | **GET** `/summaries`
174+
[**getSummarySource()**](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/api/SummariesApi.md#getSummarySource) | Get summary details | **GET** `/summaries/{summaryId}/source`
175+
176+
165177
#### TagsApi
166178

167179
Method | Description | HTTP request
@@ -242,6 +254,7 @@ Method | Description | HTTP request
242254
- [CaptionsUpdatePayload](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/CaptionsUpdatePayload.md)
243255
- [Chapter](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/Chapter.md)
244256
- [ChaptersListResponse](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/ChaptersListResponse.md)
257+
- [ConflictError](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/ConflictError.md)
245258
- [DiscardedVideoUpdatePayload](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/DiscardedVideoUpdatePayload.md)
246259
- [FilterBy](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/FilterBy.md)
247260
- [FilterBy1](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/FilterBy1.md)
@@ -269,6 +282,11 @@ Method | Description | HTTP request
269282
- [RefreshTokenPayload](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/RefreshTokenPayload.md)
270283
- [RestreamsRequestObject](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/RestreamsRequestObject.md)
271284
- [RestreamsResponseObject](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/RestreamsResponseObject.md)
285+
- [SummariesListResponse](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/SummariesListResponse.md)
286+
- [Summary](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/Summary.md)
287+
- [SummaryCreationPayload](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/SummaryCreationPayload.md)
288+
- [SummarySource](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/SummarySource.md)
289+
- [SummaryUpdatePayload](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/SummaryUpdatePayload.md)
272290
- [TokenCreationPayload](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/TokenCreationPayload.md)
273291
- [TokenListResponse](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/TokenListResponse.md)
274292
- [TooManyRequests](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/TooManyRequests.md)

docs/api/SummariesApi.md

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# 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+
<a name="create"></a>
15+
## **`create()` - Generate video summary**
16+
17+
18+
Generate a title, abstract, and key takeaways for a video.
19+
20+
### Parameters
21+
22+
| Name | Type | Required | Description |
23+
| ------------- | ------------- | ------------- | ------------- |
24+
| **summaryCreationPayload** | [**SummaryCreationPayload**](../model/SummaryCreationPayload.md)| **yes**| |
25+
26+
27+
### Return type
28+
29+
Promise<[**Summary**](../model/Summary.md)>.
30+
31+
32+
33+
34+
---
35+
36+
<a name="update"></a>
37+
## **`update()` - Update summary details**
38+
39+
40+
Update details for a summary. Note that this operation is only allowed for summary objects where `sourceStatus` is `missing`.
41+
42+
### Parameters
43+
44+
| Name | Type | Required | Description |
45+
| ------------- | ------------- | ------------- | ------------- |
46+
| **summaryId** | **string**| **yes**| The unique identifier of the summary source you want to update. |
47+
| **summaryUpdatePayload** | [**SummaryUpdatePayload**](../model/SummaryUpdatePayload.md)| **yes**| |
48+
49+
50+
### Return type
51+
52+
Promise<[**SummarySource**](../model/SummarySource.md)>.
53+
54+
55+
56+
57+
---
58+
59+
<a name="delete"></a>
60+
## **`delete()` - Delete video summary**
61+
62+
63+
Delete a summary tied to a video.
64+
65+
### Parameters
66+
67+
| Name | Type | Required | Description |
68+
| ------------- | ------------- | ------------- | ------------- |
69+
| **summaryId** | **string**| **yes**| The unique identifier of the summary you want to delete. |
70+
71+
72+
### Return type
73+
74+
Promise<[**void**](../model/.md)>.
75+
76+
77+
78+
79+
---
80+
81+
<a name="list"></a>
82+
## **`list()` - List summaries**
83+
84+
85+
List all summarries for your videos in a project.
86+
87+
### Parameters
88+
89+
| Name | Type | Required | Description |
90+
| ------------- | ------------- | ------------- | ------------- |
91+
| **videoId** | **string**| no| Use this parameter to filter for a summary that belongs to a specific video. |
92+
| **origin** | **&#39;auto&#39; \| &#39;api&#39;**| no| Use this parameter to filter for summaries based on the way they were created: automatically or manually via the API. |
93+
| **sourceStatus** | **&#39;missing&#39; \| &#39;waiting&#39; \| &#39;failed&#39; \| &#39;completed&#39; \| &#39;unprocessable&#39;**| no| Use this parameter to filter for summaries based on the current status of the summary source. These are the available statuses: &#x60;missing&#x60;: the input for a summary is not present. &#x60;waiting&#x60; : the input video is being processed and a summary will be generated. &#x60;failed&#x60;: a technical issue prevented summary generation. &#x60;completed&#x60;: the summary is generated. &#x60;unprocessable&#x60;: the API rules the source video to be unsuitable for summary generation. An example for this is an input video that has no audio. |
94+
| **sortBy** | **&#39;createdAt&#39; \| &#39;updatedAt&#39; \| &#39;videoId&#39;**| no| Use this parameter to choose which field the API will use to sort the response data. The default is &#x60;value&#x60;. These are the available fields to sort by: - &#x60;createdAt&#x60;: Sorts the results based on date and timestamps when summaries were created. - &#x60;updatedAt&#x60;: Sorts the results based on date and timestamps when summaries were last updated. - &#x60;videoId&#x60;: Sorts the results based on video IDs. |
95+
| **sortOrder** | **&#39;asc&#39; \| &#39;desc&#39;**| no| Use this parameter to sort results. &#x60;asc&#x60; is ascending and sorts from A to Z. &#x60;desc&#x60; is descending and sorts from Z to A. |
96+
| **currentPage** | **number**| no| Choose the number of search results to return per page. Minimum value: 1 |
97+
| **pageSize** | **number**| no| Results per page. Allowed values 1-100, default is 25. |
98+
99+
100+
### Return type
101+
102+
Promise<[**SummariesListResponse**](../model/SummariesListResponse.md)>.
103+
104+
105+
106+
107+
---
108+
109+
<a name="getSummarySource"></a>
110+
## **`getSummarySource()` - Get summary details**
111+
112+
113+
Get all details for a summary.
114+
115+
### Parameters
116+
117+
| Name | Type | Required | Description |
118+
| ------------- | ------------- | ------------- | ------------- |
119+
| **summaryId** | **string**| **yes**| The unique identifier of the summary source you want to retrieve. |
120+
121+
122+
### Return type
123+
124+
Promise<[**SummarySource**](../model/SummarySource.md)>.
125+
126+
127+
128+
129+
---
130+

docs/model/ConflictError.md

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

docs/model/NotFound.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

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

1313

1414

docs/model/SummariesListResponse.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
# SummariesListResponse
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**data** | [**Array&lt;Summary&gt;**](Summary.md) | An array of summary objects. |
9+
**pagination** | [**Pagination**](Pagination.md) | |
10+
11+
12+

docs/model/Summary.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
# Summary
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**summaryId** | **string** | The unique identifier of the summary object. | [optional]
9+
**createdAt** | **Date** | Returns the date and time when the summary was created in ATOM date-time format. | [optional]
10+
**updatedAt** | **Date** | Returns the date and time when the summary was last updated in ATOM date-time format. | [optional]
11+
**videoId** | **string** | The unique identifier of the video object. | [optional]
12+
**origin** | [**SummaryOriginEnum**](#SummaryOriginEnum) | Returns the origin of how the summary was created. - &#x60;api&#x60; means that no summary was generated automatically. You can add summary manually using the &#x60;PATCH /summaries/{summaryId}/source&#x60; endpoint operation. Until this happens, &#x60;sourceStatus&#x60; returns &#x60;missing&#x60;. - &#x60;auto&#x60; means that the API generated the summary automatically. | [optional]
13+
**sourceStatus** | [**SummarySourceStatusEnum**](#SummarySourceStatusEnum) | Returns the current status of summary generation. &#x60;missing&#x60;: the input for a summary is not present. &#x60;waiting&#x60; : the input video is being processed and a summary will be generated. &#x60;failed&#x60;: a technical issue prevented summary generation. &#x60;completed&#x60;: the summary is generated. &#x60;unprocessable&#x60;: 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]
14+
15+
16+
17+
## Enum: SummaryOriginEnum
18+
19+
Name | Value
20+
---- | -----
21+
Api | &#39;api&#39;
22+
Auto | &#39;auto&#39;
23+
24+
25+
26+
## Enum: SummarySourceStatusEnum
27+
28+
Name | Value
29+
---- | -----
30+
Missing | &#39;missing&#39;
31+
Waiting | &#39;waiting&#39;
32+
Failed | &#39;failed&#39;
33+
Completed | &#39;completed&#39;
34+
Unprocessable | &#39;unprocessable&#39;
35+
36+
37+

docs/model/SummaryCreationPayload.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
# SummaryCreationPayload
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**videoId** | **string** | Create a summary of a video using the video ID. |
9+
**origin** | [**SummaryCreationPayloadOriginEnum**](#SummaryCreationPayloadOriginEnum) | Use this parameter to define how the API generates the summary. The only allowed value is &#x60;auto&#x60;, 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, &#x60;sourceStatus&#x60; will return &#x60;missing&#x60;, and you have to manually add a summary using the &#x60;PATCH /summaries/{summaryId}/source&#x60; endpoint operation. | [optional]
10+
11+
12+
13+
## Enum: SummaryCreationPayloadOriginEnum
14+
15+
Name | Value
16+
---- | -----
17+
Auto | &#39;auto&#39;
18+
19+
20+

docs/model/SummarySource.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
# SummarySource
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**title** | **string** | A video title, based on the contents of the video. | [optional]
9+
**_abstract** | **string** | A short outline of the contents of the video. The length of an &#x60;abstract&#x60; 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]
10+
**takeaways** | **Array&lt;string&gt;** | A list of 3 key points from the video, in chronological order. | [optional]
11+
12+
13+

docs/model/SummaryUpdatePayload.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
# SummaryUpdatePayload
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**title** | **string** | A video title, based on the contents of the video. | [optional]
9+
**_abstract** | **string** | A short outline of the contents of the video. | [optional]
10+
**takeaways** | **Array&lt;string&gt;** | A list of 3 key points from the video, in chronological order. | [optional]
11+
12+
13+

0 commit comments

Comments
 (0)