updates.getDifference
Get new updates.
func (c *Client) UpdatesGetDifference(ctx context.Context, request *UpdatesGetDifferenceRequest) (UpdatesDifferenceClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.UpdatesGetDifference(ctx, &tg.UpdatesGetDifferenceRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UpdatesDifferenceClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Pts | int | yes | PTS, see updates. |
PtsLimit | int | — | PTS limit |
PtsTotalLimit | int | — | For fast updating: if provided and pts + pts_total_limit < remote pts, updates differenceTooLong will be returned.Simply tells the server to not return the difference if it is bigger than pts_total_limitIf the remote pts is too big (> ~4000000), this field will default to 1000000 |
Date | int | yes | date, see updates. |
Qts | int | yes | QTS, see updates. |
QtsLimit | int | — | QTS limit |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CDN_METHOD_INVALID | You can't call this method in a CDN DC. |
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
| 400 | CHANNEL_PRIVATE | You haven't joined this channel/supergroup. |
| 400 | CHAT_NOT_MODIFIED | No changes were made to chat information because the new information you passed is identical to the current information. |
| 403 | CHAT_WRITE_FORBIDDEN | You can't write in this chat. |
| 400 | DATE_EMPTY | Date empty. |
| 400 | MSG_ID_INVALID | Invalid message ID provided. |
| 400 | PERSISTENT_TIMESTAMP_EMPTY | Persistent timestamp empty. |
| 400 | PERSISTENT_TIMESTAMP_INVALID | Persistent timestamp invalid. |
| 500 | RANDOM_ID_DUPLICATE | You provided a random ID that was already used. |
| 400 | USERNAME_INVALID | The provided username is not valid. |
| 400 | USER_NOT_PARTICIPANT | You're not a member of this supergroup/channel. |
References
- Official documentation
- Generated Go reference
- TL definition:
updates.getDifference#19c2f763