stories.searchPosts
Globally search for stories using a hashtag or a location media area, see here » for more info on the full flow. Either hashtag or area must be set when invoking the method.
func (c *Client) StoriesSearchPosts(ctx context.Context, request *StoriesSearchPostsRequest) (*StoriesFoundStories, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.StoriesSearchPosts(ctx, &tg.StoriesSearchPostsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *StoriesFoundStories
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Hashtag | string | — | Hashtag (without the #) |
Area | MediaAreaClass | — | A mediaAreaGeoPoint or a mediaAreaVenue. Note mediaAreaGeoPoint areas may be searched only if they have an associated address. |
Peer | InputPeerClass | — | If set, returns only stories posted by this peer. |
Offset | string | yes | Offset for pagination: initially an empty string, then the next_offset from the previously returned stories.foundStories. |
Limit | int | yes | Maximum number of results to return, see pagination |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | HASHTAG_INVALID | The specified hashtag is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
stories.searchPosts#d1810907