Layer 220
StoriesSearchPosts
Globally search for stories using a hashtag or a location media area, see here for more info on the full flow.
method
Users
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| Hashtag | flags.0?string | Hashtag (without the # ) |
| Area | flags.1?MediaArea | A media Area Geo Point or a media Area Venue. Note media Area Geo Point areas may be searched only if they have an associated address. |
| Peer | flags.2?InputPeer | If set, returns only stories posted by this peer. |
| Offset | string | Offset for pagination: initially an empty string, then the next_offset from the previously returned stories. found Stories. |
| Limit | int | Maximum number of results to return, see pagination |
Returns
stories.FoundStoriesPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | HASHTAG_INVALID | The specified hashtag is invalid. |
Gogram Example
// StoriesSearchPosts - using Params struct result, err := client.StoriesSearchPosts(&tg.StoriesSearchPostsParams{ Offset: "...", Limit: 0, // Optional fields: // Hashtag: "...", // Area: &tg.MediaArea{}, // Peer: &tg.InputPeerUser{UserID: int64(123456789)}, }) if err != nil { // handle error } // result is *tg.StoriesFoundStories