jellyfin-sdk-swift/docs/CollectionAPI.md
jellyfin-bot a524873ad0 Add type-mappings
Update stable OpenAPI client
2021-06-05 07:51:11 +09:00

5.4 KiB

CollectionAPI

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

Method HTTP request Description
addToCollection POST /Collections/{collectionId}/Items Adds items to a collection.
createCollection POST /Collections Creates a new collection.
removeFromCollection DELETE /Collections/{collectionId}/Items Removes items from a collection.

addToCollection

    open class func addToCollection(collectionId: String, ids: [String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void)

Adds items to a collection.

Example

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

let collectionId = "collectionId_example" // String | The collection id.
let ids = ["inner_example"] // [String] | Item ids, comma delimited.

// Adds items to a collection.
CollectionAPI.addToCollection(collectionId: collectionId, ids: ids) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
collectionId String The collection id.
ids **[String]** Item ids, comma delimited.

Return type

Void (empty response body)

Authorization

CustomAuthentication

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

createCollection

    open class func createCollection(name: String? = nil, ids: [String]? = nil, parentId: String? = nil, isLocked: Bool? = nil, completion: @escaping (_ data: CollectionCreationResult?, _ error: Error?) -> Void)

Creates a new collection.

Example

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

let name = "name_example" // String | The name of the collection. (optional)
let ids = ["inner_example"] // [String] | Item Ids to add to the collection. (optional)
let parentId = "parentId_example" // String | Optional. Create the collection within a specific folder. (optional)
let isLocked = true // Bool | Whether or not to lock the new collection. (optional) (default to false)

// Creates a new collection.
CollectionAPI.createCollection(name: name, ids: ids, parentId: parentId, isLocked: isLocked) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
name String The name of the collection. [optional]
ids **[String]** Item Ids to add to the collection. [optional]
parentId String Optional. Create the collection within a specific folder. [optional]
isLocked Bool Whether or not to lock the new collection. [optional] [default to false]

Return type

CollectionCreationResult

Authorization

CustomAuthentication

HTTP request headers

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

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

removeFromCollection

    open class func removeFromCollection(collectionId: String, ids: [String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void)

Removes items from a collection.

Example

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

let collectionId = "collectionId_example" // String | The collection id.
let ids = ["inner_example"] // [String] | Item ids, comma delimited.

// Removes items from a collection.
CollectionAPI.removeFromCollection(collectionId: collectionId, ids: ids) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
collectionId String The collection id.
ids **[String]** Item ids, comma delimited.

Return type

Void (empty response body)

Authorization

CustomAuthentication

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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