SessionApi

class SessionApi(api: ApiClient) : Api

Constructors

Link copied to clipboard
constructor(api: ApiClient)

Functions

Link copied to clipboard
suspend fun addUserToSession(sessionId: String, userId: UUID): Response<Unit>

Adds an additional user to a session.

Link copied to clipboard
suspend fun displayContent(sessionId: String, itemType: BaseItemKind, itemId: String, itemName: String): Response<Unit>

Instructs a session to browse to an item or view.

Link copied to clipboard

Get all auth providers.

Link copied to clipboard

Get all password reset providers.

Link copied to clipboard
suspend fun getSessions(controllableByUserId: UUID? = null, deviceId: String? = null, activeWithinSeconds: Int? = null): Response<List<SessionInfoDto>>

Gets a list of sessions.

Link copied to clipboard
suspend fun play(request: PlayRequest): Response<Unit>
suspend fun play(sessionId: String, playCommand: PlayCommand, itemIds: Collection<UUID> = emptyList(), startPositionTicks: Long? = null, mediaSourceId: String? = null, audioStreamIndex: Int? = null, subtitleStreamIndex: Int? = null, startIndex: Int? = null): Response<Unit>

Instructs a session to play an item.

Link copied to clipboard
suspend fun postCapabilities(request: PostCapabilitiesRequest = PostCapabilitiesRequest()): Response<Unit>
suspend fun postCapabilities(id: String? = null, playableMediaTypes: Collection<MediaType>? = emptyList(), supportedCommands: Collection<GeneralCommandType>? = emptyList(), supportsMediaControl: Boolean? = false, supportsPersistentIdentifier: Boolean? = true): Response<Unit>

Updates capabilities for a device.

Link copied to clipboard

Updates capabilities for a device.

Link copied to clipboard
suspend fun removeUserFromSession(sessionId: String, userId: UUID): Response<Unit>

Removes an additional user from a session.

Link copied to clipboard

Reports that a session has ended.

Link copied to clipboard
suspend fun reportViewing(sessionId: String? = null, itemId: String): Response<Unit>

Reports that a session is viewing an item.

Link copied to clipboard
suspend fun sendFullGeneralCommand(sessionId: String, data: GeneralCommand): Response<Unit>

Issues a full general command to a client.

Link copied to clipboard
suspend fun sendGeneralCommand(sessionId: String, command: GeneralCommandType): Response<Unit>

Issues a general command to a client.

Link copied to clipboard
suspend fun sendMessageCommand(sessionId: String, data: MessageCommand): Response<Unit>

Issues a command to a client to display a message to the user.

Link copied to clipboard
suspend fun sendPlaystateCommand(sessionId: String, command: PlaystateCommand, seekPositionTicks: Long? = null, controllingUserId: String? = null): Response<Unit>

Issues a playstate command to a client.

Link copied to clipboard
suspend fun sendSystemCommand(sessionId: String, command: GeneralCommandType): Response<Unit>

Issues a system command to a client.