// // ImageAPI.swift // // Generated by swagger-codegen // https://github.com/swagger-api/swagger-codegen // import Foundation import Alamofire open class ImageAPI { /** Delete an item's image. - parameter itemId: (path) Item id. - parameter imageType: (path) Image type. - parameter imageIndex: (query) The image index. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func deleteItemImage(itemId: UUID, imageType: ImageType9, imageIndex: Int? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deleteItemImageWithRequestBuilder(itemId: itemId, imageType: imageType, imageIndex: imageIndex).execute { (response, error) -> Void in if error == nil { completion((), error) } else { completion(nil, error) } } } /** Delete an item's image. - DELETE /Items/{itemId}/Images/{imageType} - - API Key: - type: apiKey X-Emby-Authorization - name: CustomAuthentication - parameter itemId: (path) Item id. - parameter imageType: (path) Image type. - parameter imageIndex: (query) The image index. (optional) - returns: RequestBuilder */ open class func deleteItemImageWithRequestBuilder(itemId: UUID, imageType: ImageType9, imageIndex: Int? = nil) -> RequestBuilder { var path = "/Items/{itemId}/Images/{imageType}" let itemIdPreEscape = "\(itemId)" let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "imageIndex": imageIndex?.encodeToJSON() ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Delete an item's image. - parameter itemId: (path) Item id. - parameter imageType: (path) Image type. - parameter imageIndex: (path) The image index. - parameter completion: completion handler to receive the data and the error objects */ open class func deleteItemImageByIndex(itemId: UUID, imageType: ImageType13, imageIndex: Int, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deleteItemImageByIndexWithRequestBuilder(itemId: itemId, imageType: imageType, imageIndex: imageIndex).execute { (response, error) -> Void in if error == nil { completion((), error) } else { completion(nil, error) } } } /** Delete an item's image. - DELETE /Items/{itemId}/Images/{imageType}/{imageIndex} - - API Key: - type: apiKey X-Emby-Authorization - name: CustomAuthentication - parameter itemId: (path) Item id. - parameter imageType: (path) Image type. - parameter imageIndex: (path) The image index. - returns: RequestBuilder */ open class func deleteItemImageByIndexWithRequestBuilder(itemId: UUID, imageType: ImageType13, imageIndex: Int) -> RequestBuilder { var path = "/Items/{itemId}/Images/{imageType}/{imageIndex}" let itemIdPreEscape = "\(itemId)" let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let imageIndexPreEscape = "\(imageIndex)" let imageIndexPostEscape = imageIndexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageIndex}", with: imageIndexPostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Delete the user's image. - parameter userId: (path) User Id. - parameter imageType: (path) (Unused) Image type. - parameter index: (query) (Unused) Image index. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func deleteUserImage(userId: UUID, imageType: ImageType32, index: Int? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deleteUserImageWithRequestBuilder(userId: userId, imageType: imageType, index: index).execute { (response, error) -> Void in if error == nil { completion((), error) } else { completion(nil, error) } } } /** Delete the user's image. - DELETE /Users/{userId}/Images/{imageType} - - API Key: - type: apiKey X-Emby-Authorization - name: CustomAuthentication - parameter userId: (path) User Id. - parameter imageType: (path) (Unused) Image type. - parameter index: (query) (Unused) Image index. (optional) - returns: RequestBuilder */ open class func deleteUserImageWithRequestBuilder(userId: UUID, imageType: ImageType32, index: Int? = nil) -> RequestBuilder { var path = "/Users/{userId}/Images/{imageType}" let userIdPreEscape = "\(userId)" let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "index": index?.encodeToJSON() ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Delete the user's image. - parameter userId: (path) User Id. - parameter imageType: (path) (Unused) Image type. - parameter index: (path) (Unused) Image index. - parameter completion: completion handler to receive the data and the error objects */ open class func deleteUserImageByIndex(userId: UUID, imageType: ImageType36, index: Int, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deleteUserImageByIndexWithRequestBuilder(userId: userId, imageType: imageType, index: index).execute { (response, error) -> Void in if error == nil { completion((), error) } else { completion(nil, error) } } } /** Delete the user's image. - DELETE /Users/{userId}/Images/{imageType}/{index} - - API Key: - type: apiKey X-Emby-Authorization - name: CustomAuthentication - parameter userId: (path) User Id. - parameter imageType: (path) (Unused) Image type. - parameter index: (path) (Unused) Image index. - returns: RequestBuilder */ open class func deleteUserImageByIndexWithRequestBuilder(userId: UUID, imageType: ImageType36, index: Int) -> RequestBuilder { var path = "/Users/{userId}/Images/{imageType}/{index}" let userIdPreEscape = "\(userId)" let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let indexPreEscape = "\(index)" let indexPostEscape = indexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{index}", with: indexPostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Get artist image by name. - parameter name: (path) Artist name. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func getArtistImage(name: String, imageType: ImageType, imageIndex: Int, tag: String? = nil, format: Format? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { getArtistImageWithRequestBuilder(name: name, imageType: imageType, imageIndex: imageIndex, tag: tag, format: format, maxWidth: maxWidth, maxHeight: maxHeight, percentPlayed: percentPlayed, unplayedCount: unplayedCount, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, cropWhitespace: cropWhitespace, addPlayedIndicator: addPlayedIndicator, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get artist image by name. - GET /Artists/{name}/Images/{imageType}/{imageIndex} - - examples: [{contentType=application/json, example=""}] - parameter name: (path) Artist name. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - returns: RequestBuilder */ open class func getArtistImageWithRequestBuilder(name: String, imageType: ImageType, imageIndex: Int, tag: String? = nil, format: Format? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil) -> RequestBuilder { var path = "/Artists/{name}/Images/{imageType}/{imageIndex}" let namePreEscape = "\(name)" let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let imageIndexPreEscape = "\(imageIndex)" let imageIndexPostEscape = imageIndexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageIndex}", with: imageIndexPostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tag": tag, "format": format, "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "cropWhitespace": cropWhitespace, "addPlayedIndicator": addPlayedIndicator, "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Get genre image by name. - parameter name: (path) Genre name. - parameter imageType: (path) Image type. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter imageIndex: (query) Image index. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func getGenreImage(name: String, imageType: ImageType2, tag: String? = nil, format: Format2? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, imageIndex: Int? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { getGenreImageWithRequestBuilder(name: name, imageType: imageType, tag: tag, format: format, maxWidth: maxWidth, maxHeight: maxHeight, percentPlayed: percentPlayed, unplayedCount: unplayedCount, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, cropWhitespace: cropWhitespace, addPlayedIndicator: addPlayedIndicator, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer, imageIndex: imageIndex).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get genre image by name. - GET /Genres/{name}/Images/{imageType} - - examples: [{contentType=application/json, example=""}] - parameter name: (path) Genre name. - parameter imageType: (path) Image type. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter imageIndex: (query) Image index. (optional) - returns: RequestBuilder */ open class func getGenreImageWithRequestBuilder(name: String, imageType: ImageType2, tag: String? = nil, format: Format2? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, imageIndex: Int? = nil) -> RequestBuilder { var path = "/Genres/{name}/Images/{imageType}" let namePreEscape = "\(name)" let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tag": tag, "format": format, "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "cropWhitespace": cropWhitespace, "addPlayedIndicator": addPlayedIndicator, "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer, "imageIndex": imageIndex?.encodeToJSON() ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Get genre image by name. - parameter name: (path) Genre name. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func getGenreImageByIndex(name: String, imageType: ImageType4, imageIndex: Int, tag: String? = nil, format: Format4? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { getGenreImageByIndexWithRequestBuilder(name: name, imageType: imageType, imageIndex: imageIndex, tag: tag, format: format, maxWidth: maxWidth, maxHeight: maxHeight, percentPlayed: percentPlayed, unplayedCount: unplayedCount, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, cropWhitespace: cropWhitespace, addPlayedIndicator: addPlayedIndicator, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get genre image by name. - GET /Genres/{name}/Images/{imageType}/{imageIndex} - - examples: [{contentType=application/json, example=""}] - parameter name: (path) Genre name. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - returns: RequestBuilder */ open class func getGenreImageByIndexWithRequestBuilder(name: String, imageType: ImageType4, imageIndex: Int, tag: String? = nil, format: Format4? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil) -> RequestBuilder { var path = "/Genres/{name}/Images/{imageType}/{imageIndex}" let namePreEscape = "\(name)" let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let imageIndexPreEscape = "\(imageIndex)" let imageIndexPostEscape = imageIndexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageIndex}", with: imageIndexPostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tag": tag, "format": format, "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "cropWhitespace": cropWhitespace, "addPlayedIndicator": addPlayedIndicator, "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Gets the item's image. - parameter itemId: (path) Item id. - parameter imageType: (path) Image type. - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter format: (query) Optional. The MediaBrowser.Model.Drawing.ImageFormat of the returned image. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter imageIndex: (query) Image index. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func getItemImage(itemId: UUID, imageType: ImageType6, maxWidth: Int? = nil, maxHeight: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, tag: String? = nil, cropWhitespace: Bool? = nil, format: Format6? = nil, addPlayedIndicator: Bool? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, imageIndex: Int? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { getItemImageWithRequestBuilder(itemId: itemId, imageType: imageType, maxWidth: maxWidth, maxHeight: maxHeight, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, tag: tag, cropWhitespace: cropWhitespace, format: format, addPlayedIndicator: addPlayedIndicator, percentPlayed: percentPlayed, unplayedCount: unplayedCount, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer, imageIndex: imageIndex).execute { (response, error) -> Void in completion(response?.body, error) } } /** Gets the item's image. - GET /Items/{itemId}/Images/{imageType} - - examples: [{contentType=application/json, example=""}] - parameter itemId: (path) Item id. - parameter imageType: (path) Image type. - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter format: (query) Optional. The MediaBrowser.Model.Drawing.ImageFormat of the returned image. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter imageIndex: (query) Image index. (optional) - returns: RequestBuilder */ open class func getItemImageWithRequestBuilder(itemId: UUID, imageType: ImageType6, maxWidth: Int? = nil, maxHeight: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, tag: String? = nil, cropWhitespace: Bool? = nil, format: Format6? = nil, addPlayedIndicator: Bool? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, imageIndex: Int? = nil) -> RequestBuilder { var path = "/Items/{itemId}/Images/{imageType}" let itemIdPreEscape = "\(itemId)" let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "tag": tag, "cropWhitespace": cropWhitespace, "format": format, "addPlayedIndicator": addPlayedIndicator, "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer, "imageIndex": imageIndex?.encodeToJSON() ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Gets the item's image. - parameter itemId: (path) Item id. - parameter imageType: (path) Image type. - parameter maxWidth: (path) The maximum image width to return. - parameter maxHeight: (path) The maximum image height to return. - parameter tag: (path) Optional. Supply the cache tag from the item object to receive strong caching headers. - parameter format: (path) Determines the output format of the image - original,gif,jpg,png. - parameter percentPlayed: (path) Optional. Percent to render for the percent played overlay. - parameter unplayedCount: (path) Optional. Unplayed count overlay to render. - parameter imageIndex: (path) Image index. - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func getItemImage2(itemId: UUID, imageType: ImageType14, maxWidth: Int, maxHeight: Int, tag: String, format: Format10, percentPlayed: Double, unplayedCount: Int, imageIndex: Int, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { getItemImage2WithRequestBuilder(itemId: itemId, imageType: imageType, maxWidth: maxWidth, maxHeight: maxHeight, tag: tag, format: format, percentPlayed: percentPlayed, unplayedCount: unplayedCount, imageIndex: imageIndex, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, cropWhitespace: cropWhitespace, addPlayedIndicator: addPlayedIndicator, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer).execute { (response, error) -> Void in completion(response?.body, error) } } /** Gets the item's image. - GET /Items/{itemId}/Images/{imageType}/{imageIndex}/{tag}/{format}/{maxWidth}/{maxHeight}/{percentPlayed}/{unplayedCount} - - examples: [{contentType=application/json, example=""}] - parameter itemId: (path) Item id. - parameter imageType: (path) Image type. - parameter maxWidth: (path) The maximum image width to return. - parameter maxHeight: (path) The maximum image height to return. - parameter tag: (path) Optional. Supply the cache tag from the item object to receive strong caching headers. - parameter format: (path) Determines the output format of the image - original,gif,jpg,png. - parameter percentPlayed: (path) Optional. Percent to render for the percent played overlay. - parameter unplayedCount: (path) Optional. Unplayed count overlay to render. - parameter imageIndex: (path) Image index. - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - returns: RequestBuilder */ open class func getItemImage2WithRequestBuilder(itemId: UUID, imageType: ImageType14, maxWidth: Int, maxHeight: Int, tag: String, format: Format10, percentPlayed: Double, unplayedCount: Int, imageIndex: Int, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil) -> RequestBuilder { var path = "/Items/{itemId}/Images/{imageType}/{imageIndex}/{tag}/{format}/{maxWidth}/{maxHeight}/{percentPlayed}/{unplayedCount}" let itemIdPreEscape = "\(itemId)" let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let maxWidthPreEscape = "\(maxWidth)" let maxWidthPostEscape = maxWidthPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{maxWidth}", with: maxWidthPostEscape, options: .literal, range: nil) let maxHeightPreEscape = "\(maxHeight)" let maxHeightPostEscape = maxHeightPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{maxHeight}", with: maxHeightPostEscape, options: .literal, range: nil) let tagPreEscape = "\(tag)" let tagPostEscape = tagPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{tag}", with: tagPostEscape, options: .literal, range: nil) let formatPreEscape = "\(format)" let formatPostEscape = formatPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{format}", with: formatPostEscape, options: .literal, range: nil) let percentPlayedPreEscape = "\(percentPlayed)" let percentPlayedPostEscape = percentPlayedPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{percentPlayed}", with: percentPlayedPostEscape, options: .literal, range: nil) let unplayedCountPreEscape = "\(unplayedCount)" let unplayedCountPostEscape = unplayedCountPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{unplayedCount}", with: unplayedCountPostEscape, options: .literal, range: nil) let imageIndexPreEscape = "\(imageIndex)" let imageIndexPostEscape = imageIndexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageIndex}", with: imageIndexPostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "cropWhitespace": cropWhitespace, "addPlayedIndicator": addPlayedIndicator, "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Gets the item's image. - parameter itemId: (path) Item id. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter format: (query) Optional. The MediaBrowser.Model.Drawing.ImageFormat of the returned image. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func getItemImageByIndex(itemId: UUID, imageType: ImageType10, imageIndex: Int, maxWidth: Int? = nil, maxHeight: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, tag: String? = nil, cropWhitespace: Bool? = nil, format: Format8? = nil, addPlayedIndicator: Bool? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { getItemImageByIndexWithRequestBuilder(itemId: itemId, imageType: imageType, imageIndex: imageIndex, maxWidth: maxWidth, maxHeight: maxHeight, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, tag: tag, cropWhitespace: cropWhitespace, format: format, addPlayedIndicator: addPlayedIndicator, percentPlayed: percentPlayed, unplayedCount: unplayedCount, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer).execute { (response, error) -> Void in completion(response?.body, error) } } /** Gets the item's image. - GET /Items/{itemId}/Images/{imageType}/{imageIndex} - - examples: [{contentType=application/json, example=""}] - parameter itemId: (path) Item id. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter format: (query) Optional. The MediaBrowser.Model.Drawing.ImageFormat of the returned image. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - returns: RequestBuilder */ open class func getItemImageByIndexWithRequestBuilder(itemId: UUID, imageType: ImageType10, imageIndex: Int, maxWidth: Int? = nil, maxHeight: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, tag: String? = nil, cropWhitespace: Bool? = nil, format: Format8? = nil, addPlayedIndicator: Bool? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil) -> RequestBuilder { var path = "/Items/{itemId}/Images/{imageType}/{imageIndex}" let itemIdPreEscape = "\(itemId)" let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let imageIndexPreEscape = "\(imageIndex)" let imageIndexPostEscape = imageIndexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageIndex}", with: imageIndexPostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "tag": tag, "cropWhitespace": cropWhitespace, "format": format, "addPlayedIndicator": addPlayedIndicator, "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Get item image infos. - parameter itemId: (path) Item id. - parameter completion: completion handler to receive the data and the error objects */ open class func getItemImageInfos(itemId: UUID, completion: @escaping ((_ data: [ImageInfo]?,_ error: Error?) -> Void)) { getItemImageInfosWithRequestBuilder(itemId: itemId).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get item image infos. - GET /Items/{itemId}/Images - - API Key: - type: apiKey X-Emby-Authorization - name: CustomAuthentication - examples: [{contentType=application/json, example=[ { "Path" : "Path", "ImageTag" : "ImageTag", "Size" : 5, "Height" : 6, "BlurHash" : "BlurHash", "ImageIndex" : 0, "Width" : 1, "ImageType" : "" }, { "Path" : "Path", "ImageTag" : "ImageTag", "Size" : 5, "Height" : 6, "BlurHash" : "BlurHash", "ImageIndex" : 0, "Width" : 1, "ImageType" : "" } ]}] - parameter itemId: (path) Item id. - returns: RequestBuilder<[ImageInfo]> */ open class func getItemImageInfosWithRequestBuilder(itemId: UUID) -> RequestBuilder<[ImageInfo]> { var path = "/Items/{itemId}/Images" let itemIdPreEscape = "\(itemId)" let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder<[ImageInfo]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Get music genre image by name. - parameter name: (path) Music genre name. - parameter imageType: (path) Image type. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter imageIndex: (query) Image index. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func getMusicGenreImage(name: String, imageType: ImageType17, tag: String? = nil, format: Format12? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, imageIndex: Int? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { getMusicGenreImageWithRequestBuilder(name: name, imageType: imageType, tag: tag, format: format, maxWidth: maxWidth, maxHeight: maxHeight, percentPlayed: percentPlayed, unplayedCount: unplayedCount, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, cropWhitespace: cropWhitespace, addPlayedIndicator: addPlayedIndicator, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer, imageIndex: imageIndex).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get music genre image by name. - GET /MusicGenres/{name}/Images/{imageType} - - examples: [{contentType=application/json, example=""}] - parameter name: (path) Music genre name. - parameter imageType: (path) Image type. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter imageIndex: (query) Image index. (optional) - returns: RequestBuilder */ open class func getMusicGenreImageWithRequestBuilder(name: String, imageType: ImageType17, tag: String? = nil, format: Format12? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, imageIndex: Int? = nil) -> RequestBuilder { var path = "/MusicGenres/{name}/Images/{imageType}" let namePreEscape = "\(name)" let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tag": tag, "format": format, "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "cropWhitespace": cropWhitespace, "addPlayedIndicator": addPlayedIndicator, "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer, "imageIndex": imageIndex?.encodeToJSON() ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Get music genre image by name. - parameter name: (path) Music genre name. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func getMusicGenreImageByIndex(name: String, imageType: ImageType19, imageIndex: Int, tag: String? = nil, format: Format14? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { getMusicGenreImageByIndexWithRequestBuilder(name: name, imageType: imageType, imageIndex: imageIndex, tag: tag, format: format, maxWidth: maxWidth, maxHeight: maxHeight, percentPlayed: percentPlayed, unplayedCount: unplayedCount, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, cropWhitespace: cropWhitespace, addPlayedIndicator: addPlayedIndicator, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get music genre image by name. - GET /MusicGenres/{name}/Images/{imageType}/{imageIndex} - - examples: [{contentType=application/json, example=""}] - parameter name: (path) Music genre name. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - returns: RequestBuilder */ open class func getMusicGenreImageByIndexWithRequestBuilder(name: String, imageType: ImageType19, imageIndex: Int, tag: String? = nil, format: Format14? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil) -> RequestBuilder { var path = "/MusicGenres/{name}/Images/{imageType}/{imageIndex}" let namePreEscape = "\(name)" let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let imageIndexPreEscape = "\(imageIndex)" let imageIndexPostEscape = imageIndexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageIndex}", with: imageIndexPostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tag": tag, "format": format, "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "cropWhitespace": cropWhitespace, "addPlayedIndicator": addPlayedIndicator, "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Get person image by name. - parameter name: (path) Person name. - parameter imageType: (path) Image type. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter imageIndex: (query) Image index. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func getPersonImage(name: String, imageType: ImageType21, tag: String? = nil, format: Format16? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, imageIndex: Int? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { getPersonImageWithRequestBuilder(name: name, imageType: imageType, tag: tag, format: format, maxWidth: maxWidth, maxHeight: maxHeight, percentPlayed: percentPlayed, unplayedCount: unplayedCount, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, cropWhitespace: cropWhitespace, addPlayedIndicator: addPlayedIndicator, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer, imageIndex: imageIndex).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get person image by name. - GET /Persons/{name}/Images/{imageType} - - examples: [{contentType=application/json, example=""}] - parameter name: (path) Person name. - parameter imageType: (path) Image type. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter imageIndex: (query) Image index. (optional) - returns: RequestBuilder */ open class func getPersonImageWithRequestBuilder(name: String, imageType: ImageType21, tag: String? = nil, format: Format16? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, imageIndex: Int? = nil) -> RequestBuilder { var path = "/Persons/{name}/Images/{imageType}" let namePreEscape = "\(name)" let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tag": tag, "format": format, "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "cropWhitespace": cropWhitespace, "addPlayedIndicator": addPlayedIndicator, "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer, "imageIndex": imageIndex?.encodeToJSON() ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Get person image by name. - parameter name: (path) Person name. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func getPersonImageByIndex(name: String, imageType: ImageType23, imageIndex: Int, tag: String? = nil, format: Format18? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { getPersonImageByIndexWithRequestBuilder(name: name, imageType: imageType, imageIndex: imageIndex, tag: tag, format: format, maxWidth: maxWidth, maxHeight: maxHeight, percentPlayed: percentPlayed, unplayedCount: unplayedCount, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, cropWhitespace: cropWhitespace, addPlayedIndicator: addPlayedIndicator, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get person image by name. - GET /Persons/{name}/Images/{imageType}/{imageIndex} - - examples: [{contentType=application/json, example=""}] - parameter name: (path) Person name. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - returns: RequestBuilder */ open class func getPersonImageByIndexWithRequestBuilder(name: String, imageType: ImageType23, imageIndex: Int, tag: String? = nil, format: Format18? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil) -> RequestBuilder { var path = "/Persons/{name}/Images/{imageType}/{imageIndex}" let namePreEscape = "\(name)" let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let imageIndexPreEscape = "\(imageIndex)" let imageIndexPostEscape = imageIndexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageIndex}", with: imageIndexPostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tag": tag, "format": format, "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "cropWhitespace": cropWhitespace, "addPlayedIndicator": addPlayedIndicator, "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Get studio image by name. - parameter name: (path) Studio name. - parameter imageType: (path) Image type. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter imageIndex: (query) Image index. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func getStudioImage(name: String, imageType: ImageType25, tag: String? = nil, format: Format20? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, imageIndex: Int? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { getStudioImageWithRequestBuilder(name: name, imageType: imageType, tag: tag, format: format, maxWidth: maxWidth, maxHeight: maxHeight, percentPlayed: percentPlayed, unplayedCount: unplayedCount, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, cropWhitespace: cropWhitespace, addPlayedIndicator: addPlayedIndicator, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer, imageIndex: imageIndex).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get studio image by name. - GET /Studios/{name}/Images/{imageType} - - examples: [{contentType=application/json, example=""}] - parameter name: (path) Studio name. - parameter imageType: (path) Image type. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter imageIndex: (query) Image index. (optional) - returns: RequestBuilder */ open class func getStudioImageWithRequestBuilder(name: String, imageType: ImageType25, tag: String? = nil, format: Format20? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, imageIndex: Int? = nil) -> RequestBuilder { var path = "/Studios/{name}/Images/{imageType}" let namePreEscape = "\(name)" let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tag": tag, "format": format, "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "cropWhitespace": cropWhitespace, "addPlayedIndicator": addPlayedIndicator, "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer, "imageIndex": imageIndex?.encodeToJSON() ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Get studio image by name. - parameter name: (path) Studio name. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func getStudioImageByIndex(name: String, imageType: ImageType27, imageIndex: Int, tag: String? = nil, format: Format22? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { getStudioImageByIndexWithRequestBuilder(name: name, imageType: imageType, imageIndex: imageIndex, tag: tag, format: format, maxWidth: maxWidth, maxHeight: maxHeight, percentPlayed: percentPlayed, unplayedCount: unplayedCount, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, cropWhitespace: cropWhitespace, addPlayedIndicator: addPlayedIndicator, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get studio image by name. - GET /Studios/{name}/Images/{imageType}/{imageIndex} - - examples: [{contentType=application/json, example=""}] - parameter name: (path) Studio name. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - returns: RequestBuilder */ open class func getStudioImageByIndexWithRequestBuilder(name: String, imageType: ImageType27, imageIndex: Int, tag: String? = nil, format: Format22? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil) -> RequestBuilder { var path = "/Studios/{name}/Images/{imageType}/{imageIndex}" let namePreEscape = "\(name)" let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let imageIndexPreEscape = "\(imageIndex)" let imageIndexPostEscape = imageIndexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageIndex}", with: imageIndexPostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tag": tag, "format": format, "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "cropWhitespace": cropWhitespace, "addPlayedIndicator": addPlayedIndicator, "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Get user profile image. - parameter userId: (path) User id. - parameter imageType: (path) Image type. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter imageIndex: (query) Image index. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func getUserImage(userId: UUID, imageType: ImageType29, tag: String? = nil, format: Format24? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, imageIndex: Int? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { getUserImageWithRequestBuilder(userId: userId, imageType: imageType, tag: tag, format: format, maxWidth: maxWidth, maxHeight: maxHeight, percentPlayed: percentPlayed, unplayedCount: unplayedCount, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, cropWhitespace: cropWhitespace, addPlayedIndicator: addPlayedIndicator, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer, imageIndex: imageIndex).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get user profile image. - GET /Users/{userId}/Images/{imageType} - - examples: [{contentType=application/json, example=""}] - parameter userId: (path) User id. - parameter imageType: (path) Image type. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter imageIndex: (query) Image index. (optional) - returns: RequestBuilder */ open class func getUserImageWithRequestBuilder(userId: UUID, imageType: ImageType29, tag: String? = nil, format: Format24? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, imageIndex: Int? = nil) -> RequestBuilder { var path = "/Users/{userId}/Images/{imageType}" let userIdPreEscape = "\(userId)" let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tag": tag, "format": format, "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "cropWhitespace": cropWhitespace, "addPlayedIndicator": addPlayedIndicator, "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer, "imageIndex": imageIndex?.encodeToJSON() ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Get user profile image. - parameter userId: (path) User id. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func getUserImageByIndex(userId: UUID, imageType: ImageType33, imageIndex: Int, tag: String? = nil, format: Format26? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { getUserImageByIndexWithRequestBuilder(userId: userId, imageType: imageType, imageIndex: imageIndex, tag: tag, format: format, maxWidth: maxWidth, maxHeight: maxHeight, percentPlayed: percentPlayed, unplayedCount: unplayedCount, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, cropWhitespace: cropWhitespace, addPlayedIndicator: addPlayedIndicator, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get user profile image. - GET /Users/{userId}/Images/{imageType}/{imageIndex} - - examples: [{contentType=application/json, example=""}] - parameter userId: (path) User id. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - returns: RequestBuilder */ open class func getUserImageByIndexWithRequestBuilder(userId: UUID, imageType: ImageType33, imageIndex: Int, tag: String? = nil, format: Format26? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil) -> RequestBuilder { var path = "/Users/{userId}/Images/{imageType}/{imageIndex}" let userIdPreEscape = "\(userId)" let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let imageIndexPreEscape = "\(imageIndex)" let imageIndexPostEscape = imageIndexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageIndex}", with: imageIndexPostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tag": tag, "format": format, "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "cropWhitespace": cropWhitespace, "addPlayedIndicator": addPlayedIndicator, "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Get artist image by name. - parameter name: (path) Artist name. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func headArtistImage(name: String, imageType: ImageType1, imageIndex: Int, tag: String? = nil, format: Format1? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { headArtistImageWithRequestBuilder(name: name, imageType: imageType, imageIndex: imageIndex, tag: tag, format: format, maxWidth: maxWidth, maxHeight: maxHeight, percentPlayed: percentPlayed, unplayedCount: unplayedCount, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, cropWhitespace: cropWhitespace, addPlayedIndicator: addPlayedIndicator, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get artist image by name. - HEAD /Artists/{name}/Images/{imageType}/{imageIndex} - - examples: [{contentType=application/json, example=""}] - parameter name: (path) Artist name. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - returns: RequestBuilder */ open class func headArtistImageWithRequestBuilder(name: String, imageType: ImageType1, imageIndex: Int, tag: String? = nil, format: Format1? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil) -> RequestBuilder { var path = "/Artists/{name}/Images/{imageType}/{imageIndex}" let namePreEscape = "\(name)" let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let imageIndexPreEscape = "\(imageIndex)" let imageIndexPostEscape = imageIndexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageIndex}", with: imageIndexPostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tag": tag, "format": format, "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "cropWhitespace": cropWhitespace, "addPlayedIndicator": addPlayedIndicator, "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "HEAD", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Get genre image by name. - parameter name: (path) Genre name. - parameter imageType: (path) Image type. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter imageIndex: (query) Image index. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func headGenreImage(name: String, imageType: ImageType3, tag: String? = nil, format: Format3? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, imageIndex: Int? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { headGenreImageWithRequestBuilder(name: name, imageType: imageType, tag: tag, format: format, maxWidth: maxWidth, maxHeight: maxHeight, percentPlayed: percentPlayed, unplayedCount: unplayedCount, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, cropWhitespace: cropWhitespace, addPlayedIndicator: addPlayedIndicator, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer, imageIndex: imageIndex).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get genre image by name. - HEAD /Genres/{name}/Images/{imageType} - - examples: [{contentType=application/json, example=""}] - parameter name: (path) Genre name. - parameter imageType: (path) Image type. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter imageIndex: (query) Image index. (optional) - returns: RequestBuilder */ open class func headGenreImageWithRequestBuilder(name: String, imageType: ImageType3, tag: String? = nil, format: Format3? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, imageIndex: Int? = nil) -> RequestBuilder { var path = "/Genres/{name}/Images/{imageType}" let namePreEscape = "\(name)" let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tag": tag, "format": format, "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "cropWhitespace": cropWhitespace, "addPlayedIndicator": addPlayedIndicator, "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer, "imageIndex": imageIndex?.encodeToJSON() ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "HEAD", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Get genre image by name. - parameter name: (path) Genre name. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func headGenreImageByIndex(name: String, imageType: ImageType5, imageIndex: Int, tag: String? = nil, format: Format5? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { headGenreImageByIndexWithRequestBuilder(name: name, imageType: imageType, imageIndex: imageIndex, tag: tag, format: format, maxWidth: maxWidth, maxHeight: maxHeight, percentPlayed: percentPlayed, unplayedCount: unplayedCount, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, cropWhitespace: cropWhitespace, addPlayedIndicator: addPlayedIndicator, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get genre image by name. - HEAD /Genres/{name}/Images/{imageType}/{imageIndex} - - examples: [{contentType=application/json, example=""}] - parameter name: (path) Genre name. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - returns: RequestBuilder */ open class func headGenreImageByIndexWithRequestBuilder(name: String, imageType: ImageType5, imageIndex: Int, tag: String? = nil, format: Format5? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil) -> RequestBuilder { var path = "/Genres/{name}/Images/{imageType}/{imageIndex}" let namePreEscape = "\(name)" let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let imageIndexPreEscape = "\(imageIndex)" let imageIndexPostEscape = imageIndexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageIndex}", with: imageIndexPostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tag": tag, "format": format, "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "cropWhitespace": cropWhitespace, "addPlayedIndicator": addPlayedIndicator, "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "HEAD", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Gets the item's image. - parameter itemId: (path) Item id. - parameter imageType: (path) Image type. - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter format: (query) Optional. The MediaBrowser.Model.Drawing.ImageFormat of the returned image. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter imageIndex: (query) Image index. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func headItemImage(itemId: UUID, imageType: ImageType7, maxWidth: Int? = nil, maxHeight: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, tag: String? = nil, cropWhitespace: Bool? = nil, format: Format7? = nil, addPlayedIndicator: Bool? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, imageIndex: Int? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { headItemImageWithRequestBuilder(itemId: itemId, imageType: imageType, maxWidth: maxWidth, maxHeight: maxHeight, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, tag: tag, cropWhitespace: cropWhitespace, format: format, addPlayedIndicator: addPlayedIndicator, percentPlayed: percentPlayed, unplayedCount: unplayedCount, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer, imageIndex: imageIndex).execute { (response, error) -> Void in completion(response?.body, error) } } /** Gets the item's image. - HEAD /Items/{itemId}/Images/{imageType} - - examples: [{contentType=application/json, example=""}] - parameter itemId: (path) Item id. - parameter imageType: (path) Image type. - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter format: (query) Optional. The MediaBrowser.Model.Drawing.ImageFormat of the returned image. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter imageIndex: (query) Image index. (optional) - returns: RequestBuilder */ open class func headItemImageWithRequestBuilder(itemId: UUID, imageType: ImageType7, maxWidth: Int? = nil, maxHeight: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, tag: String? = nil, cropWhitespace: Bool? = nil, format: Format7? = nil, addPlayedIndicator: Bool? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, imageIndex: Int? = nil) -> RequestBuilder { var path = "/Items/{itemId}/Images/{imageType}" let itemIdPreEscape = "\(itemId)" let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "tag": tag, "cropWhitespace": cropWhitespace, "format": format, "addPlayedIndicator": addPlayedIndicator, "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer, "imageIndex": imageIndex?.encodeToJSON() ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "HEAD", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Gets the item's image. - parameter itemId: (path) Item id. - parameter imageType: (path) Image type. - parameter maxWidth: (path) The maximum image width to return. - parameter maxHeight: (path) The maximum image height to return. - parameter tag: (path) Optional. Supply the cache tag from the item object to receive strong caching headers. - parameter format: (path) Determines the output format of the image - original,gif,jpg,png. - parameter percentPlayed: (path) Optional. Percent to render for the percent played overlay. - parameter unplayedCount: (path) Optional. Unplayed count overlay to render. - parameter imageIndex: (path) Image index. - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func headItemImage2(itemId: UUID, imageType: ImageType15, maxWidth: Int, maxHeight: Int, tag: String, format: Format11, percentPlayed: Double, unplayedCount: Int, imageIndex: Int, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { headItemImage2WithRequestBuilder(itemId: itemId, imageType: imageType, maxWidth: maxWidth, maxHeight: maxHeight, tag: tag, format: format, percentPlayed: percentPlayed, unplayedCount: unplayedCount, imageIndex: imageIndex, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, cropWhitespace: cropWhitespace, addPlayedIndicator: addPlayedIndicator, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer).execute { (response, error) -> Void in completion(response?.body, error) } } /** Gets the item's image. - HEAD /Items/{itemId}/Images/{imageType}/{imageIndex}/{tag}/{format}/{maxWidth}/{maxHeight}/{percentPlayed}/{unplayedCount} - - examples: [{contentType=application/json, example=""}] - parameter itemId: (path) Item id. - parameter imageType: (path) Image type. - parameter maxWidth: (path) The maximum image width to return. - parameter maxHeight: (path) The maximum image height to return. - parameter tag: (path) Optional. Supply the cache tag from the item object to receive strong caching headers. - parameter format: (path) Determines the output format of the image - original,gif,jpg,png. - parameter percentPlayed: (path) Optional. Percent to render for the percent played overlay. - parameter unplayedCount: (path) Optional. Unplayed count overlay to render. - parameter imageIndex: (path) Image index. - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - returns: RequestBuilder */ open class func headItemImage2WithRequestBuilder(itemId: UUID, imageType: ImageType15, maxWidth: Int, maxHeight: Int, tag: String, format: Format11, percentPlayed: Double, unplayedCount: Int, imageIndex: Int, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil) -> RequestBuilder { var path = "/Items/{itemId}/Images/{imageType}/{imageIndex}/{tag}/{format}/{maxWidth}/{maxHeight}/{percentPlayed}/{unplayedCount}" let itemIdPreEscape = "\(itemId)" let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let maxWidthPreEscape = "\(maxWidth)" let maxWidthPostEscape = maxWidthPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{maxWidth}", with: maxWidthPostEscape, options: .literal, range: nil) let maxHeightPreEscape = "\(maxHeight)" let maxHeightPostEscape = maxHeightPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{maxHeight}", with: maxHeightPostEscape, options: .literal, range: nil) let tagPreEscape = "\(tag)" let tagPostEscape = tagPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{tag}", with: tagPostEscape, options: .literal, range: nil) let formatPreEscape = "\(format)" let formatPostEscape = formatPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{format}", with: formatPostEscape, options: .literal, range: nil) let percentPlayedPreEscape = "\(percentPlayed)" let percentPlayedPostEscape = percentPlayedPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{percentPlayed}", with: percentPlayedPostEscape, options: .literal, range: nil) let unplayedCountPreEscape = "\(unplayedCount)" let unplayedCountPostEscape = unplayedCountPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{unplayedCount}", with: unplayedCountPostEscape, options: .literal, range: nil) let imageIndexPreEscape = "\(imageIndex)" let imageIndexPostEscape = imageIndexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageIndex}", with: imageIndexPostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "cropWhitespace": cropWhitespace, "addPlayedIndicator": addPlayedIndicator, "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "HEAD", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Gets the item's image. - parameter itemId: (path) Item id. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter format: (query) Optional. The MediaBrowser.Model.Drawing.ImageFormat of the returned image. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func headItemImageByIndex(itemId: UUID, imageType: ImageType11, imageIndex: Int, maxWidth: Int? = nil, maxHeight: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, tag: String? = nil, cropWhitespace: Bool? = nil, format: Format9? = nil, addPlayedIndicator: Bool? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { headItemImageByIndexWithRequestBuilder(itemId: itemId, imageType: imageType, imageIndex: imageIndex, maxWidth: maxWidth, maxHeight: maxHeight, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, tag: tag, cropWhitespace: cropWhitespace, format: format, addPlayedIndicator: addPlayedIndicator, percentPlayed: percentPlayed, unplayedCount: unplayedCount, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer).execute { (response, error) -> Void in completion(response?.body, error) } } /** Gets the item's image. - HEAD /Items/{itemId}/Images/{imageType}/{imageIndex} - - examples: [{contentType=application/json, example=""}] - parameter itemId: (path) Item id. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter format: (query) Optional. The MediaBrowser.Model.Drawing.ImageFormat of the returned image. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - returns: RequestBuilder */ open class func headItemImageByIndexWithRequestBuilder(itemId: UUID, imageType: ImageType11, imageIndex: Int, maxWidth: Int? = nil, maxHeight: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, tag: String? = nil, cropWhitespace: Bool? = nil, format: Format9? = nil, addPlayedIndicator: Bool? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil) -> RequestBuilder { var path = "/Items/{itemId}/Images/{imageType}/{imageIndex}" let itemIdPreEscape = "\(itemId)" let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let imageIndexPreEscape = "\(imageIndex)" let imageIndexPostEscape = imageIndexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageIndex}", with: imageIndexPostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "tag": tag, "cropWhitespace": cropWhitespace, "format": format, "addPlayedIndicator": addPlayedIndicator, "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "HEAD", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Get music genre image by name. - parameter name: (path) Music genre name. - parameter imageType: (path) Image type. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter imageIndex: (query) Image index. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func headMusicGenreImage(name: String, imageType: ImageType18, tag: String? = nil, format: Format13? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, imageIndex: Int? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { headMusicGenreImageWithRequestBuilder(name: name, imageType: imageType, tag: tag, format: format, maxWidth: maxWidth, maxHeight: maxHeight, percentPlayed: percentPlayed, unplayedCount: unplayedCount, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, cropWhitespace: cropWhitespace, addPlayedIndicator: addPlayedIndicator, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer, imageIndex: imageIndex).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get music genre image by name. - HEAD /MusicGenres/{name}/Images/{imageType} - - examples: [{contentType=application/json, example=""}] - parameter name: (path) Music genre name. - parameter imageType: (path) Image type. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter imageIndex: (query) Image index. (optional) - returns: RequestBuilder */ open class func headMusicGenreImageWithRequestBuilder(name: String, imageType: ImageType18, tag: String? = nil, format: Format13? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, imageIndex: Int? = nil) -> RequestBuilder { var path = "/MusicGenres/{name}/Images/{imageType}" let namePreEscape = "\(name)" let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tag": tag, "format": format, "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "cropWhitespace": cropWhitespace, "addPlayedIndicator": addPlayedIndicator, "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer, "imageIndex": imageIndex?.encodeToJSON() ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "HEAD", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Get music genre image by name. - parameter name: (path) Music genre name. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func headMusicGenreImageByIndex(name: String, imageType: ImageType20, imageIndex: Int, tag: String? = nil, format: Format15? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { headMusicGenreImageByIndexWithRequestBuilder(name: name, imageType: imageType, imageIndex: imageIndex, tag: tag, format: format, maxWidth: maxWidth, maxHeight: maxHeight, percentPlayed: percentPlayed, unplayedCount: unplayedCount, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, cropWhitespace: cropWhitespace, addPlayedIndicator: addPlayedIndicator, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get music genre image by name. - HEAD /MusicGenres/{name}/Images/{imageType}/{imageIndex} - - examples: [{contentType=application/json, example=""}] - parameter name: (path) Music genre name. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - returns: RequestBuilder */ open class func headMusicGenreImageByIndexWithRequestBuilder(name: String, imageType: ImageType20, imageIndex: Int, tag: String? = nil, format: Format15? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil) -> RequestBuilder { var path = "/MusicGenres/{name}/Images/{imageType}/{imageIndex}" let namePreEscape = "\(name)" let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let imageIndexPreEscape = "\(imageIndex)" let imageIndexPostEscape = imageIndexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageIndex}", with: imageIndexPostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tag": tag, "format": format, "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "cropWhitespace": cropWhitespace, "addPlayedIndicator": addPlayedIndicator, "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "HEAD", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Get person image by name. - parameter name: (path) Person name. - parameter imageType: (path) Image type. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter imageIndex: (query) Image index. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func headPersonImage(name: String, imageType: ImageType22, tag: String? = nil, format: Format17? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, imageIndex: Int? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { headPersonImageWithRequestBuilder(name: name, imageType: imageType, tag: tag, format: format, maxWidth: maxWidth, maxHeight: maxHeight, percentPlayed: percentPlayed, unplayedCount: unplayedCount, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, cropWhitespace: cropWhitespace, addPlayedIndicator: addPlayedIndicator, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer, imageIndex: imageIndex).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get person image by name. - HEAD /Persons/{name}/Images/{imageType} - - examples: [{contentType=application/json, example=""}] - parameter name: (path) Person name. - parameter imageType: (path) Image type. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter imageIndex: (query) Image index. (optional) - returns: RequestBuilder */ open class func headPersonImageWithRequestBuilder(name: String, imageType: ImageType22, tag: String? = nil, format: Format17? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, imageIndex: Int? = nil) -> RequestBuilder { var path = "/Persons/{name}/Images/{imageType}" let namePreEscape = "\(name)" let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tag": tag, "format": format, "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "cropWhitespace": cropWhitespace, "addPlayedIndicator": addPlayedIndicator, "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer, "imageIndex": imageIndex?.encodeToJSON() ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "HEAD", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Get person image by name. - parameter name: (path) Person name. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func headPersonImageByIndex(name: String, imageType: ImageType24, imageIndex: Int, tag: String? = nil, format: Format19? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { headPersonImageByIndexWithRequestBuilder(name: name, imageType: imageType, imageIndex: imageIndex, tag: tag, format: format, maxWidth: maxWidth, maxHeight: maxHeight, percentPlayed: percentPlayed, unplayedCount: unplayedCount, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, cropWhitespace: cropWhitespace, addPlayedIndicator: addPlayedIndicator, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get person image by name. - HEAD /Persons/{name}/Images/{imageType}/{imageIndex} - - examples: [{contentType=application/json, example=""}] - parameter name: (path) Person name. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - returns: RequestBuilder */ open class func headPersonImageByIndexWithRequestBuilder(name: String, imageType: ImageType24, imageIndex: Int, tag: String? = nil, format: Format19? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil) -> RequestBuilder { var path = "/Persons/{name}/Images/{imageType}/{imageIndex}" let namePreEscape = "\(name)" let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let imageIndexPreEscape = "\(imageIndex)" let imageIndexPostEscape = imageIndexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageIndex}", with: imageIndexPostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tag": tag, "format": format, "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "cropWhitespace": cropWhitespace, "addPlayedIndicator": addPlayedIndicator, "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "HEAD", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Get studio image by name. - parameter name: (path) Studio name. - parameter imageType: (path) Image type. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter imageIndex: (query) Image index. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func headStudioImage(name: String, imageType: ImageType26, tag: String? = nil, format: Format21? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, imageIndex: Int? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { headStudioImageWithRequestBuilder(name: name, imageType: imageType, tag: tag, format: format, maxWidth: maxWidth, maxHeight: maxHeight, percentPlayed: percentPlayed, unplayedCount: unplayedCount, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, cropWhitespace: cropWhitespace, addPlayedIndicator: addPlayedIndicator, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer, imageIndex: imageIndex).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get studio image by name. - HEAD /Studios/{name}/Images/{imageType} - - examples: [{contentType=application/json, example=""}] - parameter name: (path) Studio name. - parameter imageType: (path) Image type. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter imageIndex: (query) Image index. (optional) - returns: RequestBuilder */ open class func headStudioImageWithRequestBuilder(name: String, imageType: ImageType26, tag: String? = nil, format: Format21? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, imageIndex: Int? = nil) -> RequestBuilder { var path = "/Studios/{name}/Images/{imageType}" let namePreEscape = "\(name)" let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tag": tag, "format": format, "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "cropWhitespace": cropWhitespace, "addPlayedIndicator": addPlayedIndicator, "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer, "imageIndex": imageIndex?.encodeToJSON() ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "HEAD", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Get studio image by name. - parameter name: (path) Studio name. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func headStudioImageByIndex(name: String, imageType: ImageType28, imageIndex: Int, tag: String? = nil, format: Format23? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { headStudioImageByIndexWithRequestBuilder(name: name, imageType: imageType, imageIndex: imageIndex, tag: tag, format: format, maxWidth: maxWidth, maxHeight: maxHeight, percentPlayed: percentPlayed, unplayedCount: unplayedCount, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, cropWhitespace: cropWhitespace, addPlayedIndicator: addPlayedIndicator, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get studio image by name. - HEAD /Studios/{name}/Images/{imageType}/{imageIndex} - - examples: [{contentType=application/json, example=""}] - parameter name: (path) Studio name. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - returns: RequestBuilder */ open class func headStudioImageByIndexWithRequestBuilder(name: String, imageType: ImageType28, imageIndex: Int, tag: String? = nil, format: Format23? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil) -> RequestBuilder { var path = "/Studios/{name}/Images/{imageType}/{imageIndex}" let namePreEscape = "\(name)" let namePostEscape = namePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{name}", with: namePostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let imageIndexPreEscape = "\(imageIndex)" let imageIndexPostEscape = imageIndexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageIndex}", with: imageIndexPostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tag": tag, "format": format, "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "cropWhitespace": cropWhitespace, "addPlayedIndicator": addPlayedIndicator, "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "HEAD", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Get user profile image. - parameter userId: (path) User id. - parameter imageType: (path) Image type. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter imageIndex: (query) Image index. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func headUserImage(userId: UUID, imageType: ImageType30, tag: String? = nil, format: Format25? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, imageIndex: Int? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { headUserImageWithRequestBuilder(userId: userId, imageType: imageType, tag: tag, format: format, maxWidth: maxWidth, maxHeight: maxHeight, percentPlayed: percentPlayed, unplayedCount: unplayedCount, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, cropWhitespace: cropWhitespace, addPlayedIndicator: addPlayedIndicator, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer, imageIndex: imageIndex).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get user profile image. - HEAD /Users/{userId}/Images/{imageType} - - examples: [{contentType=application/json, example=""}] - parameter userId: (path) User id. - parameter imageType: (path) Image type. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter imageIndex: (query) Image index. (optional) - returns: RequestBuilder */ open class func headUserImageWithRequestBuilder(userId: UUID, imageType: ImageType30, tag: String? = nil, format: Format25? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, imageIndex: Int? = nil) -> RequestBuilder { var path = "/Users/{userId}/Images/{imageType}" let userIdPreEscape = "\(userId)" let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tag": tag, "format": format, "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "cropWhitespace": cropWhitespace, "addPlayedIndicator": addPlayedIndicator, "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer, "imageIndex": imageIndex?.encodeToJSON() ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "HEAD", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Get user profile image. - parameter userId: (path) User id. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func headUserImageByIndex(userId: UUID, imageType: ImageType34, imageIndex: Int, tag: String? = nil, format: Format27? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) { headUserImageByIndexWithRequestBuilder(userId: userId, imageType: imageType, imageIndex: imageIndex, tag: tag, format: format, maxWidth: maxWidth, maxHeight: maxHeight, percentPlayed: percentPlayed, unplayedCount: unplayedCount, width: width, height: height, quality: quality, fillWidth: fillWidth, fillHeight: fillHeight, cropWhitespace: cropWhitespace, addPlayedIndicator: addPlayedIndicator, blur: blur, backgroundColor: backgroundColor, foregroundLayer: foregroundLayer).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get user profile image. - HEAD /Users/{userId}/Images/{imageType}/{imageIndex} - - examples: [{contentType=application/json, example=""}] - parameter userId: (path) User id. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Image index. - parameter tag: (query) Optional. Supply the cache tag from the item object to receive strong caching headers. (optional) - parameter format: (query) Determines the output format of the image - original,gif,jpg,png. (optional) - parameter maxWidth: (query) The maximum image width to return. (optional) - parameter maxHeight: (query) The maximum image height to return. (optional) - parameter percentPlayed: (query) Optional. Percent to render for the percent played overlay. (optional) - parameter unplayedCount: (query) Optional. Unplayed count overlay to render. (optional) - parameter width: (query) The fixed image width to return. (optional) - parameter height: (query) The fixed image height to return. (optional) - parameter quality: (query) Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. (optional) - parameter fillWidth: (query) Width of box to fill. (optional) - parameter fillHeight: (query) Height of box to fill. (optional) - parameter cropWhitespace: (query) Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. (optional) - parameter addPlayedIndicator: (query) Optional. Add a played indicator. (optional) - parameter blur: (query) Optional. Blur image. (optional) - parameter backgroundColor: (query) Optional. Apply a background color for transparent images. (optional) - parameter foregroundLayer: (query) Optional. Apply a foreground layer on top of the image. (optional) - returns: RequestBuilder */ open class func headUserImageByIndexWithRequestBuilder(userId: UUID, imageType: ImageType34, imageIndex: Int, tag: String? = nil, format: Format27? = nil, maxWidth: Int? = nil, maxHeight: Int? = nil, percentPlayed: Double? = nil, unplayedCount: Int? = nil, width: Int? = nil, height: Int? = nil, quality: Int? = nil, fillWidth: Int? = nil, fillHeight: Int? = nil, cropWhitespace: Bool? = nil, addPlayedIndicator: Bool? = nil, blur: Int? = nil, backgroundColor: String? = nil, foregroundLayer: String? = nil) -> RequestBuilder { var path = "/Users/{userId}/Images/{imageType}/{imageIndex}" let userIdPreEscape = "\(userId)" let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let imageIndexPreEscape = "\(imageIndex)" let imageIndexPostEscape = imageIndexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageIndex}", with: imageIndexPostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tag": tag, "format": format, "maxWidth": maxWidth?.encodeToJSON(), "maxHeight": maxHeight?.encodeToJSON(), "percentPlayed": percentPlayed, "unplayedCount": unplayedCount?.encodeToJSON(), "width": width?.encodeToJSON(), "height": height?.encodeToJSON(), "quality": quality?.encodeToJSON(), "fillWidth": fillWidth?.encodeToJSON(), "fillHeight": fillHeight?.encodeToJSON(), "cropWhitespace": cropWhitespace, "addPlayedIndicator": addPlayedIndicator, "blur": blur?.encodeToJSON(), "backgroundColor": backgroundColor, "foregroundLayer": foregroundLayer ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "HEAD", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Sets the user image. - parameter userId: (path) User Id. - parameter imageType: (path) (Unused) Image type. - parameter body: (body) (optional) - parameter index: (query) (Unused) Image index. (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func postUserImage(userId: UUID, imageType: ImageType31, body: Object? = nil, index: Int? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { postUserImageWithRequestBuilder(userId: userId, imageType: imageType, body: body, index: index).execute { (response, error) -> Void in if error == nil { completion((), error) } else { completion(nil, error) } } } /** Sets the user image. - POST /Users/{userId}/Images/{imageType} - - API Key: - type: apiKey X-Emby-Authorization - name: CustomAuthentication - parameter userId: (path) User Id. - parameter imageType: (path) (Unused) Image type. - parameter body: (body) (optional) - parameter index: (query) (Unused) Image index. (optional) - returns: RequestBuilder */ open class func postUserImageWithRequestBuilder(userId: UUID, imageType: ImageType31, body: Object? = nil, index: Int? = nil) -> RequestBuilder { var path = "/Users/{userId}/Images/{imageType}" let userIdPreEscape = "\(userId)" let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "index": index?.encodeToJSON() ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) } /** Sets the user image. - parameter userId: (path) User Id. - parameter imageType: (path) (Unused) Image type. - parameter index: (path) (Unused) Image index. - parameter body: (body) (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func postUserImageByIndex(userId: UUID, imageType: ImageType35, index: Int, body: Object? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { postUserImageByIndexWithRequestBuilder(userId: userId, imageType: imageType, index: index, body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { completion(nil, error) } } } /** Sets the user image. - POST /Users/{userId}/Images/{imageType}/{index} - - API Key: - type: apiKey X-Emby-Authorization - name: CustomAuthentication - parameter userId: (path) User Id. - parameter imageType: (path) (Unused) Image type. - parameter index: (path) (Unused) Image index. - parameter body: (body) (optional) - returns: RequestBuilder */ open class func postUserImageByIndexWithRequestBuilder(userId: UUID, imageType: ImageType35, index: Int, body: Object? = nil) -> RequestBuilder { var path = "/Users/{userId}/Images/{imageType}/{index}" let userIdPreEscape = "\(userId)" let userIdPostEscape = userIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{userId}", with: userIdPostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let indexPreEscape = "\(index)" let indexPostEscape = indexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{index}", with: indexPostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) } /** Set item image. - parameter itemId: (path) Item id. - parameter imageType: (path) Image type. - parameter body: (body) (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func setItemImage(itemId: UUID, imageType: ImageType8, body: Object? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { setItemImageWithRequestBuilder(itemId: itemId, imageType: imageType, body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { completion(nil, error) } } } /** Set item image. - POST /Items/{itemId}/Images/{imageType} - - API Key: - type: apiKey X-Emby-Authorization - name: CustomAuthentication - parameter itemId: (path) Item id. - parameter imageType: (path) Image type. - parameter body: (body) (optional) - returns: RequestBuilder */ open class func setItemImageWithRequestBuilder(itemId: UUID, imageType: ImageType8, body: Object? = nil) -> RequestBuilder { var path = "/Items/{itemId}/Images/{imageType}" let itemIdPreEscape = "\(itemId)" let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) } /** Set item image. - parameter itemId: (path) Item id. - parameter imageType: (path) Image type. - parameter imageIndex: (path) (Unused) Image index. - parameter body: (body) (optional) - parameter completion: completion handler to receive the data and the error objects */ open class func setItemImageByIndex(itemId: UUID, imageType: ImageType12, imageIndex: Int, body: Object? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { setItemImageByIndexWithRequestBuilder(itemId: itemId, imageType: imageType, imageIndex: imageIndex, body: body).execute { (response, error) -> Void in if error == nil { completion((), error) } else { completion(nil, error) } } } /** Set item image. - POST /Items/{itemId}/Images/{imageType}/{imageIndex} - - API Key: - type: apiKey X-Emby-Authorization - name: CustomAuthentication - parameter itemId: (path) Item id. - parameter imageType: (path) Image type. - parameter imageIndex: (path) (Unused) Image index. - parameter body: (body) (optional) - returns: RequestBuilder */ open class func setItemImageByIndexWithRequestBuilder(itemId: UUID, imageType: ImageType12, imageIndex: Int, body: Object? = nil) -> RequestBuilder { var path = "/Items/{itemId}/Images/{imageType}/{imageIndex}" let itemIdPreEscape = "\(itemId)" let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let imageIndexPreEscape = "\(imageIndex)" let imageIndexPostEscape = imageIndexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageIndex}", with: imageIndexPostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) } /** Updates the index for an item image. - parameter itemId: (path) Item id. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Old image index. - parameter newIndex: (query) New image index. - parameter completion: completion handler to receive the data and the error objects */ open class func updateItemImageIndex(itemId: UUID, imageType: ImageType16, imageIndex: Int, newIndex: Int, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { updateItemImageIndexWithRequestBuilder(itemId: itemId, imageType: imageType, imageIndex: imageIndex, newIndex: newIndex).execute { (response, error) -> Void in if error == nil { completion((), error) } else { completion(nil, error) } } } /** Updates the index for an item image. - POST /Items/{itemId}/Images/{imageType}/{imageIndex}/Index - - API Key: - type: apiKey X-Emby-Authorization - name: CustomAuthentication - parameter itemId: (path) Item id. - parameter imageType: (path) Image type. - parameter imageIndex: (path) Old image index. - parameter newIndex: (query) New image index. - returns: RequestBuilder */ open class func updateItemImageIndexWithRequestBuilder(itemId: UUID, imageType: ImageType16, imageIndex: Int, newIndex: Int) -> RequestBuilder { var path = "/Items/{itemId}/Images/{imageType}/{imageIndex}/Index" let itemIdPreEscape = "\(itemId)" let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil) let imageTypePreEscape = "\(imageType)" let imageTypePostEscape = imageTypePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageType}", with: imageTypePostEscape, options: .literal, range: nil) let imageIndexPreEscape = "\(imageIndex)" let imageIndexPostEscape = imageIndexPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{imageIndex}", with: imageIndexPostEscape, options: .literal, range: nil) let URLString = SwaggerClientAPI.basePath + path let parameters: [String:Any]? = nil var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "newIndex": newIndex.encodeToJSON() ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } }