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

Method Get

users.go:44–48  ·  view source on GitHub ↗

Get retrieves a user having the given id.

(ctx context.Context, id string)

Source from the content-addressed store, hash-verified

42
43// Get retrieves a user having the given id.
44func (c *UsersClient) Get(ctx context.Context, id string) (*UserResponse, error) {
45 endpoint := c.client.makeEndpoint("user/%s/", id)
46
47 return c.decode(c.client.get(ctx, endpoint, nil, c.client.authenticator.usersAuth))
48}
49
50// Delete deletes a user having the given id.
51func (c *UsersClient) Delete(ctx context.Context, id string) (*BaseResponse, error) {

Callers 11

TestGetCollectionObjectFunction · 0.45
TestGetReactionFunction · 0.45
testRequestFunction · 0.45
parseIntValueFunction · 0.45
NewRateFunction · 0.45
parseNextMethod · 0.45
parseNextMethod · 0.45
TestFeedAuthFunction · 0.45
TestHeadersFunction · 0.45
TestGetUserFunction · 0.45
TestPersonalizationGetFunction · 0.45

Calls 3

decodeMethod · 0.95
makeEndpointMethod · 0.80
getMethod · 0.80

Tested by 7

TestGetCollectionObjectFunction · 0.36
TestGetReactionFunction · 0.36
testRequestFunction · 0.36
TestFeedAuthFunction · 0.36
TestHeadersFunction · 0.36
TestGetUserFunction · 0.36
TestPersonalizationGetFunction · 0.36