// // ItemLookupAPI.swift // // Generated by swagger-codegen // https://github.com/swagger-api/swagger-codegen // import Foundation import Alamofire open class ItemLookupAPI { /** Applies search criteria to an item and refreshes metadata. - parameter body: (body) The remote search result. - parameter itemId: (path) Item id. - parameter replaceAllImages: (query) Optional. Whether or not to replace all images. Default: True. (optional, default to true) - parameter completion: completion handler to receive the data and the error objects */ open class func applySearchCriteria(body: ApplyItemIdBody, itemId: UUID, replaceAllImages: Bool? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { applySearchCriteriaWithRequestBuilder(body: body, itemId: itemId, replaceAllImages: replaceAllImages).execute { (response, error) -> Void in if error == nil { completion((), error) } else { completion(nil, error) } } } /** Applies search criteria to an item and refreshes metadata. - POST /Items/RemoteSearch/Apply/{itemId} - - API Key: - type: apiKey X-Emby-Authorization - name: CustomAuthentication - parameter body: (body) The remote search result. - parameter itemId: (path) Item id. - parameter replaceAllImages: (query) Optional. Whether or not to replace all images. Default: True. (optional, default to true) - returns: RequestBuilder */ open class func applySearchCriteriaWithRequestBuilder(body: ApplyItemIdBody, itemId: UUID, replaceAllImages: Bool? = nil) -> RequestBuilder { var path = "/Items/RemoteSearch/Apply/{itemId}" 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 = JSONEncodingHelper.encodingParameters(forEncodableObject: body) var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "replaceAllImages": replaceAllImages ]) let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) } /** Get book remote search. - parameter body: (body) Remote search query. - parameter completion: completion handler to receive the data and the error objects */ open class func getBookRemoteSearchResults(body: RemoteSearchBookBody, completion: @escaping ((_ data: [RemoteSearchResult]?,_ error: Error?) -> Void)) { getBookRemoteSearchResultsWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get book remote search. - POST /Items/RemoteSearch/Book - - API Key: - type: apiKey X-Emby-Authorization - name: CustomAuthentication - examples: [{contentType=application/json, example=[ { "IndexNumberEnd" : 1, "ProductionYear" : 0, "PremiereDate" : "2000-01-23T04:56:07.000+00:00", "ImageUrl" : "ImageUrl", "IndexNumber" : 6, "Overview" : "Overview", "ParentIndexNumber" : 5, "SearchProviderName" : "SearchProviderName", "ProviderIds" : { "key" : "ProviderIds" }, "Artists" : [ null, null ], "AlbumArtist" : "", "Name" : "Name" }, { "IndexNumberEnd" : 1, "ProductionYear" : 0, "PremiereDate" : "2000-01-23T04:56:07.000+00:00", "ImageUrl" : "ImageUrl", "IndexNumber" : 6, "Overview" : "Overview", "ParentIndexNumber" : 5, "SearchProviderName" : "SearchProviderName", "ProviderIds" : { "key" : "ProviderIds" }, "Artists" : [ null, null ], "AlbumArtist" : "", "Name" : "Name" } ]}] - parameter body: (body) Remote search query. - returns: RequestBuilder<[RemoteSearchResult]> */ open class func getBookRemoteSearchResultsWithRequestBuilder(body: RemoteSearchBookBody) -> RequestBuilder<[RemoteSearchResult]> { let path = "/Items/RemoteSearch/Book" let URLString = SwaggerClientAPI.basePath + path let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder<[RemoteSearchResult]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) } /** Get box set remote search. - parameter body: (body) Remote search query. - parameter completion: completion handler to receive the data and the error objects */ open class func getBoxSetRemoteSearchResults(body: RemoteSearchBoxSetBody, completion: @escaping ((_ data: [RemoteSearchResult]?,_ error: Error?) -> Void)) { getBoxSetRemoteSearchResultsWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get box set remote search. - POST /Items/RemoteSearch/BoxSet - - API Key: - type: apiKey X-Emby-Authorization - name: CustomAuthentication - examples: [{contentType=application/json, example=[ { "IndexNumberEnd" : 1, "ProductionYear" : 0, "PremiereDate" : "2000-01-23T04:56:07.000+00:00", "ImageUrl" : "ImageUrl", "IndexNumber" : 6, "Overview" : "Overview", "ParentIndexNumber" : 5, "SearchProviderName" : "SearchProviderName", "ProviderIds" : { "key" : "ProviderIds" }, "Artists" : [ null, null ], "AlbumArtist" : "", "Name" : "Name" }, { "IndexNumberEnd" : 1, "ProductionYear" : 0, "PremiereDate" : "2000-01-23T04:56:07.000+00:00", "ImageUrl" : "ImageUrl", "IndexNumber" : 6, "Overview" : "Overview", "ParentIndexNumber" : 5, "SearchProviderName" : "SearchProviderName", "ProviderIds" : { "key" : "ProviderIds" }, "Artists" : [ null, null ], "AlbumArtist" : "", "Name" : "Name" } ]}] - parameter body: (body) Remote search query. - returns: RequestBuilder<[RemoteSearchResult]> */ open class func getBoxSetRemoteSearchResultsWithRequestBuilder(body: RemoteSearchBoxSetBody) -> RequestBuilder<[RemoteSearchResult]> { let path = "/Items/RemoteSearch/BoxSet" let URLString = SwaggerClientAPI.basePath + path let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder<[RemoteSearchResult]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) } /** Get the item's external id info. - parameter itemId: (path) Item id. - parameter completion: completion handler to receive the data and the error objects */ open class func getExternalIdInfos(itemId: UUID, completion: @escaping ((_ data: [ExternalIdInfo]?,_ error: Error?) -> Void)) { getExternalIdInfosWithRequestBuilder(itemId: itemId).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get the item's external id info. - GET /Items/{itemId}/ExternalIdInfos - - API Key: - type: apiKey X-Emby-Authorization - name: CustomAuthentication - examples: [{contentType=application/json, example=[ { "Type" : "", "Key" : "Key", "Name" : "Name", "UrlFormatString" : "UrlFormatString" }, { "Type" : "", "Key" : "Key", "Name" : "Name", "UrlFormatString" : "UrlFormatString" } ]}] - parameter itemId: (path) Item id. - returns: RequestBuilder<[ExternalIdInfo]> */ open class func getExternalIdInfosWithRequestBuilder(itemId: UUID) -> RequestBuilder<[ExternalIdInfo]> { var path = "/Items/{itemId}/ExternalIdInfos" 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<[ExternalIdInfo]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } /** Get movie remote search. - parameter body: (body) Remote search query. - parameter completion: completion handler to receive the data and the error objects */ open class func getMovieRemoteSearchResults(body: RemoteSearchMovieBody, completion: @escaping ((_ data: [RemoteSearchResult]?,_ error: Error?) -> Void)) { getMovieRemoteSearchResultsWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get movie remote search. - POST /Items/RemoteSearch/Movie - - API Key: - type: apiKey X-Emby-Authorization - name: CustomAuthentication - examples: [{contentType=application/json, example=[ { "IndexNumberEnd" : 1, "ProductionYear" : 0, "PremiereDate" : "2000-01-23T04:56:07.000+00:00", "ImageUrl" : "ImageUrl", "IndexNumber" : 6, "Overview" : "Overview", "ParentIndexNumber" : 5, "SearchProviderName" : "SearchProviderName", "ProviderIds" : { "key" : "ProviderIds" }, "Artists" : [ null, null ], "AlbumArtist" : "", "Name" : "Name" }, { "IndexNumberEnd" : 1, "ProductionYear" : 0, "PremiereDate" : "2000-01-23T04:56:07.000+00:00", "ImageUrl" : "ImageUrl", "IndexNumber" : 6, "Overview" : "Overview", "ParentIndexNumber" : 5, "SearchProviderName" : "SearchProviderName", "ProviderIds" : { "key" : "ProviderIds" }, "Artists" : [ null, null ], "AlbumArtist" : "", "Name" : "Name" } ]}] - parameter body: (body) Remote search query. - returns: RequestBuilder<[RemoteSearchResult]> */ open class func getMovieRemoteSearchResultsWithRequestBuilder(body: RemoteSearchMovieBody) -> RequestBuilder<[RemoteSearchResult]> { let path = "/Items/RemoteSearch/Movie" let URLString = SwaggerClientAPI.basePath + path let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder<[RemoteSearchResult]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) } /** Get music album remote search. - parameter body: (body) Remote search query. - parameter completion: completion handler to receive the data and the error objects */ open class func getMusicAlbumRemoteSearchResults(body: RemoteSearchMusicAlbumBody, completion: @escaping ((_ data: [RemoteSearchResult]?,_ error: Error?) -> Void)) { getMusicAlbumRemoteSearchResultsWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get music album remote search. - POST /Items/RemoteSearch/MusicAlbum - - API Key: - type: apiKey X-Emby-Authorization - name: CustomAuthentication - examples: [{contentType=application/json, example=[ { "IndexNumberEnd" : 1, "ProductionYear" : 0, "PremiereDate" : "2000-01-23T04:56:07.000+00:00", "ImageUrl" : "ImageUrl", "IndexNumber" : 6, "Overview" : "Overview", "ParentIndexNumber" : 5, "SearchProviderName" : "SearchProviderName", "ProviderIds" : { "key" : "ProviderIds" }, "Artists" : [ null, null ], "AlbumArtist" : "", "Name" : "Name" }, { "IndexNumberEnd" : 1, "ProductionYear" : 0, "PremiereDate" : "2000-01-23T04:56:07.000+00:00", "ImageUrl" : "ImageUrl", "IndexNumber" : 6, "Overview" : "Overview", "ParentIndexNumber" : 5, "SearchProviderName" : "SearchProviderName", "ProviderIds" : { "key" : "ProviderIds" }, "Artists" : [ null, null ], "AlbumArtist" : "", "Name" : "Name" } ]}] - parameter body: (body) Remote search query. - returns: RequestBuilder<[RemoteSearchResult]> */ open class func getMusicAlbumRemoteSearchResultsWithRequestBuilder(body: RemoteSearchMusicAlbumBody) -> RequestBuilder<[RemoteSearchResult]> { let path = "/Items/RemoteSearch/MusicAlbum" let URLString = SwaggerClientAPI.basePath + path let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder<[RemoteSearchResult]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) } /** Get music artist remote search. - parameter body: (body) Remote search query. - parameter completion: completion handler to receive the data and the error objects */ open class func getMusicArtistRemoteSearchResults(body: RemoteSearchMusicArtistBody, completion: @escaping ((_ data: [RemoteSearchResult]?,_ error: Error?) -> Void)) { getMusicArtistRemoteSearchResultsWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get music artist remote search. - POST /Items/RemoteSearch/MusicArtist - - API Key: - type: apiKey X-Emby-Authorization - name: CustomAuthentication - examples: [{contentType=application/json, example=[ { "IndexNumberEnd" : 1, "ProductionYear" : 0, "PremiereDate" : "2000-01-23T04:56:07.000+00:00", "ImageUrl" : "ImageUrl", "IndexNumber" : 6, "Overview" : "Overview", "ParentIndexNumber" : 5, "SearchProviderName" : "SearchProviderName", "ProviderIds" : { "key" : "ProviderIds" }, "Artists" : [ null, null ], "AlbumArtist" : "", "Name" : "Name" }, { "IndexNumberEnd" : 1, "ProductionYear" : 0, "PremiereDate" : "2000-01-23T04:56:07.000+00:00", "ImageUrl" : "ImageUrl", "IndexNumber" : 6, "Overview" : "Overview", "ParentIndexNumber" : 5, "SearchProviderName" : "SearchProviderName", "ProviderIds" : { "key" : "ProviderIds" }, "Artists" : [ null, null ], "AlbumArtist" : "", "Name" : "Name" } ]}] - parameter body: (body) Remote search query. - returns: RequestBuilder<[RemoteSearchResult]> */ open class func getMusicArtistRemoteSearchResultsWithRequestBuilder(body: RemoteSearchMusicArtistBody) -> RequestBuilder<[RemoteSearchResult]> { let path = "/Items/RemoteSearch/MusicArtist" let URLString = SwaggerClientAPI.basePath + path let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder<[RemoteSearchResult]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) } /** Get music video remote search. - parameter body: (body) Remote search query. - parameter completion: completion handler to receive the data and the error objects */ open class func getMusicVideoRemoteSearchResults(body: RemoteSearchMusicVideoBody, completion: @escaping ((_ data: [RemoteSearchResult]?,_ error: Error?) -> Void)) { getMusicVideoRemoteSearchResultsWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get music video remote search. - POST /Items/RemoteSearch/MusicVideo - - API Key: - type: apiKey X-Emby-Authorization - name: CustomAuthentication - examples: [{contentType=application/json, example=[ { "IndexNumberEnd" : 1, "ProductionYear" : 0, "PremiereDate" : "2000-01-23T04:56:07.000+00:00", "ImageUrl" : "ImageUrl", "IndexNumber" : 6, "Overview" : "Overview", "ParentIndexNumber" : 5, "SearchProviderName" : "SearchProviderName", "ProviderIds" : { "key" : "ProviderIds" }, "Artists" : [ null, null ], "AlbumArtist" : "", "Name" : "Name" }, { "IndexNumberEnd" : 1, "ProductionYear" : 0, "PremiereDate" : "2000-01-23T04:56:07.000+00:00", "ImageUrl" : "ImageUrl", "IndexNumber" : 6, "Overview" : "Overview", "ParentIndexNumber" : 5, "SearchProviderName" : "SearchProviderName", "ProviderIds" : { "key" : "ProviderIds" }, "Artists" : [ null, null ], "AlbumArtist" : "", "Name" : "Name" } ]}] - parameter body: (body) Remote search query. - returns: RequestBuilder<[RemoteSearchResult]> */ open class func getMusicVideoRemoteSearchResultsWithRequestBuilder(body: RemoteSearchMusicVideoBody) -> RequestBuilder<[RemoteSearchResult]> { let path = "/Items/RemoteSearch/MusicVideo" let URLString = SwaggerClientAPI.basePath + path let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder<[RemoteSearchResult]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) } /** Get person remote search. - parameter body: (body) Remote search query. - parameter completion: completion handler to receive the data and the error objects */ open class func getPersonRemoteSearchResults(body: RemoteSearchPersonBody, completion: @escaping ((_ data: [RemoteSearchResult]?,_ error: Error?) -> Void)) { getPersonRemoteSearchResultsWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get person remote search. - POST /Items/RemoteSearch/Person - - API Key: - type: apiKey X-Emby-Authorization - name: CustomAuthentication - examples: [{contentType=application/json, example=[ { "IndexNumberEnd" : 1, "ProductionYear" : 0, "PremiereDate" : "2000-01-23T04:56:07.000+00:00", "ImageUrl" : "ImageUrl", "IndexNumber" : 6, "Overview" : "Overview", "ParentIndexNumber" : 5, "SearchProviderName" : "SearchProviderName", "ProviderIds" : { "key" : "ProviderIds" }, "Artists" : [ null, null ], "AlbumArtist" : "", "Name" : "Name" }, { "IndexNumberEnd" : 1, "ProductionYear" : 0, "PremiereDate" : "2000-01-23T04:56:07.000+00:00", "ImageUrl" : "ImageUrl", "IndexNumber" : 6, "Overview" : "Overview", "ParentIndexNumber" : 5, "SearchProviderName" : "SearchProviderName", "ProviderIds" : { "key" : "ProviderIds" }, "Artists" : [ null, null ], "AlbumArtist" : "", "Name" : "Name" } ]}] - parameter body: (body) Remote search query. - returns: RequestBuilder<[RemoteSearchResult]> */ open class func getPersonRemoteSearchResultsWithRequestBuilder(body: RemoteSearchPersonBody) -> RequestBuilder<[RemoteSearchResult]> { let path = "/Items/RemoteSearch/Person" let URLString = SwaggerClientAPI.basePath + path let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder<[RemoteSearchResult]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) } /** Get series remote search. - parameter body: (body) Remote search query. - parameter completion: completion handler to receive the data and the error objects */ open class func getSeriesRemoteSearchResults(body: RemoteSearchSeriesBody, completion: @escaping ((_ data: [RemoteSearchResult]?,_ error: Error?) -> Void)) { getSeriesRemoteSearchResultsWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get series remote search. - POST /Items/RemoteSearch/Series - - API Key: - type: apiKey X-Emby-Authorization - name: CustomAuthentication - examples: [{contentType=application/json, example=[ { "IndexNumberEnd" : 1, "ProductionYear" : 0, "PremiereDate" : "2000-01-23T04:56:07.000+00:00", "ImageUrl" : "ImageUrl", "IndexNumber" : 6, "Overview" : "Overview", "ParentIndexNumber" : 5, "SearchProviderName" : "SearchProviderName", "ProviderIds" : { "key" : "ProviderIds" }, "Artists" : [ null, null ], "AlbumArtist" : "", "Name" : "Name" }, { "IndexNumberEnd" : 1, "ProductionYear" : 0, "PremiereDate" : "2000-01-23T04:56:07.000+00:00", "ImageUrl" : "ImageUrl", "IndexNumber" : 6, "Overview" : "Overview", "ParentIndexNumber" : 5, "SearchProviderName" : "SearchProviderName", "ProviderIds" : { "key" : "ProviderIds" }, "Artists" : [ null, null ], "AlbumArtist" : "", "Name" : "Name" } ]}] - parameter body: (body) Remote search query. - returns: RequestBuilder<[RemoteSearchResult]> */ open class func getSeriesRemoteSearchResultsWithRequestBuilder(body: RemoteSearchSeriesBody) -> RequestBuilder<[RemoteSearchResult]> { let path = "/Items/RemoteSearch/Series" let URLString = SwaggerClientAPI.basePath + path let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder<[RemoteSearchResult]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) } /** Get trailer remote search. - parameter body: (body) Remote search query. - parameter completion: completion handler to receive the data and the error objects */ open class func getTrailerRemoteSearchResults(body: RemoteSearchTrailerBody, completion: @escaping ((_ data: [RemoteSearchResult]?,_ error: Error?) -> Void)) { getTrailerRemoteSearchResultsWithRequestBuilder(body: body).execute { (response, error) -> Void in completion(response?.body, error) } } /** Get trailer remote search. - POST /Items/RemoteSearch/Trailer - - API Key: - type: apiKey X-Emby-Authorization - name: CustomAuthentication - examples: [{contentType=application/json, example=[ { "IndexNumberEnd" : 1, "ProductionYear" : 0, "PremiereDate" : "2000-01-23T04:56:07.000+00:00", "ImageUrl" : "ImageUrl", "IndexNumber" : 6, "Overview" : "Overview", "ParentIndexNumber" : 5, "SearchProviderName" : "SearchProviderName", "ProviderIds" : { "key" : "ProviderIds" }, "Artists" : [ null, null ], "AlbumArtist" : "", "Name" : "Name" }, { "IndexNumberEnd" : 1, "ProductionYear" : 0, "PremiereDate" : "2000-01-23T04:56:07.000+00:00", "ImageUrl" : "ImageUrl", "IndexNumber" : 6, "Overview" : "Overview", "ParentIndexNumber" : 5, "SearchProviderName" : "SearchProviderName", "ProviderIds" : { "key" : "ProviderIds" }, "Artists" : [ null, null ], "AlbumArtist" : "", "Name" : "Name" } ]}] - parameter body: (body) Remote search query. - returns: RequestBuilder<[RemoteSearchResult]> */ open class func getTrailerRemoteSearchResultsWithRequestBuilder(body: RemoteSearchTrailerBody) -> RequestBuilder<[RemoteSearchResult]> { let path = "/Items/RemoteSearch/Trailer" let URLString = SwaggerClientAPI.basePath + path let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder<[RemoteSearchResult]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) } }