Skip to content

Commit 21571de

Browse files
Merge pull request #54 from apivideo/add-player-theme-name
feat(all): a name property in player themes
2 parents 3f40c5a + 41cc98a commit 21571de

15 files changed

+66
-22
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.1.0] - 2021-12-06
5+
- Add `name` attribute in player themes
6+
47
## [2.0.14] - 2021-12-03
58
- Fix ProgressiveSession import
69

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ Method | HTTP request | Description
166166
------------- | ------------- | -------------
167167
[**delete**](doc/api/PlayerThemesApi.md#delete) | **DELETE** /players/{playerId} | Delete a player
168168
[**deleteLogo**](doc/api/PlayerThemesApi.md#deleteLogo) | **DELETE** /players/{playerId}/logo | Delete logo
169-
[**list**](doc/api/PlayerThemesApi.md#list) | **GET** /players | List all players
169+
[**list**](doc/api/PlayerThemesApi.md#list) | **GET** /players | List all player themes
170170
[**get**](doc/api/PlayerThemesApi.md#get) | **GET** /players/{playerId} | Show a player
171171
[**update**](doc/api/PlayerThemesApi.md#update) | **PATCH** /players/{playerId} | Update a player
172172
[**create**](doc/api/PlayerThemesApi.md#create) | **POST** /players | Create a player

doc/api/PlayerThemesApi.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**delete**](PlayerThemesApi.md#delete) | **DELETE** /players/{playerId} | Delete a player
88
[**deleteLogo**](PlayerThemesApi.md#deleteLogo) | **DELETE** /players/{playerId}/logo | Delete logo
9-
[**list**](PlayerThemesApi.md#list) | **GET** /players | List all players
9+
[**list**](PlayerThemesApi.md#list) | **GET** /players | List all player themes
1010
[**get**](PlayerThemesApi.md#get) | **GET** /players/{playerId} | Show a player
1111
[**update**](PlayerThemesApi.md#update) | **PATCH** /players/{playerId} | Update a player
1212
[**create**](PlayerThemesApi.md#create) | **POST** /players | Create a player
@@ -123,7 +123,7 @@ Name | Type | Description | Notes
123123

124124
Name | Type | Description | Notes
125125
------------- | ------------- | ------------- | -------------
126-
**sortBy** | **'createdAt' | 'updatedAt'**| 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] [default to undefined] [enum: createdAt, updatedAt]
126+
**sortBy** | **'name' | 'createdAt' | 'updatedAt'**| 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] [default to undefined] [enum: name, createdAt, updatedAt]
127127
**sortOrder** | **'asc' | 'desc'**| Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones. | [optional] [default to undefined] [enum: asc, desc]
128128
**currentPage** | **number**| Choose the number of search results to return per page. Minimum value: 1 | [optional] [default to 1]
129129
**pageSize** | **number**| Results per page. Allowed values 1-100, default is 25. | [optional] [default to 25]
@@ -195,6 +195,7 @@ Name | Type | Description | Notes
195195

196196
const playerId = 'pl45d5vFFGrfdsdsd156dGhh'; // The unique identifier for the player.
197197
const playerThemeUpdatePayload = {
198+
name: "name_example", // Add a name for your player theme here.
198199
text: "text_example", // RGBA color for timer text. Default: rgba(255, 255, 255, 1)
199200
link: "link_example", // RGBA color for all controls. Default: rgba(255, 255, 255, 1)
200201
linkHover: "linkHover_example", // RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1)
@@ -252,6 +253,7 @@ Name | Type | Description | Notes
252253
const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" });
253254

254255
const playerThemeCreationPayload = {
256+
name: "name_example", // Add a name for your player theme here.
255257
text: "text_example", // RGBA color for timer text. Default: rgba(255, 255, 255, 1)
256258
link: "link_example", // RGBA color for all controls. Default: rgba(255, 255, 255, 1)
257259
linkHover: "linkHover_example", // RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1)

doc/model/PlayerTheme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8+
**name** | **string** | The name of the player theme | [optional]
89
**text** | **string** | RGBA color for timer text. Default: rgba(255, 255, 255, 1) | [optional]
910
**link** | **string** | RGBA color for all controls. Default: rgba(255, 255, 255, 1) | [optional]
1011
**linkHover** | **string** | RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1) | [optional]

doc/model/PlayerThemeCreationPayload.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8+
**name** | **string** | Add a name for your player theme here. | [optional]
89
**text** | **string** | RGBA color for timer text. Default: rgba(255, 255, 255, 1) | [optional]
910
**link** | **string** | RGBA color for all controls. Default: rgba(255, 255, 255, 1) | [optional]
1011
**linkHover** | **string** | RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1) | [optional]

doc/model/PlayerThemeUpdatePayload.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8+
**name** | **string** | Add a name for your player theme here. | [optional]
89
**text** | **string** | RGBA color for timer text. Default: rgba(255, 255, 255, 1) | [optional]
910
**link** | **string** | RGBA color for all controls. Default: rgba(255, 255, 255, 1) | [optional]
1011
**linkHover** | **string** | RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1) | [optional]

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@api.video/nodejs-client",
3-
"version": "2.0.14",
3+
"version": "2.1.0",
44
"description": "api.video nodejs client",
55
"author": "api.video ecosystem team",
66
"repository": {

src/HttpClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default class HttpClient {
3737
this.chunkSize = params.chunkSize;
3838
this.tokenType = 'Bearer';
3939
this.headers = {
40-
'User-Agent': `api.video client (nodejs; v:2.0.14; )`,
40+
'User-Agent': `api.video client (nodejs; v:2.1.0; )`,
4141
Accept: 'application/json, */*;q=0.8',
4242
};
4343
this.baseRequest = got.extend({

src/api/PlayerThemesApi.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ export default class PlayerThemesApi {
111111
}
112112

113113
/**
114-
* Retrieve a list of all the players you created, as well as details about each one. Tutorials that use the [player endpoint](https://api.video/blog/endpoints/player).
115-
* List all players
114+
* Retrieve a list of all the player themes you created, as well as details about each one. Tutorials that use the [player endpoint](https://api.video/blog/endpoints/player).
115+
* List all player themes
116116
* @param {Object} searchParams
117-
* @param { 'createdAt' | 'updatedAt' } searchParams.sortBy 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.
117+
* @param { 'name' | 'createdAt' | 'updatedAt' } searchParams.sortBy 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.
118118
* @param { 'asc' | 'desc' } searchParams.sortOrder Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones.
119119
* @param { number } searchParams.currentPage Choose the number of search results to return per page. Minimum value: 1
120120
* @param { number } searchParams.pageSize Results per page. Allowed values 1-100, default is 25.
@@ -125,7 +125,7 @@ export default class PlayerThemesApi {
125125
currentPage,
126126
pageSize,
127127
}: {
128-
sortBy?: 'createdAt' | 'updatedAt';
128+
sortBy?: 'name' | 'createdAt' | 'updatedAt';
129129
sortOrder?: 'asc' | 'desc';
130130
currentPage?: number;
131131
pageSize?: number;
@@ -141,7 +141,11 @@ export default class PlayerThemesApi {
141141
if (sortBy !== undefined) {
142142
urlSearchParams.append(
143143
'sortBy',
144-
ObjectSerializer.serialize(sortBy, "'createdAt' | 'updatedAt'", '')
144+
ObjectSerializer.serialize(
145+
sortBy,
146+
"'name' | 'createdAt' | 'updatedAt'",
147+
''
148+
)
145149
);
146150
}
147151
if (sortOrder !== undefined) {

0 commit comments

Comments
 (0)