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

commonMain.org.jellyfin.sdk.api.operations.SuggestionsApi.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 kotlin.Any
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.collections.Collection
import kotlin.collections.buildMap
import kotlin.collections.emptyList
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.model.UUID
import org.jellyfin.sdk.model.api.BaseItemDtoQueryResult
import org.jellyfin.sdk.model.api.BaseItemKind
import org.jellyfin.sdk.model.api.MediaType
import org.jellyfin.sdk.model.api.request.GetSuggestionsRequest

public class SuggestionsApi(
	private val api: ApiClient,
) : Api {
	/**
	 * Gets suggestions.
	 *
	 * @param userId The user id.
	 * @param mediaType The media types.
	 * @param type The type.
	 * @param startIndex Optional. The start index.
	 * @param limit Optional. The limit.
	 * @param enableTotalRecordCount Whether to enable the total record count.
	 */
	public suspend fun getSuggestions(
		userId: UUID? = null,
		mediaType: Collection? = emptyList(),
		type: Collection? = emptyList(),
		startIndex: Int? = null,
		limit: Int? = null,
		enableTotalRecordCount: Boolean? = false,
	): Response {
		val pathParameters = emptyMap()
		val queryParameters = buildMap(6) {
			put("userId", userId)
			put("mediaType", mediaType)
			put("type", type)
			put("startIndex", startIndex)
			put("limit", limit)
			put("enableTotalRecordCount", enableTotalRecordCount)
		}
		val data = null
		val response = api.`get`("/Items/Suggestions", pathParameters,
				queryParameters, data)
		return response
	}

	/**
	 * Gets suggestions.
	 *
	 * @param request The request parameters
	 */
	public suspend fun getSuggestions(request: GetSuggestionsRequest = GetSuggestionsRequest()):
			Response = getSuggestions(
		userId = request.userId,
		mediaType = request.mediaType,
		type = request.type,
		startIndex = request.startIndex,
		limit = request.limit,
		enableTotalRecordCount = request.enableTotalRecordCount,
	)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy