MCPcopy Create free account
hub / github.com/GetStream/stream-go2 / Update

Method Update

users.go:34–41  ·  view source on GitHub ↗

Update updates the user's data.

(ctx context.Context, id string, data map[string]any)

Source from the content-addressed store, hash-verified

32
33// Update updates the user's data.
34func (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.
44func (c *UsersClient) Get(ctx context.Context, id string) (*UserResponse, error) {

Callers 3

TestUpdateReactionFunction · 0.45
TestUpdateUserFunction · 0.45

Calls 3

decodeMethod · 0.95
makeEndpointMethod · 0.80
putMethod · 0.80

Tested by 3

TestUpdateReactionFunction · 0.36
TestUpdateUserFunction · 0.36