
commonMain.org.jellyfin.sdk.api.operations.DevicesApi.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jellyfin-api Show documentation
Show all versions of jellyfin-api Show documentation
Official Kotlin/Java SDK for Jellyfin. org.jellyfin.sdk:jellyfin-api
// !! WARNING
// !! DO NOT EDIT THIS FILE
//
// This file is generated by the openapi-generator module and is not meant for manual changes.
// Please read the README.md file in the openapi-generator module for additional information.
package org.jellyfin.sdk.api.operations
import kotlin.Any
import kotlin.Boolean
import kotlin.String
import kotlin.Unit
import kotlin.collections.emptyMap
import kotlin.collections.mutableMapOf
import org.jellyfin.sdk.api.client.ApiClient
import org.jellyfin.sdk.api.client.Response
import org.jellyfin.sdk.api.client.extensions.`get`
import org.jellyfin.sdk.api.client.extensions.delete
import org.jellyfin.sdk.api.client.extensions.post
import org.jellyfin.sdk.model.UUID
import org.jellyfin.sdk.model.api.DeviceInfo
import org.jellyfin.sdk.model.api.DeviceInfoQueryResult
import org.jellyfin.sdk.model.api.DeviceOptions
import org.jellyfin.sdk.model.api.DeviceOptionsDto
public class DevicesApi(
private val api: ApiClient,
) : Api {
/**
* Deletes a device.
*
* @param id Device Id.
*/
public suspend fun deleteDevice(id: String): Response {
val pathParameters = emptyMap()
val queryParameters = mutableMapOf()
queryParameters["id"] = id
val data = null
val response = api.delete("/Devices", pathParameters, queryParameters, data)
return response
}
/**
* Get info for a device.
*
* @param id Device Id.
*/
public suspend fun getDeviceInfo(id: String): Response {
val pathParameters = emptyMap()
val queryParameters = mutableMapOf()
queryParameters["id"] = id
val data = null
val response = api.`get`("/Devices/Info", pathParameters, queryParameters, data)
return response
}
/**
* Get options for a device.
*
* @param id Device Id.
*/
public suspend fun getDeviceOptions(id: String): Response {
val pathParameters = emptyMap()
val queryParameters = mutableMapOf()
queryParameters["id"] = id
val data = null
val response = api.`get`("/Devices/Options", pathParameters, queryParameters, data)
return response
}
/**
* Get Devices.
*
* @param supportsSync Gets or sets a value indicating whether [supports synchronize].
* @param userId Gets or sets the user identifier.
*/
public suspend fun getDevices(supportsSync: Boolean? = null, userId: UUID? = null):
Response {
val pathParameters = emptyMap()
val queryParameters = mutableMapOf()
queryParameters["supportsSync"] = supportsSync
queryParameters["userId"] = userId
val data = null
val response = api.`get`("/Devices", pathParameters, queryParameters, data)
return response
}
/**
* Update device options.
*
* @param id Device Id.
*/
public suspend fun updateDeviceOptions(id: String, `data`: DeviceOptionsDto): Response {
val pathParameters = emptyMap()
val queryParameters = mutableMapOf()
queryParameters["id"] = id
val response = api.post("/Devices/Options", pathParameters, queryParameters, data)
return response
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy