Add voice and contact type documentation
parent
8e875a5711
commit
1b845170c1
26
types.go
26
types.go
|
@ -583,20 +583,32 @@ type VideoNote struct {
|
||||||
|
|
||||||
// Voice contains information about a voice.
|
// Voice contains information about a voice.
|
||||||
type Voice struct {
|
type Voice struct {
|
||||||
FileID string `json:"file_id"`
|
// FileID identifier for this file, which can be used to download or reuse the file
|
||||||
Duration int `json:"duration"`
|
FileID string `json:"file_id"`
|
||||||
MimeType string `json:"mime_type"` // optional
|
// Duration of the audio in seconds as defined by sender
|
||||||
FileSize int `json:"file_size"` // optional
|
Duration int `json:"duration"`
|
||||||
|
// MimeType of the file as defined by sender
|
||||||
|
// optional
|
||||||
|
MimeType string `json:"mime_type"`
|
||||||
|
// FileSize file size
|
||||||
|
// optional
|
||||||
|
FileSize int `json:"file_size"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Contact contains information about a contact.
|
// Contact contains information about a contact.
|
||||||
//
|
//
|
||||||
// Note that LastName and UserID may be empty.
|
// Note that LastName and UserID may be empty.
|
||||||
type Contact struct {
|
type Contact struct {
|
||||||
|
// PhoneNumber contact's phone number
|
||||||
PhoneNumber string `json:"phone_number"`
|
PhoneNumber string `json:"phone_number"`
|
||||||
FirstName string `json:"first_name"`
|
// FirstName contact's first name
|
||||||
LastName string `json:"last_name"` // optional
|
FirstName string `json:"first_name"`
|
||||||
UserID int `json:"user_id"` // optional
|
// LastName contact's last name
|
||||||
|
// optional
|
||||||
|
LastName string `json:"last_name"`
|
||||||
|
// UserID contact's user identifier in Telegram
|
||||||
|
// optional
|
||||||
|
UserID int `json:"user_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Location contains information about a place.
|
// Location contains information about a place.
|
||||||
|
|
Loading…
Reference in New Issue