UmamiUserService class

Service for user operations with the Umami API.

Constructors

UmamiUserService({required String endpoint})
Creates an instance of UmamiUserService.

Properties

endpoint String
Base endpoint of the Umami API.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createUser({required String token, required String username, required String password, required String role}) Future<Map<String, dynamic>?>
Creates a new user.
deleteUser({required String token, required String userId}) Future<bool>
Deletes a user.
getAllUsers({required String token}) Future<List?>
Lists all users. Admin access is required.
getUserById({required String token, required String userId}) Future<Map<String, dynamic>?>
Gets a user by ID.
getUserTeams({required String token, required String userId, String? query, int? page, int? pageSize, String? orderBy}) Future<List?>
Gets all teams that belong to a user.
getUserWebsites({required String token, required String userId, String? query, int? page, int? pageSize, String? orderBy}) Future<List?>
Gets all websites that belong to a user.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateUser({required String token, required String userId, String? username, String? password, String? role}) Future<Map<String, dynamic>?>
Updates a user.

Operators

operator ==(Object other) bool
The equality operator.
inherited