All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.org.jellyfin.sdk.api.operations.HlsSegmentApi.kt Maven / Gradle / Ivy

There is a newer version: 1.6.3
Show newest version
// !!        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 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

public class HlsSegmentApi(
	private val api: ApiClient,
) : Api {
	/**
	 * Gets the specified audio segment for an audio item.
	 *
	 * @param itemId The item id.
	 * @param segmentId The segment id.
	 */
	public suspend fun getHlsAudioSegmentLegacyAac(itemId: String, segmentId: String):
			Response {
		val pathParameters = buildMap(2) {
			put("itemId", itemId)
			put("segmentId", segmentId)
		}
		val queryParameters = emptyMap()
		val data = null
		val response = api.`get`("/Audio/{itemId}/hls/{segmentId}/stream.aac",
				pathParameters, queryParameters, data)
		return response
	}

	/**
	 * Gets the specified audio segment for an audio item.
	 *
	 * @param itemId The item id.
	 * @param segmentId The segment id.
	 */
	public fun getHlsAudioSegmentLegacyAacUrl(itemId: String, segmentId: String): String {
		val pathParameters = buildMap(2) {
			put("itemId", itemId)
			put("segmentId", segmentId)
		}
		val queryParameters = emptyMap()
		return api.createUrl("/Audio/{itemId}/hls/{segmentId}/stream.aac", pathParameters,
				queryParameters)
	}

	/**
	 * Gets the specified audio segment for an audio item.
	 *
	 * @param itemId The item id.
	 * @param segmentId The segment id.
	 */
	public suspend fun getHlsAudioSegmentLegacyMp3(itemId: String, segmentId: String):
			Response {
		val pathParameters = buildMap(2) {
			put("itemId", itemId)
			put("segmentId", segmentId)
		}
		val queryParameters = emptyMap()
		val data = null
		val response = api.`get`("/Audio/{itemId}/hls/{segmentId}/stream.mp3",
				pathParameters, queryParameters, data)
		return response
	}

	/**
	 * Gets the specified audio segment for an audio item.
	 *
	 * @param itemId The item id.
	 * @param segmentId The segment id.
	 */
	public fun getHlsAudioSegmentLegacyMp3Url(itemId: String, segmentId: String): String {
		val pathParameters = buildMap(2) {
			put("itemId", itemId)
			put("segmentId", segmentId)
		}
		val queryParameters = emptyMap()
		return api.createUrl("/Audio/{itemId}/hls/{segmentId}/stream.mp3", pathParameters,
				queryParameters)
	}

	/**
	 * Gets a hls video playlist.
	 *
	 * @param itemId The video id.
	 * @param playlistId The playlist id.
	 */
	public suspend fun getHlsPlaylistLegacy(itemId: String, playlistId: String):
			Response {
		val pathParameters = buildMap(2) {
			put("itemId", itemId)
			put("playlistId", playlistId)
		}
		val queryParameters = emptyMap()
		val data = null
		val response = api.`get`("/Videos/{itemId}/hls/{playlistId}/stream.m3u8",
				pathParameters, queryParameters, data)
		return response
	}

	/**
	 * Gets a hls video playlist.
	 *
	 * @param itemId The video id.
	 * @param playlistId The playlist id.
	 */
	public fun getHlsPlaylistLegacyUrl(itemId: String, playlistId: String): String {
		val pathParameters = buildMap(2) {
			put("itemId", itemId)
			put("playlistId", playlistId)
		}
		val queryParameters = emptyMap()
		return api.createUrl("/Videos/{itemId}/hls/{playlistId}/stream.m3u8", pathParameters,
				queryParameters)
	}

	/**
	 * Gets a hls video segment.
	 *
	 * @param itemId The item id.
	 * @param playlistId The playlist id.
	 * @param segmentId The segment id.
	 * @param segmentContainer The segment container.
	 */
	public suspend fun getHlsVideoSegmentLegacy(
		itemId: String,
		playlistId: String,
		segmentId: String,
		segmentContainer: String,
	): Response {
		val pathParameters = buildMap(4) {
			put("itemId", itemId)
			put("playlistId", playlistId)
			put("segmentId", segmentId)
			put("segmentContainer", segmentContainer)
		}
		val queryParameters = emptyMap()
		val data = null
		val response =
				api.`get`("/Videos/{itemId}/hls/{playlistId}/{segmentId}.{segmentContainer}",
				pathParameters, queryParameters, data)
		return response
	}

	/**
	 * Gets a hls video segment.
	 *
	 * @param itemId The item id.
	 * @param playlistId The playlist id.
	 * @param segmentId The segment id.
	 * @param segmentContainer The segment container.
	 */
	public fun getHlsVideoSegmentLegacyUrl(
		itemId: String,
		playlistId: String,
		segmentId: String,
		segmentContainer: String,
	): String {
		val pathParameters = buildMap(4) {
			put("itemId", itemId)
			put("playlistId", playlistId)
			put("segmentId", segmentId)
			put("segmentContainer", segmentContainer)
		}
		val queryParameters = emptyMap()
		return api.createUrl("/Videos/{itemId}/hls/{playlistId}/{segmentId}.{segmentContainer}",
				pathParameters, queryParameters)
	}

	/**
	 * Stops an active encoding.
	 *
	 * @param deviceId The device id of the client requesting. Used to stop encoding processes when
	 * needed.
	 * @param playSessionId The play session id.
	 */
	public suspend fun stopEncodingProcess(deviceId: String, playSessionId: String): Response {
		val pathParameters = emptyMap()
		val queryParameters = buildMap(2) {
			put("deviceId", deviceId)
			put("playSessionId", playSessionId)
		}
		val data = null
		val response = api.delete("/Videos/ActiveEncodings", pathParameters, queryParameters, data)
		return response
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy