jellyfin-sdk-swift/docs/YearsAPI.md
2021-06-12 05:20:24 +00:00

7.3 KiB

YearsAPI

All URIs are relative to http://localhost:8096

Method HTTP request Description
getYear GET /Years/{year} Gets a year.
getYears GET /Years Get years.

getYear

    open class func getYear(year: Int, userId: String? = nil, completion: @escaping (_ data: BaseItemDto?, _ error: Error?) -> Void)

Gets a year.

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import JellyfinAPI

let year = 987 // Int | The year.
let userId = "userId_example" // String | Optional. Filter by user id, and attach user data. (optional)

// Gets a year.
YearsAPI.getYear(year: year, userId: userId) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
year Int The year.
userId String Optional. Filter by user id, and attach user data. [optional]

Return type

BaseItemDto

Authorization

CustomAuthentication

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/json; profile=CamelCase, application/json; profile=PascalCase

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getYears

    open class func getYears(startIndex: Int? = nil, limit: Int? = nil, sortOrder: [APISortOrder]? = nil, parentId: String? = nil, fields: [ItemFields]? = nil, excludeItemTypes: [String]? = nil, includeItemTypes: [String]? = nil, mediaTypes: [String]? = nil, sortBy: [String]? = nil, enableUserData: Bool? = nil, imageTypeLimit: Int? = nil, enableImageTypes: [ImageType]? = nil, userId: String? = nil, recursive: Bool? = nil, enableImages: Bool? = nil, completion: @escaping (_ data: BaseItemDtoQueryResult?, _ error: Error?) -> Void)

Get years.

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import JellyfinAPI

let startIndex = 987 // Int | Skips over a given number of items within the results. Use for paging. (optional)
let limit = 987 // Int | Optional. The maximum number of records to return. (optional)
let sortOrder = [APISortOrder()] // [APISortOrder] | Sort Order - Ascending,Descending. (optional)
let parentId = "parentId_example" // String | Specify this to localize the search to a specific item or folder. Omit to use the root. (optional)
let fields = [ItemFields()] // [ItemFields] | Optional. Specify additional fields of information to return in the output. (optional)
let excludeItemTypes = ["inner_example"] // [String] | Optional. If specified, results will be excluded based on item type. This allows multiple, comma delimited. (optional)
let includeItemTypes = ["inner_example"] // [String] | Optional. If specified, results will be included based on item type. This allows multiple, comma delimited. (optional)
let mediaTypes = ["inner_example"] // [String] | Optional. Filter by MediaType. Allows multiple, comma delimited. (optional)
let sortBy = ["inner_example"] // [String] | Optional. Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime. (optional)
let enableUserData = true // Bool | Optional. Include user data. (optional)
let imageTypeLimit = 987 // Int | Optional. The max number of images to return, per image type. (optional)
let enableImageTypes = [ImageType()] // [ImageType] | Optional. The image types to include in the output. (optional)
let userId = "userId_example" // String | User Id. (optional)
let recursive = true // Bool | Search recursively. (optional) (default to true)
let enableImages = true // Bool | Optional. Include image information in output. (optional) (default to true)

// Get years.
YearsAPI.getYears(startIndex: startIndex, limit: limit, sortOrder: sortOrder, parentId: parentId, fields: fields, excludeItemTypes: excludeItemTypes, includeItemTypes: includeItemTypes, mediaTypes: mediaTypes, sortBy: sortBy, enableUserData: enableUserData, imageTypeLimit: imageTypeLimit, enableImageTypes: enableImageTypes, userId: userId, recursive: recursive, enableImages: enableImages) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
startIndex Int Skips over a given number of items within the results. Use for paging. [optional]
limit Int Optional. The maximum number of records to return. [optional]
sortOrder **[APISortOrder]** Sort Order - Ascending,Descending. [optional]
parentId String Specify this to localize the search to a specific item or folder. Omit to use the root. [optional]
fields **[ItemFields]** Optional. Specify additional fields of information to return in the output. [optional]
excludeItemTypes **[String]** Optional. If specified, results will be excluded based on item type. This allows multiple, comma delimited. [optional]
includeItemTypes **[String]** Optional. If specified, results will be included based on item type. This allows multiple, comma delimited. [optional]
mediaTypes **[String]** Optional. Filter by MediaType. Allows multiple, comma delimited. [optional]
sortBy **[String]** Optional. Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime. [optional]
enableUserData Bool Optional. Include user data. [optional]
imageTypeLimit Int Optional. The max number of images to return, per image type. [optional]
enableImageTypes **[ImageType]** Optional. The image types to include in the output. [optional]
userId String User Id. [optional]
recursive Bool Search recursively. [optional] [default to true]
enableImages Bool Optional. Include image information in output. [optional] [default to true]

Return type

BaseItemDtoQueryResult

Authorization

CustomAuthentication

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/json; profile=CamelCase, application/json; profile=PascalCase

[Back to top] [Back to API list] [Back to Model list] [Back to README]