Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add subtitle in video creation payload #138

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.8] - 2025-01-27
- Add subtitle attribute in video creation payload

## [1.4.7] - 2024-11-06
- AI summary updates

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>video.api</groupId>
<artifactId>java-api-client</artifactId>
<version>1.4.7</version>
<version>1.4.8</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -80,7 +80,7 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:

```groovy
implementation "video.api:java-api-client:1.4.7"
implementation "video.api:java-api-client:1.4.8"
```

#### Others
Expand All @@ -93,7 +93,7 @@ mvn clean package

Then manually install the following JARs:

* `target/java-api-client-1.4.7.jar`
* `target/java-api-client-1.4.8.jar`
* `target/lib/*.jar`

### Code sample
Expand Down
4 changes: 4 additions & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16680,6 +16680,10 @@ components:
description: The title of your new video.
example: Maths video
type: string
subtitle:
description: A subtitle for your video.
example: A great subtitle.
type: string
description:
description: A brief description of your video.
example: A video about string theory.
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apply plugin: 'com.diffplug.spotless'
apply plugin: 'maven-publish'

group = 'video.api'
version = '1.4.7'
version = '1.4.8'

buildscript {
repositories {
Expand Down
1 change: 1 addition & 0 deletions docs/VideoCreationPayload.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**title** | **String** | The title of your new video. |
**subtitle** | **String** | A subtitle for your video. | [optional]
**description** | **String** | A brief description of your video. | [optional]
**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]
**_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]
Expand Down
1 change: 1 addition & 0 deletions docs/VideosApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public class Example {

VideoCreationPayload videoCreationPayload = new VideoCreationPayload(); // video to create
videoCreationPayload.setTitle("Maths video"); // The title of your new video.
videoCreationPayload.setSubtitle("A great subtitle."); // A subtitle for your video.
videoCreationPayload.setDescription("A video about string theory."); // A brief description of your video.
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.
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)
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>java-api-client</artifactId>
<packaging>jar</packaging>
<name>${project.groupId}:${project.artifactId}</name>
<version>1.4.7</version>
<version>1.4.8</version>
<url>https://github.com/apivideo/api.video-java-client</url>
<description>api.video Java API client</description>
<scm>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/video/api/client/api/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private OkHttpClient initHttpClient(List<Interceptor> interceptors) {
private void init() {
verifyingSsl = true;
json = new JSON();
addDefaultHeader("AV-Origin-Client", "java:1.4.7");
addDefaultHeader("AV-Origin-Client", "java:1.4.8");
}

private boolean isValid(String regex, String field) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ public class VideoCreationPayload implements Serializable, DeepObject {
@SerializedName(SERIALIZED_NAME_TITLE)
private String title;

public static final String SERIALIZED_NAME_SUBTITLE = "subtitle";
@SerializedName(SERIALIZED_NAME_SUBTITLE)
private String subtitle;

public static final String SERIALIZED_NAME_DESCRIPTION = "description";
@SerializedName(SERIALIZED_NAME_DESCRIPTION)
private String description;
Expand Down Expand Up @@ -277,6 +281,27 @@ public void setTitle(String title) {
this.title = title;
}

public VideoCreationPayload subtitle(String subtitle) {
this.subtitle = subtitle;
return this;
}

/**
* A subtitle for your video.
*
* @return subtitle
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "A great subtitle.", value = "A subtitle for your video.")

public String getSubtitle() {
return subtitle;
}

public void setSubtitle(String subtitle) {
this.subtitle = subtitle;
}

public VideoCreationPayload description(String description) {
this.description = description;
return this;
Expand Down Expand Up @@ -625,6 +650,7 @@ public boolean equals(Object o) {
}
VideoCreationPayload videoCreationPayload = (VideoCreationPayload) o;
return Objects.equals(this.title, videoCreationPayload.title)
&& Objects.equals(this.subtitle, videoCreationPayload.subtitle)
&& Objects.equals(this.description, videoCreationPayload.description)
&& Objects.equals(this.source, videoCreationPayload.source)
&& Objects.equals(this._public, videoCreationPayload._public)
Expand All @@ -643,15 +669,16 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(title, description, source, _public, panoramic, mp4Support, playerId, tags, metadata, clip,
watermark, language, transcript, transcriptSummary, transcriptSummaryAttributes);
return Objects.hash(title, subtitle, description, source, _public, panoramic, mp4Support, playerId, tags,
metadata, clip, watermark, language, transcript, transcriptSummary, transcriptSummaryAttributes);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class VideoCreationPayload {\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" subtitle: ").append(toIndentedString(subtitle)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" source: ").append(toIndentedString(source)).append("\n");
sb.append(" _public: ").append(toIndentedString(_public)).append("\n");
Expand Down
Loading