-
Notifications
You must be signed in to change notification settings - Fork 2
/
method_params.go
200 lines (177 loc) · 9.63 KB
/
method_params.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
package tgo
// GetUpdatesParams https://core.telegram.org/bots/api#getupdates
type GetUpdatesParams struct {
Offset int `json:"offset,omitempty"`
Limit uint `json:"limit,omitempty"`
Timeout int `json:"timeout,omitempty"`
AllowedUpdates []string `json:"allowed_updates,omitempty"`
}
// https://core.telegram.org/bots/api#sendmessage
type SendMessageParams struct {
ChatID interface{} `json:"chat_id"`
Text string `json:"text"`
ParseMode string `json:"parse_mode,omitempty"`
DisableWebPagePreview bool `json:"disable_web_page_preview,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty"`
ReplyToMessageID int `json:"reply_to_message_id,omitempty"`
ReplyMarkup interface{} `json:"reply_markup,omitempty"`
}
// https://core.telegram.org/bots/api#forwardmessage
type ForwardMessageParams struct {
ChatID interface{} `json:"chat_id"`
FromChatID interface{} `json:"from_chat_id"`
DisableNotification bool `json:"disable_notification,omitempty"`
MessageID int `json:"message_id"`
}
// https://core.telegram.org/bots/api#sendphoto
type SendPhotoParams struct {
ChatID interface{} `json:"chat_id" form:"chat_id"`
Photo interface{} `json:"photo" form:"photo,inputFile"`
Caption string `json:"caption,omitempty" form:"caption,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty" form:"disable_notification,omitempty"`
ReplyToMessageID int `json:"reply_to_message_id,omitempty" form:"reply_to_message_id,omitempty"`
ReplyMarkup interface{} `json:"reply_markup,omitempty" form:"reply_markup,omitempty"`
}
// https://core.telegram.org/bots/api#sendaudio
type SendAudioParams struct {
ChatID interface{} `json:"chat_id" form:"chat_id"`
Audio interface{} `json:"audio" form:"audio,inputFile"`
Caption string `json:"caption,omitempty" form:"caption,omitempty"`
Duration uint `json:"duration,omitempty" form:"duration,omitempty"`
Performer string `json:"performer,omitempty" form:"performer,omitempty"`
Title string `json:"title,omitempty" form:"title,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty" form:"disable_notification,omitempty"`
ReplyToMessageID int `json:"reply_to_message_id,omitempty" form:"reply_to_message_id,omitempty"`
ReplyMarkup interface{} `json:"reply_markup,omitempty" form:"reply_markup,omitempty"`
}
// https://core.telegram.org/bots/api#senddocument
type SendDocumentParams struct {
ChatID interface{} `json:"chat_id" form:"chat_id"`
Document interface{} `json:"document" form:"document,inputFile"`
Caption string `json:"caption,omitempty" form:"caption,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty" form:"disable_notification,omitempty"`
ReplyToMessageID int `json:"reply_to_message_id,omitempty" form:"reply_to_message_id,omitempty"`
ReplyMarkup interface{} `json:"reply_markup,omitempty" form:"reply_markup,omitempty"`
}
// https://core.telegram.org/bots/api#sendsticker
type SendStickerParams struct {
ChatID interface{} `json:"chat_id" form:"chat_id"`
Sticker interface{} `json:"sticker" form:"sticker,inputFile"`
Caption string `json:"caption,omitempty" form:"caption,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty" form:"disable_notification,omitempty"`
ReplyToMessageID int `json:"reply_to_message_id,omitempty" form:"reply_to_message_id,omitempty"`
ReplyMarkup interface{} `json:"reply_markup,omitempty" form:"reply_markup,omitempty"`
}
// https://core.telegram.org/bots/api#sendvideo
type SendVideoParams struct {
ChatID interface{} `json:"chat_id" form:"chat_id"`
Video interface{} `json:"video" form:"video,inputFile"`
Duration uint `json:"duration,omitempty" form:"duration,omitempty"`
Width uint `json:"width,omitempty" form:"width,omitempty"`
Height uint `json:"height,omitempty" form:"height,omitempty"`
Caption string `json:"caption,omitempty" form:"caption,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty" form:"disable_notification,omitempty"`
ReplyToMessageID int `json:"reply_to_message_id,omitempty" form:"reply_to_message_id,omitempty"`
ReplyMarkup interface{} `json:"reply_markup,omitempty" form:"reply_markup,omitempty"`
}
// https://core.telegram.org/bots/api#sendvoice
type SendVoiceParams struct {
ChatID interface{} `json:"chat_id" form:"chat_id"`
Voice interface{} `json:"voice" form:"voice,inputFile"`
Caption string `json:"caption,omitempty" form:"caption,omitempty"`
Duration uint `json:"duration,omitempty" form:"duration,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty" form:"disable_notification,omitempty"`
ReplyToMessageID int `json:"reply_to_message_id,omitempty" form:"reply_to_message_id,omitempty"`
ReplyMarkup interface{} `json:"reply_markup,omitempty" form:"reply_markup,omitempty"`
}
// https://core.telegram.org/bots/api#sendlocation
type SendLocationParams struct {
ChatID interface{} `json:"chat_id"`
Latitude float32 `json:"latitude"`
Longitude float32 `json:"longitude"`
DisableNotification bool `json:"disable_notification,omitempty"`
ReplyToMessageID int `json:"reply_to_message_id,omitempty"`
ReplyMarkup interface{} `json:"reply_markup,omitempty"`
}
// https://core.telegram.org/bots/api#sendvenue
type SendVenueParams struct {
ChatID interface{} `json:"chat_id"`
Latitude float32 `json:"latitude"`
Longitude float32 `json:"longitude"`
Title string `json:"title"`
Address string `json:"address"`
FoursquareID string `json:"foursquare_id,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty"`
ReplyToMessageID int `json:"reply_to_message_id,omitempty"`
ReplyMarkup interface{} `json:"reply_markup,omitempty"`
}
// https://core.telegram.org/bots/api#sendcontact
type SendContactParams struct {
ChatID interface{} `json:"chat_id"`
PhoneNumber string `json:"phone_number"`
FirstName string `json:"first_name"`
LastName string `json:"last_name,omitempty"`
DisableNotification bool `json:"disable_notification,omitempty"`
ReplyToMessageID int `json:"reply_to_message_id,omitempty"`
ReplyMarkup interface{} `json:"reply_markup,omitempty"`
}
// https://core.telegram.org/bots/api#sendchataction
type SendChatActionParams struct {
ChatID interface{} `json:"chat_id"`
Action string `json:"action"`
}
// https://core.telegram.org/bots/api#getuserprofilephotos
type GetUserProfilePhotosParams struct {
UserID int `json:"user_id"`
Offset int `json:"offset,omitempty"`
Limit uint `json:"limit,omitempty"`
}
// https://core.telegram.org/bots/api#kickchatmember
type KickChatMemberParams struct {
ChatID interface{} `json:"chat_id"`
UserID int `json:"user_id"`
}
// https://core.telegram.org/bots/api#leavechat
type LeaveChatParams struct {
ChatID interface{} `json:"chat_id"`
}
// https://core.telegram.org/bots/api#unbanchatmember
type UnbanChatMemberParams struct {
ChatID interface{} `json:"chat_id"`
UserID int `json:"user_id"`
}
// https://core.telegram.org/bots/api#getchat
type GetChatParams struct {
ChatID interface{} `json:"chat_id"`
}
// https://core.telegram.org/bots/api#getchatadministrators
type GetChatAdministratorsParams struct {
ChatID interface{} `json:"chat_id"`
}
// https://core.telegram.org/bots/api#getchatmemberscount
type GetChatMembersCountParams struct {
ChatID interface{} `json:"chat_id"`
}
// https://core.telegram.org/bots/api#getchatmember
type GetChatMemberParams struct {
ChatID interface{} `json:"chat_id"`
UserID int `json:"user_id"`
}
// https://core.telegram.org/bots/api#answercallbackquery
type AnswerCallbackQueryParams struct {
ID string `json:"callback_query_id"`
Text string `json:"text,omitempty"`
ShowAlert bool `json:"show_alert,omitempty"`
URL string `json:"url,omitempty"`
CacheTime uint `json:"cache_time,omitempty"`
}
// https://core.telegram.org/bots/api#inlinequery
type AnswerInlineQueryParams struct {
InlineQueryID string `json:"inline_query_id"`
Results []InlineQueryResult `json:"results"`
CacheTime uint `json:"cache_time,omitempty"`
IsPersonal bool `json:"is_personal,omitempty"`
NextOffset string `json:"next_offset,omitempty"`
SwitchPmText string `json:"switch_pm_text,omitempty"`
SwitchPmParameter string `json:"switch_pm_parameter,omitempty"`
}