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

Method Update

reactions.go:47–55  ·  view source on GitHub ↗

Update updates the reaction's data and/or target feeds.

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

Source from the content-addressed store, hash-verified

45
46// Update updates the reaction's data and/or target feeds.
47func (c *ReactionsClient) Update(ctx context.Context, id string, data map[string]any, targetFeeds []string) (*ReactionResponse, error) {
48 endpoint := c.client.makeEndpoint("reaction/%s/", id)
49
50 reqData := map[string]any{
51 "data": data,
52 "target_feeds": targetFeeds,
53 }
54 return c.decode(c.client.put(ctx, endpoint, reqData, c.client.authenticator.reactionsAuth))
55}
56
57// Get retrieves a reaction having the given id.
58func (c *ReactionsClient) Get(ctx context.Context, id string) (*ReactionResponse, error) {

Callers

nothing calls this directly

Calls 3

decodeMethod · 0.95
makeEndpointMethod · 0.80
putMethod · 0.80

Tested by

no test coverage detected