Teams

class Teams(umami: Umami)

Provides functionalities for interacting with Teams in the Umami API.

Parameters

umami

The Umami instance used for making HTTP requests.

Constructors

Link copied to clipboard
constructor(umami: Umami)

Functions

Link copied to clipboard
suspend fun addUser(teamId: String, userId: String, role: String): TeamMember

Adds a user to a team.

Link copied to clipboard
suspend fun create(name: String): Team

Creates a new team.

Link copied to clipboard
suspend fun delete(teamId: String)

Deletes a team.

Link copied to clipboard
suspend fun find(page: Int? = null, pageSize: Int? = null): SearchResponse<Team>

Retrieves a paginated list of teams.

Link copied to clipboard
suspend fun get(teamId: String): Team

Retrieves a team by its ID.

Link copied to clipboard
suspend fun getUser(teamId: String, userId: String): TeamMember

Retrieves a user from a team.

Link copied to clipboard
suspend fun getUsers(teamId: String, search: String? = null, page: Int? = null, pageSize: Int? = null): SearchResponse<TeamMember>

Retrieves the users of a team.

Link copied to clipboard
suspend fun getWebsites(teamId: String, search: String? = null, page: Int? = null, pageSize: Int? = null): SearchResponse<Website>

Retrieves the websites of a team.

Link copied to clipboard
suspend fun join(accessCode: String): TeamMember

Joins a team.

Link copied to clipboard
suspend fun removeUser(teamId: String, userId: String)

Removes a user from a team.

Link copied to clipboard
suspend fun update(teamId: String, name: String? = null, accessCode: String? = null): Team

Updates a team.

Link copied to clipboard
suspend fun updateUserRole(teamId: String, userId: String, role: String): TeamMember

Updates a user's role in a team.