Umami

class Umami(baseUrl: Url = Url("https://api.umami.is"), website: Uuid, hostname: Hostname? = null, language: Language? = null, screen: ScreenSize? = null, ip: Ip? = null, userAgent: String = createUserAgent(), eventQueueCapacity: Int = EVENT_QUEUE_CAPACITY)

The main class for interacting with the Umami API.

Constructors

Link copied to clipboard
constructor(baseUrl: Url = Url("https://api.umami.is"), website: Uuid, hostname: Hostname? = null, language: Language? = null, screen: ScreenSize? = null, ip: Ip? = null, userAgent: String = createUserAgent(), eventQueueCapacity: Int = EVENT_QUEUE_CAPACITY)

Creates an instance of Umami with the specified parameters using typesafe parameters.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun Umami.event(referrer: String? = null, title: String? = null, url: String? = null, name: String? = null, data: Map<String, Any?>? = null, tag: String? = null, timestamp: Long? = now(), id: String? = null)

Sends an event to the Umami API.

Link copied to clipboard
fun Umami.identify(data: Map<String, Any?>? = null, timestamp: Long? = now(), id: String? = null)

Sends an event to identify the user on the Umami server.