commonMain.org.jellyfin.sdk.api.operations.ConfigurationApi.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jellyfin-api-jvm Show documentation
Show all versions of jellyfin-api-jvm Show documentation
Official Kotlin/Java SDK for Jellyfin. org.jellyfin.sdk:jellyfin-api-jvm
// !! 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 io.ktor.utils.io.ByteReadChannel
import kotlin.Any
import kotlin.String
import kotlin.Unit
import kotlin.collections.buildMap
import kotlin.collections.emptyMap
import kotlinx.serialization.json.JsonElement
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.post
import org.jellyfin.sdk.model.api.MetadataOptions
import org.jellyfin.sdk.model.api.ServerConfiguration
public class ConfigurationApi(
private val api: ApiClient,
) : Api {
/**
* Gets application configuration.
*/
public suspend fun getConfiguration(): Response {
val pathParameters = emptyMap()
val queryParameters = emptyMap()
val data = null
val response = api.`get`("/System/Configuration", pathParameters,
queryParameters, data)
return response
}
/**
* Gets a default MetadataOptions object.
*/
public suspend fun getDefaultMetadataOptions(): Response {
val pathParameters = emptyMap()
val queryParameters = emptyMap()
val data = null
val response = api.`get`("/System/Configuration/MetadataOptions/Default",
pathParameters, queryParameters, data)
return response
}
/**
* Gets a named configuration.
*
* @param key Configuration key.
*/
public suspend fun getNamedConfiguration(key: String): Response {
val pathParameters = buildMap(1) {
put("key", key)
}
val queryParameters = emptyMap()
val data = null
val response = api.`get`("/System/Configuration/{key}", pathParameters,
queryParameters, data)
return response
}
/**
* Gets a named configuration.
*
* @param key Configuration key.
*/
public fun getNamedConfigurationUrl(key: String): String {
val pathParameters = buildMap(1) {
put("key", key)
}
val queryParameters = emptyMap()
return api.createUrl("/System/Configuration/{key}", pathParameters, queryParameters)
}
/**
* Updates application configuration.
*/
public suspend fun updateConfiguration(`data`: ServerConfiguration): Response {
val pathParameters = emptyMap()
val queryParameters = emptyMap()
val response = api.post("/System/Configuration", pathParameters, queryParameters, data)
return response
}
/**
* Updates named configuration.
*
* @param key Configuration key.
*/
public suspend fun updateNamedConfiguration(key: String, `data`: JsonElement): Response {
val pathParameters = buildMap(1) {
put("key", key)
}
val queryParameters = emptyMap()
val response = api.post("/System/Configuration/{key}", pathParameters, queryParameters,
data)
return response
}
}