Skip to content

Commit

Permalink
Update Summary endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
szekelyzol authored Nov 5, 2024
1 parent 89cf754 commit d3e21ef
Show file tree
Hide file tree
Showing 40 changed files with 129 additions and 375 deletions.
3 changes: 0 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Changelog
All changes to this project will be documented in this file.

## [2.6.7] - 2024-11-04
- Analytics updates (ccv, views, ...)

## [2.6.6] - 2024-10-21
- Add summary feature

Expand Down
24 changes: 9 additions & 15 deletions docs/api/AnalyticsApi.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/api/SummariesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ All URIs are relative to *https://ws.api.video*
## **`create()` - Generate video summary**


Generate a title, abstract, and key takeaways for a video.
Generate an abstract and key takeaways for a video.

### Parameters

Expand All @@ -37,7 +37,7 @@ Promise<[**Summary**](../model/Summary.md)>.
## **`update()` - Update summary details**


Update details for a summary. Note that this operation is only allowed for summary objects where `sourceStatus` is `missing`.
Update details for a summary.

### Parameters

Expand Down
13 changes: 1 addition & 12 deletions docs/model/AnalyticsAggregatedMetricsResponseContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**metric** | [**AnalyticsAggregatedMetricsResponseContextMetricEnum**](#AnalyticsAggregatedMetricsResponseContextMetricEnum) | Returns the metric and relevant parameters you selected. | [optional]
**metric** | [**AnalyticsAggregatedMetricsResponseContextMetricEnum**](#AnalyticsAggregatedMetricsResponseContextMetricEnum) | Returns the metric you selected. | [optional]
**aggregation** | [**AnalyticsAggregatedMetricsResponseContextAggregationEnum**](#AnalyticsAggregatedMetricsResponseContextAggregationEnum) | Returns the aggregation you selected. | [optional]
**timeframe** | [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.md) | | [optional]

Expand All @@ -21,17 +21,6 @@ End | &#39;end&#39;
Impression | &#39;impression&#39;
ImpressionTime | &#39;impression-time&#39;
WatchTime | &#39;watch-time&#39;
Ccv | &#39;ccv&#39;
UniqueCcv | &#39;unique-ccv&#39;
View3 | &#39;view-3&#39;
View5 | &#39;view-5&#39;
View10 | &#39;view-10&#39;
View30 | &#39;view-30&#39;
UniqueView | &#39;unique-view&#39;
UniqueView3 | &#39;unique-view-3&#39;
UniqueView5 | &#39;unique-view-5&#39;
UniqueView10 | &#39;unique-view-10&#39;
UniqueView30 | &#39;unique-view-30&#39;



Expand Down
15 changes: 1 addition & 14 deletions docs/model/AnalyticsMetricsBreakdownResponseContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**metric** | [**AnalyticsMetricsBreakdownResponseContextMetricEnum**](#AnalyticsMetricsBreakdownResponseContextMetricEnum) | Returns the metric and relevant parameters you selected. | [optional]
**metric** | [**AnalyticsMetricsBreakdownResponseContextMetricEnum**](#AnalyticsMetricsBreakdownResponseContextMetricEnum) | Returns the metric you selected. | [optional]
**breakdown** | [**AnalyticsMetricsBreakdownResponseContextBreakdownEnum**](#AnalyticsMetricsBreakdownResponseContextBreakdownEnum) | Returns the dimension you selected. | [optional]
**timeframe** | [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.md) | | [optional]

Expand All @@ -20,19 +20,6 @@ PlayRate | &#39;play-rate&#39;
Start | &#39;start&#39;
End | &#39;end&#39;
Impression | &#39;impression&#39;
CcvAverage | &#39;ccv-average&#39;
CcvPeak | &#39;ccv-peak&#39;
UniqueCcvAverage | &#39;unique-ccv-average&#39;
UniqueCcvPeak | &#39;unique-ccv-peak&#39;
View3 | &#39;view-3&#39;
View5 | &#39;view-5&#39;
View10 | &#39;view-10&#39;
View30 | &#39;view-30&#39;
UniqueView | &#39;unique-view&#39;
UniqueView3 | &#39;unique-view-3&#39;
UniqueView5 | &#39;unique-view-5&#39;
UniqueView10 | &#39;unique-view-10&#39;
UniqueView30 | &#39;unique-view-30&#39;



Expand Down
2 changes: 1 addition & 1 deletion docs/model/AnalyticsMetricsOverTimeResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**context** | [**AnalyticsMetricsOverTimeResponseContext**](AnalyticsMetricsOverTimeResponseContext.md) | |
**data** | [**Array&lt;AnalyticsMetricsOverTimeResponseData&gt;**](AnalyticsMetricsOverTimeResponseData.md) | Returns an array of metrics and the timestamps. |
**data** | [**Array&lt;AnalyticsMetricsOverTimeResponseData&gt;**](AnalyticsMetricsOverTimeResponseData.md) | Returns an array of metrics and the timestamps . |
**pagination** | [**Pagination**](Pagination.md) | |


Expand Down
16 changes: 1 addition & 15 deletions docs/model/AnalyticsMetricsOverTimeResponseContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**metric** | [**AnalyticsMetricsOverTimeResponseContextMetricEnum**](#AnalyticsMetricsOverTimeResponseContextMetricEnum) | Returns the metric and relevant parameters you selected. | [optional]
**metric** | [**AnalyticsMetricsOverTimeResponseContextMetricEnum**](#AnalyticsMetricsOverTimeResponseContextMetricEnum) | Returns the metric you selected. | [optional]
**interval** | [**AnalyticsMetricsOverTimeResponseContextIntervalEnum**](#AnalyticsMetricsOverTimeResponseContextIntervalEnum) | Returns the interval you selected. | [optional]
**timeframe** | [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.md) | | [optional]

Expand All @@ -20,27 +20,13 @@ PlayRate | &#39;play-rate&#39;
Start | &#39;start&#39;
End | &#39;end&#39;
Impression | &#39;impression&#39;
CcvAverage | &#39;ccv-average&#39;
CcvPeak | &#39;ccv-peak&#39;
UniqueCcvAverage | &#39;unique-ccv-average&#39;
UniqueCcvPeak | &#39;unique-ccv-peak&#39;
View3 | &#39;view-3&#39;
View5 | &#39;view-5&#39;
View10 | &#39;view-10&#39;
View30 | &#39;view-30&#39;
UniqueView | &#39;unique-view&#39;
UniqueView3 | &#39;unique-view-3&#39;
UniqueView5 | &#39;unique-view-5&#39;
UniqueView10 | &#39;unique-view-10&#39;
UniqueView30 | &#39;unique-view-30&#39;



## Enum: AnalyticsMetricsOverTimeResponseContextIntervalEnum

Name | Value
---- | -----
Minute | &#39;minute&#39;
Hour | &#39;hour&#39;
Day | &#39;day&#39;

Expand Down
1 change: 0 additions & 1 deletion docs/model/FilterBy.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Name | Type | Description | Notes
**operatingSystem** | **Array&lt;string&gt;** | Returns analytics based on the operating system used by the viewers. Response values can include &#x60;windows&#x60;, &#x60;mac osx&#x60;, &#x60;android&#x60;, &#x60;ios&#x60;, &#x60;linux&#x60;. | [optional]
**browser** | **Array&lt;string&gt;** | Returns analytics based on the browser used by the viewers. Response values can include &#x60;chrome&#x60;, &#x60;firefox&#x60;, &#x60;edge&#x60;, &#x60;opera&#x60;. | [optional]
**tag** | **string** | Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). | [optional]
**referrer** | **Array&lt;string&gt;** | Filters data based on the URL where the view is originating from. This filter parameter accepts an empty string to filter view events where no referrer is available. | [optional]



Expand Down
1 change: 0 additions & 1 deletion docs/model/FilterBy1.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Name | Type | Description | Notes
**operatingSystem** | **Array&lt;string&gt;** | Returns analytics based on the operating system used by the viewers. Response values can include &#x60;windows&#x60;, &#x60;mac osx&#x60;, &#x60;android&#x60;, &#x60;ios&#x60;, &#x60;linux&#x60;. | [optional]
**browser** | **Array&lt;string&gt;** | Returns analytics based on the browser used by the viewers. Response values can include &#x60;chrome&#x60;, &#x60;firefox&#x60;, &#x60;edge&#x60;, &#x60;opera&#x60;. | [optional]
**tag** | **string** | Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). | [optional]
**referrer** | **Array&lt;string&gt;** | Filters data based on the URL where the view is originating from. This filter parameter accepts an empty string to filter view events where no referrer is available. | [optional]



Expand Down
1 change: 0 additions & 1 deletion docs/model/FilterBy2.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Name | Type | Description | Notes
**operatingSystem** | **Array&lt;string&gt;** | Returns analytics based on the operating system used by the viewers. Response values can include &#x60;windows&#x60;, &#x60;mac osx&#x60;, &#x60;android&#x60;, &#x60;ios&#x60;, &#x60;linux&#x60;. | [optional]
**browser** | **Array&lt;string&gt;** | Returns analytics based on the browser used by the viewers. Response values can include &#x60;chrome&#x60;, &#x60;firefox&#x60;, &#x60;edge&#x60;, &#x60;opera&#x60;. | [optional]
**tag** | **string** | Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). | [optional]
**referrer** | **Array&lt;string&gt;** | Filters data based on the URL where the view is originating from. This filter parameter accepts an empty string to filter view events where no referrer is available. | [optional]



Expand Down
10 changes: 10 additions & 0 deletions docs/model/SummaryCreationPayload.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**videoId** | **string** | Create a summary of a video using the video ID. |
**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]
**attributes** | [**Array&lt;SummaryCreationPayloadAttributesEnum&gt;**](#Array&lt;SummaryCreationPayloadAttributesEnum&gt;) | Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. | [optional]



Expand All @@ -18,3 +19,12 @@ Auto | &#39;auto&#39;



## Enum: Array&lt;SummaryCreationPayloadAttributesEnum&gt;

Name | Value
---- | -----
Abstract | &#39;abstract&#39;
Takeaways | &#39;takeaways&#39;



1 change: 0 additions & 1 deletion docs/model/SummarySource.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**title** | **string** | A video title, based on the contents of the video. | [optional]
**_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]
**takeaways** | **Array&lt;string&gt;** | A list of 3 key points from the video, in chronological order. | [optional]

Expand Down
1 change: 0 additions & 1 deletion docs/model/SummaryUpdatePayload.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**title** | **string** | A video title, based on the contents of the video. | [optional]
**_abstract** | **string** | A short outline of the contents of the video. | [optional]
**takeaways** | **Array&lt;string&gt;** | A list of 3 key points from the video, in chronological order. | [optional]

Expand Down
10 changes: 10 additions & 0 deletions docs/model/VideoCreationPayload.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Name | Type | Description | Notes
**language** | [**VideoCreationPayloadLanguageEnum**](#VideoCreationPayloadLanguageEnum) | 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. &#x60;language&#x60; is a permanent attribute of the video. You can update it to another language using the [&#x60;PATCH /videos/{videoId}&#x60;](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]
**transcript** | **boolean** | Use this parameter to enable transcription. - When &#x60;true&#x60;, the API generates a transcript for the video. - The default value is &#x60;false&#x60;. - If you define a video language using the &#x60;language&#x60; 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]
**transcriptSummary** | **boolean** | Use this parameter to enable summarization. We recommend using this parameter together with &#x60;transcript: true&#x60;. - When &#x60;true&#x60;, the API generates a summary for the video, based on the transcription. - The default value is &#x60;false&#x60;. - If you define a video language using the &#x60;language&#x60; 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]
**transcriptSummaryAttributes** | [**Array&lt;VideoCreationPayloadTranscriptSummaryAttributesEnum&gt;**](#Array&lt;VideoCreationPayloadTranscriptSummaryAttributesEnum&gt;) | Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. | [optional]



Expand Down Expand Up @@ -62,3 +63,12 @@ Zh | &#39;zh&#39;



## Enum: Array&lt;VideoCreationPayloadTranscriptSummaryAttributesEnum&gt;

Name | Value
---- | -----
Abstract | &#39;abstract&#39;
Takeaways | &#39;takeaways&#39;



10 changes: 10 additions & 0 deletions docs/model/VideoUpdatePayload.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Name | Type | Description | Notes
**language** | [**VideoUpdatePayloadLanguageEnum**](#VideoUpdatePayloadLanguageEnum) | 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. &#x60;language&#x60; is a permanent attribute of the video. You can update it to another language using the [&#x60;PATCH /videos/{videoId}&#x60;](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]
**transcript** | **boolean** | Use this parameter to enable transcription. - When &#x60;true&#x60;, the API generates a transcript for the video. - The default value is &#x60;false&#x60;. - If you define a video language using the &#x60;language&#x60; 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]
**transcriptSummary** | **boolean** | Use this parameter to enable summarization. - When &#x60;true&#x60;, the API generates a summary for the video, based on the transcription. - The default value is &#x60;false&#x60;. - If you define a video language using the &#x60;language&#x60; 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]
**transcriptSummaryAttributes** | [**Array&lt;VideoUpdatePayloadTranscriptSummaryAttributesEnum&gt;**](#Array&lt;VideoUpdatePayloadTranscriptSummaryAttributesEnum&gt;) | Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. | [optional]



Expand Down Expand Up @@ -59,3 +60,12 @@ Zh | &#39;zh&#39;



## Enum: Array&lt;VideoUpdatePayloadTranscriptSummaryAttributesEnum&gt;

Name | Value
---- | -----
Abstract | &#39;abstract&#39;
Takeaways | &#39;takeaways&#39;



2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@api.video/nodejs-client",
"version": "2.6.7",
"version": "2.6.6",
"description": "api.video nodejs API client",
"keywords": [
"api.video",
Expand Down
2 changes: 1 addition & 1 deletion src/HttpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default class HttpClient {
this.chunkSize = params.chunkSize;
this.headers = new AxiosHeaders({
Accept: 'application/json, */*;q=0.8',
'AV-Origin-Client': 'nodejs:2.6.7',
'AV-Origin-Client': 'nodejs:2.6.6',
Authorization: this.apiKey ? `Basic ${encode(`${this.apiKey}:`)}` : '',
...(params.applicationName && params.applicationVersion
? {
Expand Down
3 changes: 3 additions & 0 deletions src/ObjectSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,13 @@ const enumsMap: Set<string> = new Set<string>([
'SummaryOriginEnum',
'SummarySourceStatusEnum',
'SummaryCreationPayloadOriginEnum',
'SummaryCreationPayloadAttributesEnum',
'VideoLanguageOriginEnum',
'VideoCreationPayloadLanguageEnum',
'VideoCreationPayloadTranscriptSummaryAttributesEnum',
'VideoStatusIngestStatusEnum',
'VideoUpdatePayloadLanguageEnum',
'VideoUpdatePayloadTranscriptSummaryAttributesEnum',
]);

const typeMap: { [index: string]: any } = {
Expand Down
Loading

0 comments on commit d3e21ef

Please sign in to comment.