getUserProfilePhotos method

Future<UserProfilePhotos> getUserProfilePhotos(
  1. int userId, {
  2. int? offset,
  3. int? limit,
})

Use this method to get a list of profile pictures for a user

Returns a UserProfilePhotos object.

https://core.telegram.org/bots/api#getuserprofilephotos

Implementation

Future<UserProfilePhotos> getUserProfilePhotos(int userId,
    {int? offset, int? limit}) async {
  var requestUrl = _apiUri('getUserProfilePhotos');
  var body = <String, dynamic>{
    'user_id': userId,
    'offset': offset,
    'limit': limit,
  };
  return UserProfilePhotos.fromJson(
      await HttpClient.httpPost(requestUrl, body: body));
}