Skip to content

Commit d8cbe0c

Browse files
Add subtitle in video creation payload
1 parent 1bad85e commit d8cbe0c

File tree

9 files changed

+44
-8
lines changed

9 files changed

+44
-8
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+
## [1.4.8] - 2025-01-27
5+
- Add subtitle attribute in video creation payload
6+
47
## [1.4.7] - 2024-11-06
58
- AI summary updates
69

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Add this dependency to your project's POM:
7070
<dependency>
7171
<groupId>video.api</groupId>
7272
<artifactId>java-api-client</artifactId>
73-
<version>1.4.7</version>
73+
<version>1.4.8</version>
7474
<scope>compile</scope>
7575
</dependency>
7676
```
@@ -80,7 +80,7 @@ Add this dependency to your project's POM:
8080
Add this dependency to your project's build file:
8181

8282
```groovy
83-
implementation "video.api:java-api-client:1.4.7"
83+
implementation "video.api:java-api-client:1.4.8"
8484
```
8585

8686
#### Others
@@ -93,7 +93,7 @@ mvn clean package
9393

9494
Then manually install the following JARs:
9595

96-
* `target/java-api-client-1.4.7.jar`
96+
* `target/java-api-client-1.4.8.jar`
9797
* `target/lib/*.jar`
9898

9999
### Code sample

api/openapi.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16680,6 +16680,10 @@ components:
1668016680
description: The title of your new video.
1668116681
example: Maths video
1668216682
type: string
16683+
subtitle:
16684+
description: A subtitle for your video.
16685+
example: A great subtitle.
16686+
type: string
1668316687
description:
1668416688
description: A brief description of your video.
1668516689
example: A video about string theory.

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apply plugin: 'com.diffplug.spotless'
44
apply plugin: 'maven-publish'
55

66
group = 'video.api'
7-
version = '1.4.7'
7+
version = '1.4.8'
88

99
buildscript {
1010
repositories {

docs/VideoCreationPayload.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
Name | Type | Description | Notes
88
------------ | ------------- | ------------- | -------------
99
**title** | **String** | The title of your new video. |
10+
**subtitle** | **String** | A subtitle for your video. | [optional]
1011
**description** | **String** | A brief description of your video. | [optional]
1112
**source** | **String** | You can either add a video already on the web, by entering the URL of the video, or you can also enter the &#x60;videoId&#x60; of one of the videos you already have on your api.video acccount, and this will generate a copy of your video. Creating a copy of a video can be especially useful if you want to keep your original video and trim or apply a watermark onto the copy you would create. | [optional]
1213
**_public** | **Boolean** | Default: True. If set to &#x60;false&#x60; the video will become private. More information on private videos can be found [here](https://docs.api.video/delivery/video-privacy-access-management) | [optional]

docs/VideosApi.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public class Example {
4848

4949
VideoCreationPayload videoCreationPayload = new VideoCreationPayload(); // video to create
5050
videoCreationPayload.setTitle("Maths video"); // The title of your new video.
51+
videoCreationPayload.setSubtitle("A great subtitle."); // A subtitle for your video.
5152
videoCreationPayload.setDescription("A video about string theory."); // A brief description of your video.
5253
videoCreationPayload.setSource("https://www.myvideo.url.com/video.mp4 OR vi4k0jvEUuaTdRAEjQ4JfOyl"); // You can either add a video already on the web, by entering the URL of the video, or you can also enter the &#x60;videoId&#x60; of one of the videos you already have on your api.video acccount, and this will generate a copy of your video. Creating a copy of a video can be especially useful if you want to keep your original video and trim or apply a watermark onto the copy you would create.
5354
videoCreationPayload.setPublic(true); // Default: True. If set to &#x60;false&#x60; the video will become private. More information on private videos can be found [here](https://docs.api.video/delivery/video-privacy-access-management)

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>java-api-client</artifactId>
66
<packaging>jar</packaging>
77
<name>${project.groupId}:${project.artifactId}</name>
8-
<version>1.4.7</version>
8+
<version>1.4.8</version>
99
<url>https://github.com/apivideo/api.video-java-client</url>
1010
<description>api.video Java API client</description>
1111
<scm>

src/main/java/video/api/client/api/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ private OkHttpClient initHttpClient(List<Interceptor> interceptors) {
120120
private void init() {
121121
verifyingSsl = true;
122122
json = new JSON();
123-
addDefaultHeader("AV-Origin-Client", "java:1.4.7");
123+
addDefaultHeader("AV-Origin-Client", "java:1.4.8");
124124
}
125125

126126
private boolean isValid(String regex, String field) {

src/main/java/video/api/client/api/models/VideoCreationPayload.java

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ public class VideoCreationPayload implements Serializable, DeepObject {
3939
@SerializedName(SERIALIZED_NAME_TITLE)
4040
private String title;
4141

42+
public static final String SERIALIZED_NAME_SUBTITLE = "subtitle";
43+
@SerializedName(SERIALIZED_NAME_SUBTITLE)
44+
private String subtitle;
45+
4246
public static final String SERIALIZED_NAME_DESCRIPTION = "description";
4347
@SerializedName(SERIALIZED_NAME_DESCRIPTION)
4448
private String description;
@@ -277,6 +281,27 @@ public void setTitle(String title) {
277281
this.title = title;
278282
}
279283

284+
public VideoCreationPayload subtitle(String subtitle) {
285+
this.subtitle = subtitle;
286+
return this;
287+
}
288+
289+
/**
290+
* A subtitle for your video.
291+
*
292+
* @return subtitle
293+
**/
294+
@javax.annotation.Nullable
295+
@ApiModelProperty(example = "A great subtitle.", value = "A subtitle for your video.")
296+
297+
public String getSubtitle() {
298+
return subtitle;
299+
}
300+
301+
public void setSubtitle(String subtitle) {
302+
this.subtitle = subtitle;
303+
}
304+
280305
public VideoCreationPayload description(String description) {
281306
this.description = description;
282307
return this;
@@ -625,6 +650,7 @@ public boolean equals(Object o) {
625650
}
626651
VideoCreationPayload videoCreationPayload = (VideoCreationPayload) o;
627652
return Objects.equals(this.title, videoCreationPayload.title)
653+
&& Objects.equals(this.subtitle, videoCreationPayload.subtitle)
628654
&& Objects.equals(this.description, videoCreationPayload.description)
629655
&& Objects.equals(this.source, videoCreationPayload.source)
630656
&& Objects.equals(this._public, videoCreationPayload._public)
@@ -643,15 +669,16 @@ public boolean equals(Object o) {
643669

644670
@Override
645671
public int hashCode() {
646-
return Objects.hash(title, description, source, _public, panoramic, mp4Support, playerId, tags, metadata, clip,
647-
watermark, language, transcript, transcriptSummary, transcriptSummaryAttributes);
672+
return Objects.hash(title, subtitle, description, source, _public, panoramic, mp4Support, playerId, tags,
673+
metadata, clip, watermark, language, transcript, transcriptSummary, transcriptSummaryAttributes);
648674
}
649675

650676
@Override
651677
public String toString() {
652678
StringBuilder sb = new StringBuilder();
653679
sb.append("class VideoCreationPayload {\n");
654680
sb.append(" title: ").append(toIndentedString(title)).append("\n");
681+
sb.append(" subtitle: ").append(toIndentedString(subtitle)).append("\n");
655682
sb.append(" description: ").append(toIndentedString(description)).append("\n");
656683
sb.append(" source: ").append(toIndentedString(source)).append("\n");
657684
sb.append(" _public: ").append(toIndentedString(_public)).append("\n");

0 commit comments

Comments
 (0)