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 #134

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
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
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 `videoId` 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 `false` 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 `videoId` 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 `false` 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
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