
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 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 io.ktor.utils.io.ByteReadChannel
import kotlin.Any
import kotlin.Boolean
import kotlin.String
import kotlin.Unit
import kotlin.collections.emptyMap
import kotlin.collections.mutableMapOf
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.MediaEncoderPathDto
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 = mutableMapOf()
pathParameters["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.
* @param includeCredentials Add the access token to the url to make an authenticated request.
*/
public fun getNamedConfigurationUrl(key: String, includeCredentials: Boolean = true): String {
val pathParameters = mutableMapOf()
pathParameters["key"] = key
val queryParameters = emptyMap()
return api.createUrl("/System/Configuration/{key}", pathParameters, queryParameters,
includeCredentials)
}
/**
* 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 the path to the media encoder.
*/
public suspend fun updateMediaEncoderPath(`data`: MediaEncoderPathDto): Response {
val pathParameters = emptyMap()
val queryParameters = emptyMap()
val response = api.post("/System/MediaEncoder/Path", pathParameters, queryParameters, data)
return response
}
/**
* Updates named configuration.
*
* @param key Configuration key.
*/
public suspend fun updateNamedConfiguration(key: String, `data`: JsonElement): Response {
val pathParameters = mutableMapOf()
pathParameters["key"] = key
val queryParameters = emptyMap()
val response = api.post("/System/Configuration/{key}", pathParameters, queryParameters,
data)
return response
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy