Skip to content

Commit

Permalink
Add transcript feature
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierapivideo authored Oct 7, 2024
1 parent b52fb91 commit 7fd5544
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
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 @@
49fece4f39cb92341dc77e0eb7371a152903bf6aebcfa250d289efc9018b0f72
408ded0eac343dc4e06f2885cbfff90ed5b358f8841ee006d063b93ab0fb7f9b
16 changes: 15 additions & 1 deletion Sources/Models/Video.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ import AnyCodable

public struct Video: Codable, Hashable {

public enum LanguageOrigin: String, Codable, CaseIterable {
case api = "api"
case auto = "auto"
}
/** The unique identifier of the video object. */
public var videoId: String
/** When a video was created, presented in ATOM UTC format. */
Expand All @@ -30,6 +34,10 @@ public struct Video: Codable, Hashable {
public var deletesAt: Date?
/** Returns `true` for videos you discarded when you have the Video Restore feature enabled. Returns `false` for every other video. */
public var discarded: Bool?
/** Returns the language of a video in [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. You can set the language during video creation via the API, otherwise it is detected automatically. */
public var language: String?
/** Returns the origin of the last update on the video's `language` attribute. - `api` means that the last update was requested from the API. - `auto` means that the last update was done automatically by the API. */
public var languageOrigin: LanguageOrigin?
/** One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces. */
public var tags: [String]?
/** Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. */
Expand All @@ -45,7 +53,7 @@ public struct Video: Codable, Hashable {
/** This lets you know whether mp4 is supported. If enabled, an mp4 URL will be provided in the response for the video. */
public var mp4Support: Bool?

public init(videoId: String, createdAt: Date? = nil, title: String? = nil, description: String? = nil, publishedAt: Date? = nil, updatedAt: Date? = nil, discardedAt: Date? = nil, deletesAt: Date? = nil, discarded: Bool? = nil, tags: [String]? = nil, metadata: [Metadata]? = nil, source: VideoSource? = nil, assets: VideoAssets? = nil, playerId: String? = nil, _public: Bool? = nil, panoramic: Bool? = nil, mp4Support: Bool? = nil) {
public init(videoId: String, createdAt: Date? = nil, title: String? = nil, description: String? = nil, publishedAt: Date? = nil, updatedAt: Date? = nil, discardedAt: Date? = nil, deletesAt: Date? = nil, discarded: Bool? = nil, language: String? = nil, languageOrigin: LanguageOrigin? = nil, tags: [String]? = nil, metadata: [Metadata]? = nil, source: VideoSource? = nil, assets: VideoAssets? = nil, playerId: String? = nil, _public: Bool? = nil, panoramic: Bool? = nil, mp4Support: Bool? = nil) {
self.videoId = videoId
self.createdAt = createdAt
self.title = title
Expand All @@ -55,6 +63,8 @@ public struct Video: Codable, Hashable {
self.discardedAt = discardedAt
self.deletesAt = deletesAt
self.discarded = discarded
self.language = language
self.languageOrigin = languageOrigin
self.tags = tags
self.metadata = metadata
self.source = source
Expand All @@ -75,6 +85,8 @@ public struct Video: Codable, Hashable {
case discardedAt
case deletesAt
case discarded
case language
case languageOrigin
case tags
case metadata
case source
Expand All @@ -98,6 +110,8 @@ public struct Video: Codable, Hashable {
try container.encodeIfPresent(discardedAt, forKey: .discardedAt)
try container.encodeIfPresent(deletesAt, forKey: .deletesAt)
try container.encodeIfPresent(discarded, forKey: .discarded)
try container.encodeIfPresent(language, forKey: .language)
try container.encodeIfPresent(languageOrigin, forKey: .languageOrigin)
try container.encodeIfPresent(tags, forKey: .tags)
try container.encodeIfPresent(metadata, forKey: .metadata)
try container.encodeIfPresent(source, forKey: .source)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"playerId" : "pl45KFKdlddgk654dspkze",
"title" : "Maths video",
"description" : "An amazing video explaining the string theory",
"language" : "en",
"public" : false,
"panoramic" : false,
"tags" : [ "maths", "string theory", "video" ],
Expand Down
2 changes: 2 additions & 0 deletions docs/Video.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Name | Type | Description | Notes
**discardedAt** | **Date** | The date and time the video was discarded. The API populates this field only if you have the Video Restore feature enabled and discard a video. Date and time are provided using ATOM UTC format. | [optional]
**deletesAt** | **Date** | The date and time the video will be permanently deleted. The API populates this field only if you have the Video Restore feature enabled and discard a video. Discarded videos are pemanently deleted after 90 days. Date and time are provided using ATOM UTC format. | [optional]
**discarded** | **Bool** | Returns `true` for videos you discarded when you have the Video Restore feature enabled. Returns `false` for every other video. | [optional]
**language** | **String** | Returns the language of a video in [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. You can set the language during video creation via the API, otherwise it is detected automatically. | [optional]
**languageOrigin** | **String** | Returns the origin of the last update on the video's `language` attribute. - `api` means that the last update was requested from the API. - `auto` means that the last update was done automatically by the API. | [optional]
**tags** | **[String]** | One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces. | [optional]
**metadata** | [Metadata] | Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. | [optional]
**source** | [**VideoSource**](VideoSource.md) | | [optional]
Expand Down

0 comments on commit 7fd5544

Please sign in to comment.