SearchResponse

@Serializable
data class SearchResponse<T>(val data: List<T>, val count: Long, val page: Int, val pageSize: Int, val orderBy: String? = null)

Represents a generic search response structure from the Umami API. This data class encapsulates paginated results and metadata about the search.

Parameters

T

The type of data contained in the search results.

Constructors

Link copied to clipboard
constructor(data: List<T>, count: Long, page: Int, pageSize: Int, orderBy: String? = null)

Properties

Link copied to clipboard
@SerialName(value = "count")
val count: Long

The total number of items found across all pages matching the search criteria.

Link copied to clipboard
@SerialName(value = "data")
val data: List<T>

A list of items of type T representing the search results for the current page.

Link copied to clipboard
@SerialName(value = "orderBy")
val orderBy: String?

An optional string indicating the field by which the results are ordered.

Link copied to clipboard
@SerialName(value = "page")
val page: Int

The current page number of the search results (0-indexed).

Link copied to clipboard
@SerialName(value = "pageSize")
val pageSize: Int

The maximum number of items returned per page.