commonMain.org.jellyfin.sdk.api.operations.TrickplayApi.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.Int
import kotlin.String
import kotlin.collections.buildMap
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.model.UUID
public class TrickplayApi(
private val api: ApiClient,
) : Api {
/**
* Gets an image tiles playlist for trickplay.
*
* @param itemId The item id.
* @param width The width of a single tile.
* @param mediaSourceId The media version id, if using an alternate version.
*/
public suspend fun getTrickplayHlsPlaylist(
itemId: UUID,
width: Int,
mediaSourceId: UUID? = null,
): Response {
val pathParameters = buildMap(2) {
put("itemId", itemId)
put("width", width)
}
val queryParameters = buildMap(1) {
put("mediaSourceId", mediaSourceId)
}
val data = null
val response = api.`get`("/Videos/{itemId}/Trickplay/{width}/tiles.m3u8",
pathParameters, queryParameters, data)
return response
}
/**
* Gets an image tiles playlist for trickplay.
*
* @param itemId The item id.
* @param width The width of a single tile.
* @param mediaSourceId The media version id, if using an alternate version.
*/
public fun getTrickplayHlsPlaylistUrl(
itemId: UUID,
width: Int,
mediaSourceId: UUID? = null,
): String {
val pathParameters = buildMap(2) {
put("itemId", itemId)
put("width", width)
}
val queryParameters = buildMap(1) {
put("mediaSourceId", mediaSourceId)
}
return api.createUrl("/Videos/{itemId}/Trickplay/{width}/tiles.m3u8", pathParameters,
queryParameters)
}
/**
* Gets a trickplay tile image.
*
* @param itemId The item id.
* @param width The width of a single tile.
* @param index The index of the desired tile.
* @param mediaSourceId The media version id, if using an alternate version.
*/
public suspend fun getTrickplayTileImage(
itemId: UUID,
width: Int,
index: Int,
mediaSourceId: UUID? = null,
): Response {
val pathParameters = buildMap(3) {
put("itemId", itemId)
put("width", width)
put("index", index)
}
val queryParameters = buildMap(1) {
put("mediaSourceId", mediaSourceId)
}
val data = null
val response = api.`get`("/Videos/{itemId}/Trickplay/{width}/{index}.jpg",
pathParameters, queryParameters, data)
return response
}
/**
* Gets a trickplay tile image.
*
* @param itemId The item id.
* @param width The width of a single tile.
* @param index The index of the desired tile.
* @param mediaSourceId The media version id, if using an alternate version.
*/
public fun getTrickplayTileImageUrl(
itemId: UUID,
width: Int,
index: Int,
mediaSourceId: UUID? = null,
): String {
val pathParameters = buildMap(3) {
put("itemId", itemId)
put("width", width)
put("index", index)
}
val queryParameters = buildMap(1) {
put("mediaSourceId", mediaSourceId)
}
return api.createUrl("/Videos/{itemId}/Trickplay/{width}/{index}.jpg", pathParameters,
queryParameters)
}
}