create
fun create(baseUrl: String = "https://cloud.umami.is", website: String, hostname: String? = null, language: String? = null, screen: String? = null, ip: String? = null, userAgent: String = createUserAgent(), eventQueueCapacity: Int = EVENT_QUEUE_CAPACITY): Umami
Creates an Umami instance with string inputs, which are then parsed into appropriate types.
Return
An instance of Umami.
Parameters
baseUrl
The base URL of the Umami API. Defaults to "https://api.umami.is".
website
The UUID string of the website to track events for.
hostname
Optional hostname string for the website.
language
Optional language string of the user's browser.
screen
Optional screen size string of the user's device (e.g., "1920x1080").
ip
Optional IP address string of the user.
userAgent
The user agent string for HTTP requests. Defaults to a generated string createUserAgent.
eventQueueCapacity
The capacity of the event queue. Defaults to EVENT_QUEUE_CAPACITY.
Throws
if the website UUID string is invalid, or if other string parameters are invalid according to their respective domain classes.