-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Feature: Implement Get User Details API (GET /api/users/:userId)
Background
This feature involves implementing the GET /api/users/:userId endpoint from the Umami API within the umami-kotlin library. This endpoint allows an authenticated user to retrieve detailed information about a specific user by their ID. This is essential for displaying user profiles, managing user-specific settings, or integrating with other user-centric features.
Implementing this functionality is crucial for providing comprehensive user management capabilities within the umami-kotlin client. It will enable applications to fetch and display individual user data, contributing to a more complete and interactive user experience. This work directly contributes to fulfilling the "Umami API" section of the project roadmap.
Acceptance criteria
- GIVEN the Umami client is configured with a valid
baseUrland an authenticated user,
WHEN a request is made to get details for a validuserIdvia a new API method (e.g.,umami.users.getUser(userId)),
THEN the client successfully sends aGETrequest to/api/users/:userId
AND the method returns a successful response containing the user's details. - GIVEN the Umami client is configured with a valid
baseUrland an authenticated user,
WHEN a request is made to get details for an invalid or non-existentuserIdvia the new API method,
THEN the client successfully sends aGETrequest to/api/users/:userId
AND the method returns an error response (or throws an appropriateUmamiNotFoundException) indicating the user was not found. - GIVEN the Umami client is configured with a valid
baseUrl,
WHEN a request is made to get user details by an unauthenticated user via the new API method,
THEN the client successfully sends aGETrequest to/api/users/:userId
AND the method returns an error response (or throws an appropriateUmamiAuthException) indicating insufficient privileges. - GIVEN the Umami client is configured,
WHEN a request is made to get user details and a network or server error occurs during the API call,
THEN the new API method throws an appropriate exception (e.g.,IOException,UmamiApiException). - GIVEN the
umami-kotlinlibrary is used in a project,
WHEN a developer initializes theUmamiclient usingUmami.create(),
THEN theUmamiinstance exposes a public method (e.g.,umami.users.getUser(userId: String): User) to interact with theGET /api/users/:userIdendpoint.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
To Do