stories.togglePinned
Pin or unpin one or more stories
func (c *Client) StoriesTogglePinned(ctx context.Context, request *StoriesTogglePinnedRequest) ([]int, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.StoriesTogglePinned(ctx, &tg.StoriesTogglePinnedRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // []int
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Peer | InputPeerClass | yes | Peer where to pin or unpin stories |
ID | []int | yes | IDs of stories to pin or unpin |
Pinned | bool | yes | Whether to pin or unpin the stories |
Returns
[]int
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
stories.togglePinned#9a75a1ef