users.getSavedMusic
Get songs pinned to the user's profile, see here » for more info.
func (c *Client) UsersGetSavedMusic(ctx context.Context, request *UsersGetSavedMusicRequest) (UsersSavedMusicClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.UsersGetSavedMusic(ctx, &tg.UsersGetSavedMusicRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UsersSavedMusicClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
ID | InputUserClass | yes | The ID of the user. |
Offset | int | yes | Offset for pagination. |
Limit | int | yes | Maximum number of results to return, see pagination |
Hash | int64 | yes | Hash » of the IDs of previously added songs, to avoid returning any result if there was no change. |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | USER_ID_INVALID | The provided user ID is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
users.getSavedMusic#788d7fe3