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

Method removeActivityByForeignID

client.go:582–594  ·  view source on GitHub ↗
(ctx context.Context, feed Feed, foreignID string)

Source from the content-addressed store, hash-verified

580}
581
582func (c *Client) removeActivityByForeignID(ctx context.Context, feed Feed, foreignID string) (*RemoveActivityResponse, error) {
583 endpoint := c.makeEndpoint("feed/%s/%s/%s/", feed.Slug(), feed.UserID(), foreignID)
584 endpoint.addQueryParam(makeRequestOption("foreign_id", 1))
585 resp, err := c.delete(ctx, endpoint, nil, c.authenticator.feedAuth(resFeed, feed))
586 if err != nil {
587 return nil, err
588 }
589 var out RemoveActivityResponse
590 if err := json.Unmarshal(resp, &out); err != nil {
591 return nil, err
592 }
593 return &out, nil
594}
595
596func (c *Client) getActivities(ctx context.Context, feed Feed, opts ...GetActivitiesOption) ([]byte, error) {
597 endpoint := c.makeEndpoint("feed/%s/%s/", feed.Slug(), feed.UserID())

Callers 1

Calls 7

makeEndpointMethod · 0.95
deleteMethod · 0.95
makeRequestOptionFunction · 0.85
addQueryParamMethod · 0.80
feedAuthMethod · 0.80
SlugMethod · 0.65
UserIDMethod · 0.65

Tested by

no test coverage detected