1
0
telegram/get_user_profile_photos.go

27 lines
671 B
Go
Raw Normal View History

package telegram
import json "github.com/pquerna/ffjson/ffjson"
type GetUserProfilePhotosParameters struct {
UserID int `json:"user_id"`
Offset int `json:"offset"`
Limit int `json:"limit"`
}
// GetUserProfilePhotos get a list of profile pictures for a user. Returns a UserProfilePhotos object.
func (bot *Bot) GetUserProfilePhotos(params *GetUserProfilePhotosParameters) (*UserProfilePhotos, error) {
dst, err := json.Marshal(params)
if err != nil {
return nil, err
}
2018-04-12 11:58:05 +00:00
resp, err := bot.request(dst, MethodGetUserProfilePhotos)
if err != nil {
return nil, err
}
var data UserProfilePhotos
err = json.Unmarshal(*resp.Result, &data)
return &data, err
}