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

Method Delete

personalization.go:56–65  ·  view source on GitHub ↗

Delete removes data from the given resource, adding the given params to the request.

(ctx context.Context, resource string, params map[string]any)

Source from the content-addressed store, hash-verified

54
55// Delete removes data from the given resource, adding the given params to the request.
56func (c *PersonalizationClient) Delete(ctx context.Context, resource string, params map[string]any) (*PersonalizationResponse, error) {
57 if resource == "" {
58 return nil, errors.New("missing resource")
59 }
60 endpoint := c.client.makeEndpoint("%s/", resource)
61 for k, v := range params {
62 endpoint.addQueryParam(makeRequestOption(k, v))
63 }
64 return c.decode(c.client.delete(ctx, endpoint, nil, c.client.authenticator.personalizationAuth))
65}

Callers

nothing calls this directly

Calls 5

decodeMethod · 0.95
makeRequestOptionFunction · 0.85
makeEndpointMethod · 0.80
addQueryParamMethod · 0.80
deleteMethod · 0.80

Tested by

no test coverage detected