Add animation, game score and webhook types documentation
parent
5875a46cde
commit
d885b2a983
59
types.go
59
types.go
|
@ -1044,18 +1044,34 @@ 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 string `json:"file_id"`
|
// FileID identifier for this file, which can be used to download or reuse the file.
|
||||||
Thumb PhotoSize `json:"thumb"`
|
FileID string `json:"file_id"`
|
||||||
FileName string `json:"file_name"`
|
// Thumb animation thumbnail as defined by sender.
|
||||||
MimeType string `json:"mime_type"`
|
//
|
||||||
FileSize int `json:"file_size"`
|
// optional
|
||||||
|
Thumb PhotoSize `json:"thumb"`
|
||||||
|
// FileName original animation filename as defined by sender.
|
||||||
|
//
|
||||||
|
// optional
|
||||||
|
FileName string `json:"file_name"`
|
||||||
|
// MimeType of the file as defined by sender.
|
||||||
|
//
|
||||||
|
// optional
|
||||||
|
MimeType string `json:"mime_type"`
|
||||||
|
// FileSize ile size
|
||||||
|
//
|
||||||
|
// optional
|
||||||
|
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 int `json:"position"`
|
// Position in high score table for the game
|
||||||
User User `json:"user"`
|
Position int `json:"position"`
|
||||||
Score int `json:"score"`
|
// User user
|
||||||
|
User User `json:"user"`
|
||||||
|
// Score score
|
||||||
|
Score int `json:"score"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CallbackGame is for starting a game in an inline keyboard button.
|
// CallbackGame is for starting a game in an inline keyboard button.
|
||||||
|
@ -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 string `json:"url"`
|
// URL webhook URL, may be empty if webhook is not set up.
|
||||||
HasCustomCertificate bool `json:"has_custom_certificate"`
|
URL string `json:"url"`
|
||||||
PendingUpdateCount int `json:"pending_update_count"`
|
// HasCustomCertificate true, if a custom certificate was provided for webhook certificate checks.
|
||||||
LastErrorDate int `json:"last_error_date"` // optional
|
HasCustomCertificate bool `json:"has_custom_certificate"`
|
||||||
LastErrorMessage string `json:"last_error_message"` // optional
|
// PendingUpdateCount number of updates awaiting delivery.
|
||||||
MaxConnections int `json:"max_connections"` // optional
|
PendingUpdateCount int `json:"pending_update_count"`
|
||||||
|
// LastErrorDate unix time for the most recent error
|
||||||
|
// that happened when trying to deliver an update via webhook.
|
||||||
|
//
|
||||||
|
// 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.
|
||||||
|
|
Loading…
Reference in New Issue