Skip to content

Commit

Permalink
Merge pull request #55 from apivideo/bugfix/update-list-all-video-obj…
Browse files Browse the repository at this point in the history
…ects-descriptions

Update parameter descriptions and add enums
  • Loading branch information
bot-api-video authored Jul 7, 2023
2 parents abdf804 + a0329c7 commit 7d25a61
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 20 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 @@
3eb2afd3380a2e1194d21245be70de774173595baf3a06fefd0c9c8d1c7f7f58
8661c973bd93b59ba5a00ce76d746ffb5d07e640ac5c33ae7eed6d66f9e6e669
38 changes: 28 additions & 10 deletions Sources/APIs/VideosAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -598,23 +598,41 @@ NOTE: If you are updating an array, you must provide the entire array as what yo
}


/**
* enum for parameter sortBy
*/
public enum SortBy_list: String, CaseIterable {
case title = "title"
case createdat = "createdAt"
case publishedat = "publishedAt"
case updatedat = "updatedAt"
}

/**
* enum for parameter sortOrder
*/
public enum SortOrder_list: String, CaseIterable {
case asc = "asc"
case desc = "desc"
}

/**
List all video objects

- parameter title: (query) The title of a specific video you want to find. The search will match exactly to what term you provide and return any videos that contain the same term as part of their titles. (optional)
- parameter tags: (query) A tag is a category you create and apply to videos. You can search for videos with particular tags by listing one or more here. Only videos that have all the tags you list will be returned. (optional)
- parameter metadata: (query) Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata) allows you to define a key that allows any value pair. (optional)
- parameter description: (query) If you described a video with a term or sentence, you can add it here to return videos containing this string. (optional)
- parameter liveStreamId: (query) If you know the ID for a live stream, you can retrieve the stream by adding the ID for it here. (optional)
- parameter sortBy: (query) Allowed: publishedAt, title. You can search by the time videos were published at, or by title. (optional)
- parameter sortOrder: (query) Allowed: asc, desc. asc is ascending and sorts from A to Z. desc is descending and sorts from Z to A. (optional)
- parameter description: (query) Retrieve video objects by `description`. (optional)
- parameter liveStreamId: (query) Retrieve video objects that were recorded from a live stream by `liveStreamId`. (optional)
- parameter sortBy: (query) Use this parameter to sort videos by the their created time, published time, updated time, or by title. (optional)
- parameter sortOrder: (query) Use this parameter to sort results. `asc` is ascending and sorts from A to Z. `desc` is descending and sorts from Z to A. (optional)
- parameter currentPage: (query) Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1)
- parameter pageSize: (query) Results per page. Allowed values 1-100, default is 25. (optional, default to 25)
- parameter apiResponseQueue: The queue on which api response is dispatched.
- parameter completion: completion handler to receive the data and the error objects.
*/
@discardableResult
open class func list(title: String? = nil, tags: [String]? = nil, metadata: [String: String]? = nil, description: String? = nil, liveStreamId: String? = nil, sortBy: String? = nil, sortOrder: String? = nil, currentPage: Int? = nil, pageSize: Int? = nil, apiResponseQueue: DispatchQueue = ApiVideoClient.apiResponseQueue, completion: @escaping ((_ data: VideosListResponse?, _ error: Error?) -> Void)) -> RequestTask {
open class func list(title: String? = nil, tags: [String]? = nil, metadata: [String: String]? = nil, description: String? = nil, liveStreamId: String? = nil, sortBy: SortBy_list? = nil, sortOrder: SortOrder_list? = nil, currentPage: Int? = nil, pageSize: Int? = nil, apiResponseQueue: DispatchQueue = ApiVideoClient.apiResponseQueue, completion: @escaping ((_ data: VideosListResponse?, _ error: Error?) -> Void)) -> RequestTask {
return listWithRequestBuilder(title: title, tags: tags, metadata: metadata, description: description, liveStreamId: liveStreamId, sortBy: sortBy, sortOrder: sortOrder, currentPage: currentPage, pageSize: pageSize).execute(apiResponseQueue) { result in
switch result {
case let .success(response):
Expand All @@ -633,15 +651,15 @@ NOTE: If you are updating an array, you must provide the entire array as what yo
- parameter title: (query) The title of a specific video you want to find. The search will match exactly to what term you provide and return any videos that contain the same term as part of their titles. (optional)
- parameter tags: (query) A tag is a category you create and apply to videos. You can search for videos with particular tags by listing one or more here. Only videos that have all the tags you list will be returned. (optional)
- parameter metadata: (query) Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata) allows you to define a key that allows any value pair. (optional)
- parameter description: (query) If you described a video with a term or sentence, you can add it here to return videos containing this string. (optional)
- parameter liveStreamId: (query) If you know the ID for a live stream, you can retrieve the stream by adding the ID for it here. (optional)
- parameter sortBy: (query) Allowed: publishedAt, title. You can search by the time videos were published at, or by title. (optional)
- parameter sortOrder: (query) Allowed: asc, desc. asc is ascending and sorts from A to Z. desc is descending and sorts from Z to A. (optional)
- parameter description: (query) Retrieve video objects by `description`. (optional)
- parameter liveStreamId: (query) Retrieve video objects that were recorded from a live stream by `liveStreamId`. (optional)
- parameter sortBy: (query) Use this parameter to sort videos by the their created time, published time, updated time, or by title. (optional)
- parameter sortOrder: (query) Use this parameter to sort results. `asc` is ascending and sorts from A to Z. `desc` is descending and sorts from Z to A. (optional)
- parameter currentPage: (query) Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1)
- parameter pageSize: (query) Results per page. Allowed values 1-100, default is 25. (optional, default to 25)
- returns: RequestBuilder<VideosListResponse>
*/
open class func listWithRequestBuilder(title: String? = nil, tags: [String]? = nil, metadata: [String: String]? = nil, description: String? = nil, liveStreamId: String? = nil, sortBy: String? = nil, sortOrder: String? = nil, currentPage: Int? = nil, pageSize: Int? = nil) -> RequestBuilder<VideosListResponse> {
open class func listWithRequestBuilder(title: String? = nil, tags: [String]? = nil, metadata: [String: String]? = nil, description: String? = nil, liveStreamId: String? = nil, sortBy: SortBy_list? = nil, sortOrder: SortOrder_list? = nil, currentPage: Int? = nil, pageSize: Int? = nil) -> RequestBuilder<VideosListResponse> {
let localVariablePath = "/videos"
let localVariableURLString = ApiVideoClient.basePath + localVariablePath
let localVariableParameters: [String: Any]? = nil
Expand Down
18 changes: 9 additions & 9 deletions docs/VideosAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ Void (empty response body)

# **list**
```swift
open class func list(title: String? = nil, tags: [String]? = nil, metadata: [String: String]? = nil, description: String? = nil, liveStreamId: String? = nil, sortBy: String? = nil, sortOrder: String? = nil, currentPage: Int? = nil, pageSize: Int? = nil, completion: @escaping (_ data: VideosListResponse?, _ error: Error?) -> Void)
open class func list(title: String? = nil, tags: [String]? = nil, metadata: [String: String]? = nil, description: String? = nil, liveStreamId: String? = nil, sortBy: SortBy_list? = nil, sortOrder: SortOrder_list? = nil, currentPage: Int? = nil, pageSize: Int? = nil, completion: @escaping (_ data: VideosListResponse?, _ error: Error?) -> Void)
```

List all video objects
Expand All @@ -370,10 +370,10 @@ import ApiVideoClient
let title = "title_example" // String | The title of a specific video you want to find. The search will match exactly to what term you provide and return any videos that contain the same term as part of their titles. (optional)
let tags = ["inner_example"] // [String] | A tag is a category you create and apply to videos. You can search for videos with particular tags by listing one or more here. Only videos that have all the tags you list will be returned. (optional)
let metadata = "TODO" // [String: String] | Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata) allows you to define a key that allows any value pair. (optional)
let description = "description_example" // String | If you described a video with a term or sentence, you can add it here to return videos containing this string. (optional)
let liveStreamId = "liveStreamId_example" // String | If you know the ID for a live stream, you can retrieve the stream by adding the ID for it here. (optional)
let sortBy = "sortBy_example" // String | Allowed: publishedAt, title. You can search by the time videos were published at, or by title. (optional)
let sortOrder = "sortOrder_example" // String | Allowed: asc, desc. asc is ascending and sorts from A to Z. desc is descending and sorts from Z to A. (optional)
let description = "description_example" // String | Retrieve video objects by `description`. (optional)
let liveStreamId = "liveStreamId_example" // String | Retrieve video objects that were recorded from a live stream by `liveStreamId`. (optional)
let sortBy = "sortBy_example" // String | Use this parameter to sort videos by the their created time, published time, updated time, or by title. (optional)
let sortOrder = "sortOrder_example" // String | Use this parameter to sort results. `asc` is ascending and sorts from A to Z. `desc` is descending and sorts from Z to A. (optional)
let currentPage = 987 // Int | Choose the number of search results to return per page. Minimum value: 1 (optional) (default to 1)
let pageSize = 987 // Int | Results per page. Allowed values 1-100, default is 25. (optional) (default to 25)

Expand All @@ -397,10 +397,10 @@ Name | Type | Description | Notes
**title** | **String** | The title of a specific video you want to find. The search will match exactly to what term you provide and return any videos that contain the same term as part of their titles. | [optional]
**tags** | [**[String]**](String.md) | A tag is a category you create and apply to videos. You can search for videos with particular tags by listing one or more here. Only videos that have all the tags you list will be returned. | [optional]
**metadata** | [**[String: String]**](String.md) | Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata) allows you to define a key that allows any value pair. | [optional]
**description** | **String** | If you described a video with a term or sentence, you can add it here to return videos containing this string. | [optional]
**liveStreamId** | **String** | If you know the ID for a live stream, you can retrieve the stream by adding the ID for it here. | [optional]
**sortBy** | **String** | Allowed: publishedAt, title. You can search by the time videos were published at, or by title. | [optional]
**sortOrder** | **String** | Allowed: asc, desc. asc is ascending and sorts from A to Z. desc is descending and sorts from Z to A. | [optional]
**description** | **String** | Retrieve video objects by &#x60;description&#x60;. | [optional]
**liveStreamId** | **String** | Retrieve video objects that were recorded from a live stream by &#x60;liveStreamId&#x60;. | [optional]
**sortBy** | **String** | Use this parameter to sort videos by the their created time, published time, updated time, or by title. | [optional]
**sortOrder** | **String** | Use this parameter to sort results. &#x60;asc&#x60; is ascending and sorts from A to Z. &#x60;desc&#x60; is descending and sorts from Z to A. | [optional]
**currentPage** | **Int** | Choose the number of search results to return per page. Minimum value: 1 | [optional] [default to 1]
**pageSize** | **Int** | Results per page. Allowed values 1-100, default is 25. | [optional] [default to 25]

Expand Down

0 comments on commit 7d25a61

Please sign in to comment.