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 discarded videos feature #96

Merged
merged 1 commit into from
Sep 16, 2024
Merged
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 @@
b89163ac996bc8f2bcaf0a054a6a9c28de9b0cf52e16fbcb17055f42852e2a57
17ac0a7b292afb851962592fd7280e7727bb901d5d4e2a3f75808aa76a1ecdf5
25 changes: 20 additions & 5 deletions Sources/Models/Video.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,25 @@ public struct Video: Codable, Hashable {

/** The unique identifier of the video object. */
public var videoId: String
/** When a video was created, presented in ISO-8601 format. */
/** When a video was created, presented in ATOM UTC format. */
public var createdAt: Date?
/** The title of the video content. */
public var title: String?
/** A description for the video content. */
public var description: String?
/** The date and time the API created the video. Date and time are provided using ISO-8601 UTC format. */
/** The date and time the API created the video. Date and time are provided using ATOM UTC format. */
public var publishedAt: Date?
/** The date and time the video was updated. Date and time are provided using ISO-8601 UTC format. */
/** The date and time the video was updated. Date and time are provided using ATOM UTC format. */
public var updatedAt: 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. */
public var discardedAt: 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. */
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?
/** 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. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata/) allows you to define a key that allows any value pair. */
/** 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. */
public var metadata: [Metadata]?
public var source: VideoSource?
public var assets: VideoAssets?
Expand All @@ -39,13 +45,16 @@ 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, 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, 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
self.description = description
self.publishedAt = publishedAt
self.updatedAt = updatedAt
self.discardedAt = discardedAt
self.deletesAt = deletesAt
self.discarded = discarded
self.tags = tags
self.metadata = metadata
self.source = source
Expand All @@ -63,6 +72,9 @@ public struct Video: Codable, Hashable {
case description
case publishedAt
case updatedAt
case discardedAt
case deletesAt
case discarded
case tags
case metadata
case source
Expand All @@ -83,6 +95,9 @@ public struct Video: Codable, Hashable {
try container.encodeIfPresent(description, forKey: .description)
try container.encodeIfPresent(publishedAt, forKey: .publishedAt)
try container.encodeIfPresent(updatedAt, forKey: .updatedAt)
try container.encodeIfPresent(discardedAt, forKey: .discardedAt)
try container.encodeIfPresent(deletesAt, forKey: .deletesAt)
try container.encodeIfPresent(discarded, forKey: .discarded)
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 @@ -14,7 +14,8 @@
"key" : "Format",
"value" : "Tutorial"
} ],
"publishedAt" : "4665-07-14T23:36:18.598Z",
"publishedAt" : "2024-07-14T23:36:07+00:00",
"discarded" : false,
"source" : {
"uri" : "/videos/vi4blUQJFrYWbaG44NChkH27/source"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"key" : "Format",
"value" : "Tutorial"
} ],
"publishedAt" : "4665-07-14T23:36:18.598Z",
"publishedAt" : "2024-07-14T23:36:07+00:00",
"discarded" : false,
"source" : {
"uri" : "/videos/vi4k0jvEUuaTdRAEjQ4Jfrgz/source"
},
Expand Down
11 changes: 7 additions & 4 deletions docs/Video.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**videoId** | **String** | The unique identifier of the video object. |
**createdAt** | **Date** | When a video was created, presented in ISO-8601 format. | [optional]
**createdAt** | **Date** | When a video was created, presented in ATOM UTC format. | [optional]
**title** | **String** | The title of the video content. | [optional]
**description** | **String** | A description for the video content. | [optional]
**publishedAt** | **Date** | The date and time the API created the video. Date and time are provided using ISO-8601 UTC format. | [optional]
**updatedAt** | **Date** | The date and time the video was updated. Date and time are provided using ISO-8601 UTC format. | [optional]
**publishedAt** | **Date** | The date and time the API created the video. Date and time are provided using ATOM UTC format. | [optional]
**updatedAt** | **Date** | The date and time the video was updated. Date and time are provided using ATOM UTC format. | [optional]
**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]
**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. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata/) allows you to define a key that allows any value pair. | [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]
**assets** | [**VideoAssets**](VideoAssets.md) | | [optional]
**playerId** | **String** | The id of the player that will be applied on the video. | [optional]
Expand Down
Loading