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

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
2 changes: 1 addition & 1 deletion .openapi-generator/oas_apivideo.yaml-defaut-cli.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5f3de7eed3d5a2900fd1d2d119c814cf00ac4e957ba0388f06acaf22f51e8e62
5ec6b63f3aacb48fd403e5ff1ba7674b60e65b4581e31d3b33fb0aa0a7fe6f01
7 changes: 6 additions & 1 deletion Sources/Models/VideoCreationPayload.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public struct VideoCreationPayload: Codable, Hashable {
}
/** The title of your new video. */
public var title: String
/** A subtitle for your video. */
public var subtitle: String?
/** A brief description of your video. */
public var description: 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. */
Expand Down Expand Up @@ -80,8 +82,9 @@ public struct VideoCreationPayload: Codable, Hashable {
/** Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. The possible values are `abstract` and `takeaways`. */
public var transcriptSummaryAttributes: [TranscriptSummaryAttributes]?

public init(title: String, description: String? = nil, source: String? = nil, _public: Bool? = true, panoramic: Bool? = false, mp4Support: Bool? = true, playerId: String? = nil, tags: [String]? = nil, metadata: [Metadata]? = nil, clip: VideoClip? = nil, watermark: VideoWatermark? = nil, language: Language? = nil, transcript: Bool? = nil, transcriptSummary: Bool? = nil, transcriptSummaryAttributes: [TranscriptSummaryAttributes]? = nil) {
public init(title: String, subtitle: String? = nil, description: String? = nil, source: String? = nil, _public: Bool? = true, panoramic: Bool? = false, mp4Support: Bool? = true, playerId: String? = nil, tags: [String]? = nil, metadata: [Metadata]? = nil, clip: VideoClip? = nil, watermark: VideoWatermark? = nil, language: Language? = nil, transcript: Bool? = nil, transcriptSummary: Bool? = nil, transcriptSummaryAttributes: [TranscriptSummaryAttributes]? = nil) {
self.title = title
self.subtitle = subtitle
self.description = description
self.source = source
self._public = _public
Expand All @@ -100,6 +103,7 @@ public struct VideoCreationPayload: Codable, Hashable {

public enum CodingKeys: String, CodingKey, CaseIterable {
case title
case subtitle
case description
case source
case _public = "public"
Expand All @@ -121,6 +125,7 @@ public struct VideoCreationPayload: Codable, Hashable {
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(title, forKey: .title)
try container.encodeIfPresent(subtitle, forKey: .subtitle)
try container.encodeIfPresent(description, forKey: .description)
try container.encodeIfPresent(source, forKey: .source)
try container.encodeIfPresent(_public, forKey: ._public)
Expand Down
1 change: 1 addition & 0 deletions docs/VideoCreationPayload.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,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** | **Bool** | 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] [default to true]
Expand Down
2 changes: 1 addition & 1 deletion docs/VideosAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Creates a video object. More information on video objects can be found [here](ht
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ApiVideoClient

let videoCreationPayload = VideoCreationPayload(title: "title_example", description: "description_example", source: "source_example", _public: true, panoramic: false, mp4Support: true, playerId: "playerId_example", tags: ["tags_example"], metadata: [Metadata(key: "key_example", value: "value_example")], clip: VideoClip(startTimecode: "startTimecode_example", endTimecode: "endTimecode_example"), watermark: VideoWatermark(id: "id_example", top: "top_example", _left: "_left_example", bottom: "bottom_example", _right: "_right_example", width: "width_example", height: "height_example", opacity: "opacity_example"), language: "language_example", transcript: false, transcriptSummary: false, transcriptSummaryAttributes: ["transcriptSummaryAttributes_example"]) // VideoCreationPayload | video to create
let videoCreationPayload = VideoCreationPayload(title: "title_example", subtitle: "subtitle_example", description: "description_example", source: "source_example", _public: true, panoramic: false, mp4Support: true, playerId: "playerId_example", tags: ["tags_example"], metadata: [Metadata(key: "key_example", value: "value_example")], clip: VideoClip(startTimecode: "startTimecode_example", endTimecode: "endTimecode_example"), watermark: VideoWatermark(id: "id_example", top: "top_example", _left: "_left_example", bottom: "bottom_example", _right: "_right_example", width: "width_example", height: "height_example", opacity: "opacity_example"), language: "language_example", transcript: false, transcriptSummary: false, transcriptSummaryAttributes: ["transcriptSummaryAttributes_example"]) // VideoCreationPayload | video to create

// Create a video object
VideosAPI.create(videoCreationPayload: videoCreationPayload) { (response, error) in
Expand Down
Loading