photos.getUserPhotos
Returns the list of user photos.
func (c *Client) PhotosGetUserPhotos(ctx context.Context, request *PhotosGetUserPhotosRequest) (PhotosPhotosClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.PhotosGetUserPhotos(ctx, &tg.PhotosGetUserPhotosRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // PhotosPhotosClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
UserID | InputUserClass | yes | User ID |
Offset | int | yes | Number of list elements to be skipped |
MaxID | int64 | yes | If a positive value was transferred, the method will return only photos with IDs less than the set one. This parameter is often useful when refetching file references », as in conjuction with limit=1 and offset=-1 the photo object with the id specified in max_id can be fetched. |
Limit | int | yes | Number of list elements to be returned |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | MAX_ID_INVALID | The provided max ID is invalid. |
| 400 | MSG_ID_INVALID | Invalid message ID provided. |
| 400 | USER_ID_INVALID | The provided user ID is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
photos.getUserPhotos#91cd32a8