Something went wrong. Try again.
Go client library for the Semble API
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556package semble
import "context"
type FeedQuery struct { PageQuery URLType URLType Source, BeforeActivityID string ActivityTypes []string IncludeKnownBots bool}
type Activity struct { ID string `json:"id,omitempty"` Type string `json:"activityType,omitempty"` CreatedAt string `json:"createdAt,omitempty"` User *User `json:"user,omitempty"` Card *URLCard `json:"card,omitempty"` Collections []Collection `json:"collections,omitempty"` Connection *ConnectionView `json:"connection,omitempty"`}
func (c *Client) GetGlobalFeed( ctx context.Context, q FeedQuery,) (*Page[Activity], error) { var out Page[Activity] qs := append( pagination(q.PageQuery), qp("urlType", string(q.URLType)), qp("source", q.Source), qps("activityTypes", q.ActivityTypes), qp("includeKnownBots", q.IncludeKnownBots), qp("beforeActivityId", q.BeforeActivityID), )
return &out, c.get(ctx, "network.cosmik.feed.getGlobal", values(qs...), &out)}
func (c *Client) GetFollowingFeed( ctx context.Context, q FeedQuery,) (*Page[Activity], error) { var out Page[Activity] qs := append( pagination(q.PageQuery), qp("urlType", string(q.URLType)), qp("source", q.Source), qps("activityTypes", q.ActivityTypes), qp("includeKnownBots", q.IncludeKnownBots), qp("beforeActivityId", q.BeforeActivityID), )
return &out, c.get(ctx, "network.cosmik.feed.getFollowing", values(qs...), &out)}