Add animation, game score and webhook types documentation

bot-api-6.1
Ilya Kaznacheev 2020-10-24 17:05:16 +03:00
parent 5875a46cde
commit d885b2a983
No known key found for this signature in database
GPG Key ID: 7E2C1D8A4AB37D50
1 changed files with 45 additions and 14 deletions

View File

@ -1044,17 +1044,33 @@ type Game struct {
// Animation is a GIF animation demonstrating the game. // Animation is a GIF animation demonstrating the game.
type Animation struct { type Animation struct {
// FileID identifier for this file, which can be used to download or reuse the file.
FileID string `json:"file_id"` FileID string `json:"file_id"`
// Thumb animation thumbnail as defined by sender.
//
// optional
Thumb PhotoSize `json:"thumb"` Thumb PhotoSize `json:"thumb"`
// FileName original animation filename as defined by sender.
//
// optional
FileName string `json:"file_name"` FileName string `json:"file_name"`
// MimeType of the file as defined by sender.
//
// optional
MimeType string `json:"mime_type"` MimeType string `json:"mime_type"`
// FileSize ile size
//
// optional
FileSize int `json:"file_size"` FileSize int `json:"file_size"`
} }
// GameHighScore is a user's score and position on the leaderboard. // GameHighScore is a user's score and position on the leaderboard.
type GameHighScore struct { type GameHighScore struct {
// Position in high score table for the game
Position int `json:"position"` Position int `json:"position"`
// User user
User User `json:"user"` User User `json:"user"`
// Score score
Score int `json:"score"` Score int `json:"score"`
} }
@ -1063,12 +1079,27 @@ type CallbackGame struct{}
// WebhookInfo is information about a currently set webhook. // WebhookInfo is information about a currently set webhook.
type WebhookInfo struct { type WebhookInfo struct {
// URL webhook URL, may be empty if webhook is not set up.
URL string `json:"url"` URL string `json:"url"`
// HasCustomCertificate true, if a custom certificate was provided for webhook certificate checks.
HasCustomCertificate bool `json:"has_custom_certificate"` HasCustomCertificate bool `json:"has_custom_certificate"`
// PendingUpdateCount number of updates awaiting delivery.
PendingUpdateCount int `json:"pending_update_count"` PendingUpdateCount int `json:"pending_update_count"`
LastErrorDate int `json:"last_error_date"` // optional // LastErrorDate unix time for the most recent error
LastErrorMessage string `json:"last_error_message"` // optional // that happened when trying to deliver an update via webhook.
MaxConnections int `json:"max_connections"` // optional //
// optional
LastErrorDate int `json:"last_error_date"`
// LastErrorMessage error message in human-readable format for the most recent error
// that happened when trying to deliver an update via webhook.
//
// optional
LastErrorMessage string `json:"last_error_message"`
// MaxConnections maximum allowed number of simultaneous
// HTTPS connections to the webhook for update delivery.
//
// optional
MaxConnections int `json:"max_connections"`
} }
// IsSet returns true if a webhook is currently set. // IsSet returns true if a webhook is currently set.