Update updates the user's data.
(ctx context.Context, id string, data map[string]any)
| 32 | |
| 33 | // Update updates the user's data. |
| 34 | func (c *UsersClient) Update(ctx context.Context, id string, data map[string]any) (*UserResponse, error) { |
| 35 | endpoint := c.client.makeEndpoint("user/%s/", id) |
| 36 | |
| 37 | reqData := map[string]any{ |
| 38 | "data": data, |
| 39 | } |
| 40 | return c.decode(c.client.put(ctx, endpoint, reqData, c.client.authenticator.usersAuth)) |
| 41 | } |
| 42 | |
| 43 | // Get retrieves a user having the given id. |
| 44 | func (c *UsersClient) Get(ctx context.Context, id string) (*UserResponse, error) { |