Skip to content

Commit

Permalink
Merge pull request #91 from apivideo/discarded-videos
Browse files Browse the repository at this point in the history
Add discarded videos feature
  • Loading branch information
bot-api-video authored Sep 16, 2024
2 parents 9bfca19 + 01e414c commit 654334d
Show file tree
Hide file tree
Showing 28 changed files with 646 additions and 37 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
All changes to this project will be documented in this file.

## [1.4.2] - 2024-09-16
- Add discarded video endpoints

## [1.4.1] - 2024-09-05
- Add sort parameters in analytics endpoints

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,10 @@ Method | Description | HTTP request
[**list()**](https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/VideosApi.md#list) | List all video objects | **GET** `/videos`
[**uploadThumbnail()**](https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/VideosApi.md#uploadThumbnail) | Upload a thumbnail | **POST** `/videos/{videoId}/thumbnail`
[**pickThumbnail()**](https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/VideosApi.md#pickThumbnail) | Set a thumbnail | **PATCH** `/videos/{videoId}/thumbnail`
[**getDiscarded()**](https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/VideosApi.md#getDiscarded) | Retrieve a discarded video object | **GET** `/discarded/videos/{videoId}`
[**getStatus()**](https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/VideosApi.md#getStatus) | Retrieve video status and details | **GET** `/videos/{videoId}/status`
[**listDiscarded()**](https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/VideosApi.md#listDiscarded) | List all discarded video objects | **GET** `/discarded/videos`
[**updateDiscarded()**](https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/VideosApi.md#updateDiscarded) | Update a discarded video object | **PATCH** `/discarded/videos/{videoId}`


#### WatermarksApi
Expand Down Expand Up @@ -255,6 +258,7 @@ Method | Description | HTTP request
- [CaptionsUpdatePayload](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/CaptionsUpdatePayload.md)
- [Chapter](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/Chapter.md)
- [ChaptersListResponse](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/ChaptersListResponse.md)
- [DiscardedVideoUpdatePayload](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/DiscardedVideoUpdatePayload.md)
- [FilterBy](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/FilterBy.md)
- [FilterBy1](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/FilterBy1.md)
- [FilterBy2](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/FilterBy2.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/Api/LiveStreamsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
`streamKey` | **string**| The unique stream key that allows you to stream videos. | [optional]
`name` | **string**| You can filter live streams by their name or a part of their name. | [optional]
`sortBy` | **string**| Enables you to sort live stream results. Allowed attributes: `name`, `createdAt`, `updatedAt`. `name` - the name of the live stream. `createdAt` - the time a live stream was created. `updatedAt` - the time a live stream was last updated. When using `createdAt` or `updatedAt`, the API sorts the results based on the ISO-8601 time format. | [optional]
`sortBy` | **string**| Enables you to sort live stream results. Allowed attributes: `name`, `createdAt`, `updatedAt`. `name` - the name of the live stream. `createdAt` - the time a live stream was created. `updatedAt` - the time a live stream was last updated. When using `createdAt` or `updatedAt`, the API sorts the results based on the ATOM UTC time format. | [optional]
`sortOrder` | **string**| Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones. For title, it is 0-9 and A-Z ascending and Z-A, 9-0 descending. | [optional]
`currentPage` | **int**| Choose the number of search results to return per page. Minimum value: 1 | [optional] [default to 1]
`pageSize` | **int**| Results per page. Allowed values 1-100, default is 25. | [optional] [default to 25]
Expand Down
2 changes: 1 addition & 1 deletion docs/Api/PlayerThemesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Note: `queryParams` argument is an associative array with the keys listed below.

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
`sortBy` | **string**| createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ISO-8601 format. | [optional]
`sortBy` | **string**| createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ATOM UTC format. | [optional]
`sortOrder` | **string**| Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones. | [optional]
`currentPage` | **int**| Choose the number of search results to return per page. Minimum value: 1 | [optional] [default to 1]
`pageSize` | **int**| Results per page. Allowed values 1-100, default is 25. | [optional] [default to 25]
Expand Down
2 changes: 1 addition & 1 deletion docs/Api/UploadTokensApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Note: `queryParams` argument is an associative array with the keys listed below.

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
`sortBy` | **string**| Allowed: createdAt, ttl. You can use these to sort by when a token was created, or how much longer the token will be active (ttl - time to live). Date and time is presented in ISO-8601 format. | [optional]
`sortBy` | **string**| Allowed: createdAt, ttl. You can use these to sort by when a token was created, or how much longer the token will be active (ttl - time to live). Date and time is presented in ATOM UTC format. | [optional]
`sortOrder` | **string**| Allowed: asc, desc. Ascending is 0-9 or A-Z. Descending is 9-0 or Z-A. | [optional]
`currentPage` | **int**| Choose the number of search results to return per page. Minimum value: 1 | [optional] [default to 1]
`pageSize` | **int**| Results per page. Allowed values 1-100, default is 25. | [optional] [default to 25]
Expand Down
99 changes: 97 additions & 2 deletions docs/Api/VideosApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ Method | Description | HTTP request
[**list()**](VideosApi.md#list) | List all video objects | **GET** /videos
[**uploadThumbnail()**](VideosApi.md#uploadThumbnail) | Upload a thumbnail | **POST** /videos/{videoId}/thumbnail
[**pickThumbnail()**](VideosApi.md#pickThumbnail) | Set a thumbnail | **PATCH** /videos/{videoId}/thumbnail
[**getDiscarded()**](VideosApi.md#getDiscarded) | Retrieve a discarded video object | **GET** /discarded/videos/{videoId}
[**getStatus()**](VideosApi.md#getStatus) | Retrieve video status and details | **GET** /videos/{videoId}/status
[**listDiscarded()**](VideosApi.md#listDiscarded) | List all discarded video objects | **GET** /discarded/videos
[**updateDiscarded()**](VideosApi.md#updateDiscarded) | Update a discarded video object | **PATCH** /discarded/videos/{videoId}


## **`create()` - Create a video object**
Expand Down Expand Up @@ -177,7 +180,7 @@ Name | Type | Description | Notes



If you do not need a video any longer, you can send a request to delete it. All you need is the videoId.
If you do not need a video any longer, you can send a request to delete it. All you need is the videoId. By default, deleted videos cannot be recovered. If you have the Video Restore feature enabled, this operation will discard the video instead of permanently deleting it. Make sure you subscribe to the Video Restore feature if you want to be able to restore deleted videos! The Video Restore feature retains videos for 90 days, after which the videos are permanently deleted

### Arguments

Expand Down Expand Up @@ -216,7 +219,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
`title` | **string**| The title of a specific video you want to find. The search will match exactly to what term you provide and return any videos that contain the same term as part of their titles. | [optional]
`tags` | [**string[]**](../Model/string.md)| A tag is a category you create and apply to videos. You can search for videos with particular tags by listing one or more here. Only videos that have all the tags you list will be returned. | [optional]
`metadata` | [**array<string,string>**](../Model/string.md)| Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata/) allows you to define a key that allows any value pair. | [optional]
`metadata` | [**array<string,string>**](../Model/string.md)| Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter. | [optional]
`description` | **string**| Retrieve video objects by &#x60;description&#x60;. | [optional]
`liveStreamId` | **string**| Retrieve video objects that were recorded from a live stream by &#x60;liveStreamId&#x60;. | [optional]
`sortBy` | **string**| Use this parameter to sort videos by the their created time, published time, updated time, or by title. | [optional]
Expand Down Expand Up @@ -311,6 +314,31 @@ Name | Type | Description | Notes



## **`getDiscarded()` - Retrieve a discarded video object**



This call provides the same information provided on video creation. For private videos, it will generate a unique token url. Use this to retrieve any details you need about a video, or set up a private viewing URL.

### Arguments



Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
`videoId` | **string**| The unique identifier for the video you want details about. |




### Return type

[**\ApiVideo\Client\Model\Video**](../Model/Video.md)





## **`getStatus()` - Retrieve video status and details**


Expand All @@ -335,3 +363,70 @@ Name | Type | Description | Notes




## **`listDiscarded()` - List all discarded video objects**



This method returns a list of your discarded videos (with all their details). With no parameters added, the API returns the first page of all discarded videos. You can filter discarded videos using the parameters described below.

### Arguments





Note: `queryParams` argument is an associative array with the keys listed below.

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
`title` | **string**| The title of a specific video you want to find. The search will match exactly to what term you provide and return any videos that contain the same term as part of their titles. | [optional]
`tags` | [**string[]**](../Model/string.md)| A tag is a category you create and apply to videos. You can search for videos with particular tags by listing one or more here. Only videos that have all the tags you list will be returned. | [optional]
`metadata` | [**array<string,string>**](../Model/string.md)| Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter. | [optional]
`description` | **string**| Retrieve video objects by &#x60;description&#x60;. | [optional]
`liveStreamId` | **string**| Retrieve video objects that were recorded from a live stream by &#x60;liveStreamId&#x60;. | [optional]
`sortBy` | **string**| Use this parameter to sort videos by the their created time, published time, updated time, or by title. | [optional]
`sortOrder` | **string**| 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. | [optional]
`currentPage` | **int**| Choose the number of search results to return per page. Minimum value: 1 | [optional] [default to 1]
`pageSize` | **int**| Results per page. Allowed values 1-100, default is 25. | [optional] [default to 25]






### Return type

[**\ApiVideo\Client\Model\VideosListResponse**](../Model/VideosListResponse.md)





## **`updateDiscarded()` - Update a discarded video object**



Use this endpoint to restore a discarded video when you have the Video Restore feature enabled.



### Arguments



Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
`videoId` | **string**| The video ID for the video you want to restore. |
`discardedVideoUpdatePayload` | [**\ApiVideo\Client\Model\DiscardedVideoUpdatePayload**](../Model/DiscardedVideoUpdatePayload.md)| |




### Return type

[**\ApiVideo\Client\Model\Video**](../Model/Video.md)




9 changes: 9 additions & 0 deletions docs/Model/DiscardedVideoUpdatePayload.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# # DiscardedVideoUpdatePayload

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**discarded** | **bool** | Use this parameter to restore a discarded video when you have the Video Restore feature enabled. This parameter only accepts &#x60;false&#x60; as a value! | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
4 changes: 2 additions & 2 deletions docs/Model/LiveStream.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Name | Type | Description | Notes
**playerId** | **string** | The unique identifier for the player. | [optional]
**broadcasting** | **bool** | Whether or not you are broadcasting the live video you recorded for others to see. True means you are broadcasting to viewers, false means you are not. | [optional]
**restreams** | [**\ApiVideo\Client\Model\RestreamsResponseObject[]**](RestreamsResponseObject.md) | Returns the list of restream destinations. |
**createdAt** | [**\DateTime**](\DateTime.md) | When the player was created, presented in ISO-8601 format. | [optional]
**updatedAt** | [**\DateTime**](\DateTime.md) | When the player was last updated, presented in ISO-8601 format. | [optional]
**createdAt** | [**\DateTime**](\DateTime.md) | When the player was created, presented in ATOM UTC format. | [optional]
**updatedAt** | [**\DateTime**](\DateTime.md) | When the player was last updated, presented in ATOM UTC format. | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
2 changes: 1 addition & 1 deletion docs/Model/PlayerSessionEvent.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **string** | Possible values are: ready, play, pause, resume, seek.backward, seek.forward, end | [optional]
**emittedAt** | [**\DateTime**](\DateTime.md) | When an event occurred, presented in ISO-8601 format. | [optional]
**emittedAt** | [**\DateTime**](\DateTime.md) | When an event occurred, presented in ATOM UTC format. | [optional]
**at** | **int** | | [optional]
**from** | **int** | | [optional]
**to** | **int** | | [optional]
Expand Down
4 changes: 2 additions & 2 deletions docs/Model/PlayerTheme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Name | Type | Description | Notes
**hideTitle** | **bool** | enable/disable title. Default: false | [optional]
**forceLoop** | **bool** | enable/disable looping. Default: false | [optional]
**playerId** | **string** | |
**createdAt** | [**\DateTime**](\DateTime.md) | When the player was created, presented in ISO-8601 format. | [optional]
**updatedAt** | [**\DateTime**](\DateTime.md) | When the player was last updated, presented in ISO-8601 format. | [optional]
**createdAt** | [**\DateTime**](\DateTime.md) | When the player was created, presented in ATOM UTC format. | [optional]
**updatedAt** | [**\DateTime**](\DateTime.md) | When the player was last updated, presented in ATOM UTC format. | [optional]
**assets** | [**\ApiVideo\Client\Model\PlayerThemeAssets**](PlayerThemeAssets.md) | | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
4 changes: 2 additions & 2 deletions docs/Model/UploadToken.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**token** | **string** | The unique identifier for the token you will use to authenticate an upload. | [optional]
**ttl** | **int** | Time-to-live - how long the upload token is valid for. | [optional]
**createdAt** | [**\DateTime**](\DateTime.md) | When the token was created, displayed in ISO-8601 format. | [optional]
**expiresAt** | [**\DateTime**](\DateTime.md) | When the token expires, displayed in ISO-8601 format. | [optional]
**createdAt** | [**\DateTime**](\DateTime.md) | When the token was created, displayed in ATOM UTC format. | [optional]
**expiresAt** | [**\DateTime**](\DateTime.md) | When the token expires, displayed in ATOM UTC format. | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
11 changes: 7 additions & 4 deletions docs/Model/Video.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**videoId** | **string** | The unique identifier of the video object. |
**createdAt** | [**\DateTime**](\DateTime.md) | When a video was created, presented in ISO-8601 format. | [optional]
**createdAt** | [**\DateTime**](\DateTime.md) | When a video was created, presented in ATOM UTC format. | [optional]
**title** | **string** | The title of the video content. | [optional]
**description** | **string** | A description for the video content. | [optional]
**publishedAt** | [**\DateTime**](\DateTime.md) | The date and time the API created the video. Date and time are provided using ISO-8601 UTC format. | [optional]
**updatedAt** | [**\DateTime**](\DateTime.md) | The date and time the video was updated. Date and time are provided using ISO-8601 UTC format. | [optional]
**publishedAt** | [**\DateTime**](\DateTime.md) | The date and time the API created the video. Date and time are provided using ATOM UTC format. | [optional]
**updatedAt** | [**\DateTime**](\DateTime.md) | The date and time the video was updated. Date and time are provided using ATOM UTC format. | [optional]
**discardedAt** | [**\DateTime**](\DateTime.md) | The date and time the video was discarded. The API populates this field only if you have the Video Restore feature enabled and discard a video. Date and time are provided using ATOM UTC format. | [optional]
**deletesAt** | [**\DateTime**](\DateTime.md) | The date and time the video will be permanently deleted. The API populates this field only if you have the Video Restore feature enabled and discard a video. Discarded videos are pemanently deleted after 90 days. Date and time are provided using ATOM UTC format. | [optional]
**discarded** | **bool** | Returns &#x60;true&#x60; for videos you discarded when you have the Video Restore feature enabled. Returns &#x60;false&#x60; for every other video. | [optional]
**tags** | **string[]** | One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces. | [optional]
**metadata** | [**\ApiVideo\Client\Model\Metadata[]**](Metadata.md) | Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata/) allows you to define a key that allows any value pair. | [optional]
**metadata** | [**\ApiVideo\Client\Model\Metadata[]**](Metadata.md) | Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. | [optional]
**source** | [**\ApiVideo\Client\Model\VideoSource**](VideoSource.md) | | [optional]
**assets** | [**\ApiVideo\Client\Model\VideoAssets**](VideoAssets.md) | | [optional]
**playerId** | **string** | The id of the player that will be applied on the video. | [optional]
Expand Down
Loading

0 comments on commit 654334d

Please sign in to comment.