Skip to main content

stories.togglePinnedToTop

Pin some stories to the top of the profile, see here » for more info.

func (c *Client) StoriesTogglePinnedToTop(ctx context.Context, request *StoriesTogglePinnedToTopRequest) (bool, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.StoriesTogglePinnedToTop(ctx, &tg.StoriesTogglePinnedToTopRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})

Parameters

NameTypeRequiredDescription
PeerInputPeerClassyesPeer where to pin stories.
ID[]intyesIDs of the stories to pin (max stories_pinned_to_top_count_max).

Returns

bool

Possible errors

CodeTypeDescription
400PEER_ID_INVALIDThe provided peer id is invalid.
400STORY_ID_INVALIDThe specified story ID is invalid.

References