teleswagger 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (368) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/Gemfile.lock +69 -0
  4. data/README.md +260 -0
  5. data/Rakefile +8 -0
  6. data/config.json +5 -0
  7. data/docs/AddStickerToSetLinkBody.md +12 -0
  8. data/docs/AllowedUpdate.md +7 -0
  9. data/docs/Animation.md +12 -0
  10. data/docs/AnswerInlineQueryBody.md +14 -0
  11. data/docs/AnswerShippingQueryBody.md +11 -0
  12. data/docs/AttachmentsApi.md +1023 -0
  13. data/docs/Audio.md +13 -0
  14. data/docs/CallbackGame.md +7 -0
  15. data/docs/CallbackQuery.md +14 -0
  16. data/docs/CallbacksApi.md +70 -0
  17. data/docs/Chat.md +18 -0
  18. data/docs/ChatMember.md +23 -0
  19. data/docs/ChatPhoto.md +9 -0
  20. data/docs/ChatsApi.md +890 -0
  21. data/docs/ChosenInlineResult.md +12 -0
  22. data/docs/Contact.md +11 -0
  23. data/docs/CreateNewStickerSetLinkBody.md +14 -0
  24. data/docs/Document.md +12 -0
  25. data/docs/EditMessageCaptionBody.md +12 -0
  26. data/docs/EditMessageReplyMarkupBody.md +11 -0
  27. data/docs/EditMessageTextBody.md +14 -0
  28. data/docs/Error.md +10 -0
  29. data/docs/File.md +10 -0
  30. data/docs/ForceReply.md +9 -0
  31. data/docs/Game.md +13 -0
  32. data/docs/GameHighScore.md +10 -0
  33. data/docs/GamesApi.md +182 -0
  34. data/docs/InlineApi.md +59 -0
  35. data/docs/InlineKeyboardButton.md +14 -0
  36. data/docs/InlineKeyboardMarkup.md +8 -0
  37. data/docs/InlineQuery.md +12 -0
  38. data/docs/InlineQueryResultArticle.md +18 -0
  39. data/docs/InlineQueryResultAudio.md +16 -0
  40. data/docs/InlineQueryResultCachedAudio.md +13 -0
  41. data/docs/InlineQueryResultCachedDocument.md +14 -0
  42. data/docs/InlineQueryResultCachedGif.md +14 -0
  43. data/docs/InlineQueryResultCachedMpeg4Gif.md +14 -0
  44. data/docs/InlineQueryResultCachedPhoto.md +15 -0
  45. data/docs/InlineQueryResultCachedSticker.md +12 -0
  46. data/docs/InlineQueryResultCachedVideo.md +15 -0
  47. data/docs/InlineQueryResultCachedVoice.md +14 -0
  48. data/docs/InlineQueryResultContact.md +17 -0
  49. data/docs/InlineQueryResultDocument.md +19 -0
  50. data/docs/InlineQueryResultGame.md +11 -0
  51. data/docs/InlineQueryResultGif.md +18 -0
  52. data/docs/InlineQueryResultLocation.md +17 -0
  53. data/docs/InlineQueryResultMpeg4Gif.md +18 -0
  54. data/docs/InlineQueryResultPhoto.md +17 -0
  55. data/docs/InlineQueryResultVenue.md +19 -0
  56. data/docs/InlineQueryResultVideo.md +20 -0
  57. data/docs/InlineQueryResultVoice.md +15 -0
  58. data/docs/InlineResponse200.md +11 -0
  59. data/docs/InlineResponse2001.md +11 -0
  60. data/docs/InlineResponse2002.md +11 -0
  61. data/docs/InlineResponse2003.md +11 -0
  62. data/docs/InlineResponse2004.md +11 -0
  63. data/docs/InlineResponse2005.md +11 -0
  64. data/docs/InlineResponse2006.md +11 -0
  65. data/docs/InlineResponse2007.md +11 -0
  66. data/docs/InlineResponse2008.md +11 -0
  67. data/docs/InlineResponse2009.md +11 -0
  68. data/docs/InlineType.md +7 -0
  69. data/docs/InputContactMessageContent.md +10 -0
  70. data/docs/InputLocationMessageContent.md +9 -0
  71. data/docs/InputTextMessageContent.md +10 -0
  72. data/docs/InputVenueMessageContent.md +12 -0
  73. data/docs/Invoice.md +12 -0
  74. data/docs/KeyboardButton.md +10 -0
  75. data/docs/LabeledPrice.md +9 -0
  76. data/docs/Location.md +9 -0
  77. data/docs/MaskPosition.md +11 -0
  78. data/docs/Message.md +45 -0
  79. data/docs/MessageEntity.md +12 -0
  80. data/docs/MessagesApi.md +375 -0
  81. data/docs/OrderInfo.md +11 -0
  82. data/docs/ParseMode.md +7 -0
  83. data/docs/PaymentsApi.md +167 -0
  84. data/docs/PhotoSize.md +11 -0
  85. data/docs/PreCheckoutQuery.md +14 -0
  86. data/docs/PromoteChatMemberBody.md +17 -0
  87. data/docs/ReplyKeyboardMarkup.md +11 -0
  88. data/docs/ReplyKeyboardRemove.md +9 -0
  89. data/docs/ResponseBool.md +11 -0
  90. data/docs/ResponseMessage.md +11 -0
  91. data/docs/ResponseParameters.md +9 -0
  92. data/docs/ResponseUpdate.md +11 -0
  93. data/docs/RestrictChatMemberBody.md +14 -0
  94. data/docs/SendAudioLinkBody.md +16 -0
  95. data/docs/SendContactBody.md +14 -0
  96. data/docs/SendDocumentLinkBody.md +13 -0
  97. data/docs/SendGameBody.md +12 -0
  98. data/docs/SendInvoiceBody.md +27 -0
  99. data/docs/SendLocationBody.md +13 -0
  100. data/docs/SendMessageBody.md +14 -0
  101. data/docs/SendPhotoLinkBody.md +13 -0
  102. data/docs/SendStickerLinkBody.md +12 -0
  103. data/docs/SendVenueBody.md +16 -0
  104. data/docs/SendVideoLinkBody.md +16 -0
  105. data/docs/SendVideoNoteLinkBody.md +14 -0
  106. data/docs/SendVoiceLinkBody.md +14 -0
  107. data/docs/ShippingAddress.md +13 -0
  108. data/docs/ShippingOption.md +10 -0
  109. data/docs/ShippingQuery.md +11 -0
  110. data/docs/Sticker.md +15 -0
  111. data/docs/StickerSet.md +11 -0
  112. data/docs/StickersApi.md +498 -0
  113. data/docs/SuccessfulPayment.md +14 -0
  114. data/docs/Update.md +17 -0
  115. data/docs/UpdatesApi.md +205 -0
  116. data/docs/User.md +13 -0
  117. data/docs/UserProfilePhotos.md +9 -0
  118. data/docs/UsersApi.md +111 -0
  119. data/docs/Venue.md +11 -0
  120. data/docs/Video.md +14 -0
  121. data/docs/VideoNote.md +12 -0
  122. data/docs/Voice.md +11 -0
  123. data/docs/WebhookInfo.md +14 -0
  124. data/lib/teleswagger.rb +156 -0
  125. data/lib/teleswagger/api/attachments_api.rb +1243 -0
  126. data/lib/teleswagger/api/callbacks_api.rb +113 -0
  127. data/lib/teleswagger/api/chats_api.rb +1141 -0
  128. data/lib/teleswagger/api/games_api.rb +235 -0
  129. data/lib/teleswagger/api/inline_api.rb +80 -0
  130. data/lib/teleswagger/api/messages_api.rb +460 -0
  131. data/lib/teleswagger/api/payments_api.rb +209 -0
  132. data/lib/teleswagger/api/stickers_api.rb +658 -0
  133. data/lib/teleswagger/api/updates_api.rb +265 -0
  134. data/lib/teleswagger/api/users_api.rb +146 -0
  135. data/lib/teleswagger/api_client.rb +388 -0
  136. data/lib/teleswagger/api_error.rb +38 -0
  137. data/lib/teleswagger/configuration.rb +202 -0
  138. data/lib/teleswagger/models/add_sticker_to_set_link_body.rb +244 -0
  139. data/lib/teleswagger/models/allowed_update.rb +27 -0
  140. data/lib/teleswagger/models/animation.rb +229 -0
  141. data/lib/teleswagger/models/answer_inline_query_body.rb +254 -0
  142. data/lib/teleswagger/models/answer_shipping_query_body.rb +227 -0
  143. data/lib/teleswagger/models/audio.rb +233 -0
  144. data/lib/teleswagger/models/callback_game.rb +179 -0
  145. data/lib/teleswagger/models/callback_query.rb +242 -0
  146. data/lib/teleswagger/models/chat.rb +321 -0
  147. data/lib/teleswagger/models/chat_member.rb +366 -0
  148. data/lib/teleswagger/models/chat_photo.rb +197 -0
  149. data/lib/teleswagger/models/chosen_inline_result.rb +239 -0
  150. data/lib/teleswagger/models/contact.rb +215 -0
  151. data/lib/teleswagger/models/create_new_sticker_set_link_body.rb +267 -0
  152. data/lib/teleswagger/models/document.rb +224 -0
  153. data/lib/teleswagger/models/edit_message_caption_body.rb +224 -0
  154. data/lib/teleswagger/models/edit_message_reply_markup_body.rb +215 -0
  155. data/lib/teleswagger/models/edit_message_text_body.rb +247 -0
  156. data/lib/teleswagger/models/error.rb +206 -0
  157. data/lib/teleswagger/models/file.rb +206 -0
  158. data/lib/teleswagger/models/force_reply.rb +197 -0
  159. data/lib/teleswagger/models/game.rb +252 -0
  160. data/lib/teleswagger/models/game_high_score.rb +206 -0
  161. data/lib/teleswagger/models/inline_keyboard_button.rb +242 -0
  162. data/lib/teleswagger/models/inline_keyboard_markup.rb +190 -0
  163. data/lib/teleswagger/models/inline_query.rb +224 -0
  164. data/lib/teleswagger/models/inline_query_result_article.rb +298 -0
  165. data/lib/teleswagger/models/inline_query_result_audio.rb +280 -0
  166. data/lib/teleswagger/models/inline_query_result_cached_audio.rb +248 -0
  167. data/lib/teleswagger/models/inline_query_result_cached_document.rb +257 -0
  168. data/lib/teleswagger/models/inline_query_result_cached_gif.rb +257 -0
  169. data/lib/teleswagger/models/inline_query_result_cached_mpeg4_gif.rb +257 -0
  170. data/lib/teleswagger/models/inline_query_result_cached_photo.rb +266 -0
  171. data/lib/teleswagger/models/inline_query_result_cached_sticker.rb +239 -0
  172. data/lib/teleswagger/models/inline_query_result_cached_video.rb +266 -0
  173. data/lib/teleswagger/models/inline_query_result_cached_voice.rb +257 -0
  174. data/lib/teleswagger/models/inline_query_result_contact.rb +289 -0
  175. data/lib/teleswagger/models/inline_query_result_document.rb +312 -0
  176. data/lib/teleswagger/models/inline_query_result_game.rb +230 -0
  177. data/lib/teleswagger/models/inline_query_result_gif.rb +298 -0
  178. data/lib/teleswagger/models/inline_query_result_location.rb +294 -0
  179. data/lib/teleswagger/models/inline_query_result_mpeg4_gif.rb +298 -0
  180. data/lib/teleswagger/models/inline_query_result_photo.rb +289 -0
  181. data/lib/teleswagger/models/inline_query_result_venue.rb +317 -0
  182. data/lib/teleswagger/models/inline_query_result_video.rb +326 -0
  183. data/lib/teleswagger/models/inline_query_result_voice.rb +271 -0
  184. data/lib/teleswagger/models/inline_response_200.rb +215 -0
  185. data/lib/teleswagger/models/inline_response_200_1.rb +215 -0
  186. data/lib/teleswagger/models/inline_response_200_2.rb +215 -0
  187. data/lib/teleswagger/models/inline_response_200_3.rb +215 -0
  188. data/lib/teleswagger/models/inline_response_200_4.rb +217 -0
  189. data/lib/teleswagger/models/inline_response_200_5.rb +215 -0
  190. data/lib/teleswagger/models/inline_response_200_6.rb +215 -0
  191. data/lib/teleswagger/models/inline_response_200_7.rb +215 -0
  192. data/lib/teleswagger/models/inline_response_200_8.rb +215 -0
  193. data/lib/teleswagger/models/inline_response_200_9.rb +215 -0
  194. data/lib/teleswagger/models/inline_type.rb +33 -0
  195. data/lib/teleswagger/models/input_contact_message_content.rb +216 -0
  196. data/lib/teleswagger/models/input_location_message_content.rb +207 -0
  197. data/lib/teleswagger/models/input_text_message_content.rb +211 -0
  198. data/lib/teleswagger/models/input_venue_message_content.rb +244 -0
  199. data/lib/teleswagger/models/invoice.rb +224 -0
  200. data/lib/teleswagger/models/keyboard_button.rb +206 -0
  201. data/lib/teleswagger/models/labeled_price.rb +197 -0
  202. data/lib/teleswagger/models/location.rb +197 -0
  203. data/lib/teleswagger/models/mask_position.rb +248 -0
  204. data/lib/teleswagger/models/message.rb +529 -0
  205. data/lib/teleswagger/models/message_entity.rb +257 -0
  206. data/lib/teleswagger/models/order_info.rb +215 -0
  207. data/lib/teleswagger/models/parse_mode.rb +22 -0
  208. data/lib/teleswagger/models/photo_size.rb +215 -0
  209. data/lib/teleswagger/models/pre_checkout_query.rb +242 -0
  210. data/lib/teleswagger/models/promote_chat_member_body.rb +279 -0
  211. data/lib/teleswagger/models/reply_keyboard_markup.rb +217 -0
  212. data/lib/teleswagger/models/reply_keyboard_remove.rb +197 -0
  213. data/lib/teleswagger/models/response_bool.rb +215 -0
  214. data/lib/teleswagger/models/response_message.rb +215 -0
  215. data/lib/teleswagger/models/response_parameters.rb +197 -0
  216. data/lib/teleswagger/models/response_update.rb +217 -0
  217. data/lib/teleswagger/models/restrict_chat_member_body.rb +252 -0
  218. data/lib/teleswagger/models/send_audio_link_body.rb +270 -0
  219. data/lib/teleswagger/models/send_contact_body.rb +257 -0
  220. data/lib/teleswagger/models/send_document_link_body.rb +243 -0
  221. data/lib/teleswagger/models/send_game_body.rb +234 -0
  222. data/lib/teleswagger/models/send_invoice_body.rb +401 -0
  223. data/lib/teleswagger/models/send_location_body.rb +248 -0
  224. data/lib/teleswagger/models/send_message_body.rb +252 -0
  225. data/lib/teleswagger/models/send_photo_link_body.rb +243 -0
  226. data/lib/teleswagger/models/send_sticker_link_body.rb +234 -0
  227. data/lib/teleswagger/models/send_venue_body.rb +285 -0
  228. data/lib/teleswagger/models/send_video_link_body.rb +270 -0
  229. data/lib/teleswagger/models/send_video_note_link_body.rb +252 -0
  230. data/lib/teleswagger/models/send_voice_link_body.rb +252 -0
  231. data/lib/teleswagger/models/shipping_address.rb +233 -0
  232. data/lib/teleswagger/models/shipping_option.rb +208 -0
  233. data/lib/teleswagger/models/shipping_query.rb +215 -0
  234. data/lib/teleswagger/models/sticker.rb +251 -0
  235. data/lib/teleswagger/models/sticker_set.rb +217 -0
  236. data/lib/teleswagger/models/successful_payment.rb +242 -0
  237. data/lib/teleswagger/models/update.rb +269 -0
  238. data/lib/teleswagger/models/user.rb +233 -0
  239. data/lib/teleswagger/models/user_profile_photos.rb +199 -0
  240. data/lib/teleswagger/models/venue.rb +215 -0
  241. data/lib/teleswagger/models/video.rb +242 -0
  242. data/lib/teleswagger/models/video_note.rb +224 -0
  243. data/lib/teleswagger/models/voice.rb +215 -0
  244. data/lib/teleswagger/models/webhook_info.rb +259 -0
  245. data/lib/teleswagger/version.rb +15 -0
  246. data/spec/api/attachments_api_spec.rb +311 -0
  247. data/spec/api/callbacks_api_spec.rb +52 -0
  248. data/spec/api/chats_api_spec.rb +266 -0
  249. data/spec/api/games_api_spec.rb +83 -0
  250. data/spec/api/inline_api_spec.rb +48 -0
  251. data/spec/api/messages_api_spec.rb +130 -0
  252. data/spec/api/payments_api_spec.rb +76 -0
  253. data/spec/api/stickers_api_spec.rb +165 -0
  254. data/spec/api/updates_api_spec.rb +89 -0
  255. data/spec/api/users_api_spec.rb +62 -0
  256. data/spec/api_client_spec.rb +226 -0
  257. data/spec/configuration_spec.rb +42 -0
  258. data/spec/models/add_sticker_to_set_link_body_spec.rb +66 -0
  259. data/spec/models/allowed_update_spec.rb +36 -0
  260. data/spec/models/animation_spec.rb +66 -0
  261. data/spec/models/answer_inline_query_body_spec.rb +78 -0
  262. data/spec/models/answer_shipping_query_body_spec.rb +60 -0
  263. data/spec/models/audio_spec.rb +72 -0
  264. data/spec/models/callback_game_spec.rb +36 -0
  265. data/spec/models/callback_query_spec.rb +78 -0
  266. data/spec/models/chat_member_spec.rb +136 -0
  267. data/spec/models/chat_photo_spec.rb +48 -0
  268. data/spec/models/chat_spec.rb +106 -0
  269. data/spec/models/chosen_inline_result_spec.rb +66 -0
  270. data/spec/models/contact_spec.rb +60 -0
  271. data/spec/models/create_new_sticker_set_link_body_spec.rb +78 -0
  272. data/spec/models/document_spec.rb +66 -0
  273. data/spec/models/edit_message_caption_body_spec.rb +66 -0
  274. data/spec/models/edit_message_reply_markup_body_spec.rb +60 -0
  275. data/spec/models/edit_message_text_body_spec.rb +78 -0
  276. data/spec/models/error_spec.rb +54 -0
  277. data/spec/models/file_spec.rb +54 -0
  278. data/spec/models/force_reply_spec.rb +48 -0
  279. data/spec/models/game_high_score_spec.rb +54 -0
  280. data/spec/models/game_spec.rb +72 -0
  281. data/spec/models/inline_keyboard_button_spec.rb +78 -0
  282. data/spec/models/inline_keyboard_markup_spec.rb +42 -0
  283. data/spec/models/inline_query_result_article_spec.rb +102 -0
  284. data/spec/models/inline_query_result_audio_spec.rb +90 -0
  285. data/spec/models/inline_query_result_cached_audio_spec.rb +72 -0
  286. data/spec/models/inline_query_result_cached_document_spec.rb +78 -0
  287. data/spec/models/inline_query_result_cached_gif_spec.rb +78 -0
  288. data/spec/models/inline_query_result_cached_mpeg4_gif_spec.rb +78 -0
  289. data/spec/models/inline_query_result_cached_photo_spec.rb +84 -0
  290. data/spec/models/inline_query_result_cached_sticker_spec.rb +66 -0
  291. data/spec/models/inline_query_result_cached_video_spec.rb +84 -0
  292. data/spec/models/inline_query_result_cached_voice_spec.rb +78 -0
  293. data/spec/models/inline_query_result_contact_spec.rb +96 -0
  294. data/spec/models/inline_query_result_document_spec.rb +108 -0
  295. data/spec/models/inline_query_result_game_spec.rb +60 -0
  296. data/spec/models/inline_query_result_gif_spec.rb +102 -0
  297. data/spec/models/inline_query_result_location_spec.rb +96 -0
  298. data/spec/models/inline_query_result_mpeg4_gif_spec.rb +102 -0
  299. data/spec/models/inline_query_result_photo_spec.rb +96 -0
  300. data/spec/models/inline_query_result_venue_spec.rb +108 -0
  301. data/spec/models/inline_query_result_video_spec.rb +114 -0
  302. data/spec/models/inline_query_result_voice_spec.rb +84 -0
  303. data/spec/models/inline_query_spec.rb +66 -0
  304. data/spec/models/inline_response_200_1_spec.rb +60 -0
  305. data/spec/models/inline_response_200_2_spec.rb +60 -0
  306. data/spec/models/inline_response_200_3_spec.rb +60 -0
  307. data/spec/models/inline_response_200_4_spec.rb +60 -0
  308. data/spec/models/inline_response_200_5_spec.rb +60 -0
  309. data/spec/models/inline_response_200_6_spec.rb +60 -0
  310. data/spec/models/inline_response_200_7_spec.rb +60 -0
  311. data/spec/models/inline_response_200_8_spec.rb +60 -0
  312. data/spec/models/inline_response_200_9_spec.rb +60 -0
  313. data/spec/models/inline_response_200_spec.rb +60 -0
  314. data/spec/models/inline_type_spec.rb +36 -0
  315. data/spec/models/input_contact_message_content_spec.rb +54 -0
  316. data/spec/models/input_location_message_content_spec.rb +48 -0
  317. data/spec/models/input_text_message_content_spec.rb +54 -0
  318. data/spec/models/input_venue_message_content_spec.rb +66 -0
  319. data/spec/models/invoice_spec.rb +66 -0
  320. data/spec/models/keyboard_button_spec.rb +54 -0
  321. data/spec/models/labeled_price_spec.rb +48 -0
  322. data/spec/models/location_spec.rb +48 -0
  323. data/spec/models/mask_position_spec.rb +64 -0
  324. data/spec/models/message_entity_spec.rb +70 -0
  325. data/spec/models/message_spec.rb +264 -0
  326. data/spec/models/order_info_spec.rb +60 -0
  327. data/spec/models/parse_mode_spec.rb +36 -0
  328. data/spec/models/photo_size_spec.rb +60 -0
  329. data/spec/models/pre_checkout_query_spec.rb +78 -0
  330. data/spec/models/promote_chat_member_body_spec.rb +96 -0
  331. data/spec/models/reply_keyboard_markup_spec.rb +60 -0
  332. data/spec/models/reply_keyboard_remove_spec.rb +48 -0
  333. data/spec/models/response_bool_spec.rb +60 -0
  334. data/spec/models/response_message_spec.rb +60 -0
  335. data/spec/models/response_parameters_spec.rb +48 -0
  336. data/spec/models/response_update_spec.rb +60 -0
  337. data/spec/models/restrict_chat_member_body_spec.rb +78 -0
  338. data/spec/models/send_audio_link_body_spec.rb +90 -0
  339. data/spec/models/send_contact_body_spec.rb +78 -0
  340. data/spec/models/send_document_link_body_spec.rb +72 -0
  341. data/spec/models/send_game_body_spec.rb +66 -0
  342. data/spec/models/send_invoice_body_spec.rb +156 -0
  343. data/spec/models/send_location_body_spec.rb +72 -0
  344. data/spec/models/send_message_body_spec.rb +78 -0
  345. data/spec/models/send_photo_link_body_spec.rb +72 -0
  346. data/spec/models/send_sticker_link_body_spec.rb +66 -0
  347. data/spec/models/send_venue_body_spec.rb +90 -0
  348. data/spec/models/send_video_link_body_spec.rb +90 -0
  349. data/spec/models/send_video_note_link_body_spec.rb +78 -0
  350. data/spec/models/send_voice_link_body_spec.rb +78 -0
  351. data/spec/models/shipping_address_spec.rb +72 -0
  352. data/spec/models/shipping_option_spec.rb +54 -0
  353. data/spec/models/shipping_query_spec.rb +60 -0
  354. data/spec/models/sticker_set_spec.rb +60 -0
  355. data/spec/models/sticker_spec.rb +84 -0
  356. data/spec/models/successful_payment_spec.rb +78 -0
  357. data/spec/models/update_spec.rb +96 -0
  358. data/spec/models/user_profile_photos_spec.rb +48 -0
  359. data/spec/models/user_spec.rb +72 -0
  360. data/spec/models/venue_spec.rb +60 -0
  361. data/spec/models/video_note_spec.rb +66 -0
  362. data/spec/models/video_spec.rb +78 -0
  363. data/spec/models/voice_spec.rb +60 -0
  364. data/spec/models/webhook_info_spec.rb +78 -0
  365. data/spec/spec_helper.rb +111 -0
  366. data/swagger.yaml +5202 -0
  367. data/teleswagger.gemspec +46 -0
  368. metadata +709 -0
@@ -0,0 +1,235 @@
1
+ =begin
2
+ #Telegram bot API
3
+
4
+ #This is a swagger defenition for [Telegram bot API](https://core.telegram.org/bots/api).
5
+
6
+ OpenAPI spec version: 3.3
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module Teleswagger
16
+ class GamesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ #
24
+ #
25
+ # @param token bot's token to authorize the request
26
+ # @param user_id
27
+ # @param [Hash] opts the optional parameters
28
+ # @option opts [Integer] :chat_id
29
+ # @option opts [Integer] :message_id
30
+ # @option opts [String] :inline_message_id
31
+ # @return [InlineResponse2008]
32
+ def get_game_high_scores(token, user_id, opts = {})
33
+ data, _status_code, _headers = get_game_high_scores_with_http_info(token, user_id, opts)
34
+ return data
35
+ end
36
+
37
+ #
38
+ #
39
+ # @param token bot's token to authorize the request
40
+ # @param user_id
41
+ # @param [Hash] opts the optional parameters
42
+ # @option opts [Integer] :chat_id
43
+ # @option opts [Integer] :message_id
44
+ # @option opts [String] :inline_message_id
45
+ # @return [Array<(InlineResponse2008, Fixnum, Hash)>] InlineResponse2008 data, response status code and response headers
46
+ def get_game_high_scores_with_http_info(token, user_id, opts = {})
47
+ if @api_client.config.debugging
48
+ @api_client.config.logger.debug "Calling API: GamesApi.get_game_high_scores ..."
49
+ end
50
+ # verify the required parameter 'token' is set
51
+ if @api_client.config.client_side_validation && token.nil?
52
+ fail ArgumentError, "Missing the required parameter 'token' when calling GamesApi.get_game_high_scores"
53
+ end
54
+ # verify the required parameter 'user_id' is set
55
+ if @api_client.config.client_side_validation && user_id.nil?
56
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling GamesApi.get_game_high_scores"
57
+ end
58
+ # resource path
59
+ local_var_path = "/bot{token}/getGameHighScores".sub('{' + 'token' + '}', token.to_s)
60
+
61
+ # query parameters
62
+ query_params = {}
63
+ query_params[:'user_id'] = user_id
64
+ query_params[:'chat_id'] = opts[:'chat_id'] if !opts[:'chat_id'].nil?
65
+ query_params[:'message_id'] = opts[:'message_id'] if !opts[:'message_id'].nil?
66
+ query_params[:'inline_message_id'] = opts[:'inline_message_id'] if !opts[:'inline_message_id'].nil?
67
+
68
+ # header parameters
69
+ header_params = {}
70
+ # HTTP header 'Accept' (if needed)
71
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
72
+ # HTTP header 'Content-Type'
73
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
74
+
75
+ # form parameters
76
+ form_params = {}
77
+
78
+ # http body (model)
79
+ post_body = nil
80
+ auth_names = []
81
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
82
+ :header_params => header_params,
83
+ :query_params => query_params,
84
+ :form_params => form_params,
85
+ :body => post_body,
86
+ :auth_names => auth_names,
87
+ :return_type => 'InlineResponse2008')
88
+ if @api_client.config.debugging
89
+ @api_client.config.logger.debug "API called: GamesApi#get_game_high_scores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
90
+ end
91
+ return data, status_code, headers
92
+ end
93
+
94
+ #
95
+ #
96
+ # @param token bot&#39;s token to authorize the request
97
+ # @param [Hash] opts the optional parameters
98
+ # @option opts [SendGameBody] :body
99
+ # @return [ResponseMessage]
100
+ def send_game(token, opts = {})
101
+ data, _status_code, _headers = send_game_with_http_info(token, opts)
102
+ return data
103
+ end
104
+
105
+ #
106
+ #
107
+ # @param token bot&#39;s token to authorize the request
108
+ # @param [Hash] opts the optional parameters
109
+ # @option opts [SendGameBody] :body
110
+ # @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
111
+ def send_game_with_http_info(token, opts = {})
112
+ if @api_client.config.debugging
113
+ @api_client.config.logger.debug "Calling API: GamesApi.send_game ..."
114
+ end
115
+ # verify the required parameter 'token' is set
116
+ if @api_client.config.client_side_validation && token.nil?
117
+ fail ArgumentError, "Missing the required parameter 'token' when calling GamesApi.send_game"
118
+ end
119
+ # resource path
120
+ local_var_path = "/bot{token}/sendGame".sub('{' + 'token' + '}', token.to_s)
121
+
122
+ # query parameters
123
+ query_params = {}
124
+
125
+ # header parameters
126
+ header_params = {}
127
+ # HTTP header 'Accept' (if needed)
128
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
129
+ # HTTP header 'Content-Type'
130
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
131
+
132
+ # form parameters
133
+ form_params = {}
134
+
135
+ # http body (model)
136
+ post_body = @api_client.object_to_http_body(opts[:'body'])
137
+ auth_names = []
138
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
139
+ :header_params => header_params,
140
+ :query_params => query_params,
141
+ :form_params => form_params,
142
+ :body => post_body,
143
+ :auth_names => auth_names,
144
+ :return_type => 'ResponseMessage')
145
+ if @api_client.config.debugging
146
+ @api_client.config.logger.debug "API called: GamesApi#send_game\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
147
+ end
148
+ return data, status_code, headers
149
+ end
150
+
151
+ #
152
+ #
153
+ # @param token bot&#39;s token to authorize the request
154
+ # @param user_id
155
+ # @param score
156
+ # @param [Hash] opts the optional parameters
157
+ # @option opts [BOOLEAN] :force
158
+ # @option opts [BOOLEAN] :disable_edit_message
159
+ # @option opts [Integer] :chat_id
160
+ # @option opts [Integer] :message_id
161
+ # @option opts [String] :inline_message_id
162
+ # @return [InlineResponse2007]
163
+ def set_game_score(token, user_id, score, opts = {})
164
+ data, _status_code, _headers = set_game_score_with_http_info(token, user_id, score, opts)
165
+ return data
166
+ end
167
+
168
+ #
169
+ #
170
+ # @param token bot&#39;s token to authorize the request
171
+ # @param user_id
172
+ # @param score
173
+ # @param [Hash] opts the optional parameters
174
+ # @option opts [BOOLEAN] :force
175
+ # @option opts [BOOLEAN] :disable_edit_message
176
+ # @option opts [Integer] :chat_id
177
+ # @option opts [Integer] :message_id
178
+ # @option opts [String] :inline_message_id
179
+ # @return [Array<(InlineResponse2007, Fixnum, Hash)>] InlineResponse2007 data, response status code and response headers
180
+ def set_game_score_with_http_info(token, user_id, score, opts = {})
181
+ if @api_client.config.debugging
182
+ @api_client.config.logger.debug "Calling API: GamesApi.set_game_score ..."
183
+ end
184
+ # verify the required parameter 'token' is set
185
+ if @api_client.config.client_side_validation && token.nil?
186
+ fail ArgumentError, "Missing the required parameter 'token' when calling GamesApi.set_game_score"
187
+ end
188
+ # verify the required parameter 'user_id' is set
189
+ if @api_client.config.client_side_validation && user_id.nil?
190
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling GamesApi.set_game_score"
191
+ end
192
+ # verify the required parameter 'score' is set
193
+ if @api_client.config.client_side_validation && score.nil?
194
+ fail ArgumentError, "Missing the required parameter 'score' when calling GamesApi.set_game_score"
195
+ end
196
+ # resource path
197
+ local_var_path = "/bot{token}/setGameScore".sub('{' + 'token' + '}', token.to_s)
198
+
199
+ # query parameters
200
+ query_params = {}
201
+ query_params[:'user_id'] = user_id
202
+ query_params[:'score'] = score
203
+ query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil?
204
+ query_params[:'disable_edit_message'] = opts[:'disable_edit_message'] if !opts[:'disable_edit_message'].nil?
205
+ query_params[:'chat_id'] = opts[:'chat_id'] if !opts[:'chat_id'].nil?
206
+ query_params[:'message_id'] = opts[:'message_id'] if !opts[:'message_id'].nil?
207
+ query_params[:'inline_message_id'] = opts[:'inline_message_id'] if !opts[:'inline_message_id'].nil?
208
+
209
+ # header parameters
210
+ header_params = {}
211
+ # HTTP header 'Accept' (if needed)
212
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
213
+ # HTTP header 'Content-Type'
214
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
215
+
216
+ # form parameters
217
+ form_params = {}
218
+
219
+ # http body (model)
220
+ post_body = nil
221
+ auth_names = []
222
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
223
+ :header_params => header_params,
224
+ :query_params => query_params,
225
+ :form_params => form_params,
226
+ :body => post_body,
227
+ :auth_names => auth_names,
228
+ :return_type => 'InlineResponse2007')
229
+ if @api_client.config.debugging
230
+ @api_client.config.logger.debug "API called: GamesApi#set_game_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
231
+ end
232
+ return data, status_code, headers
233
+ end
234
+ end
235
+ end
@@ -0,0 +1,80 @@
1
+ =begin
2
+ #Telegram bot API
3
+
4
+ #This is a swagger defenition for [Telegram bot API](https://core.telegram.org/bots/api).
5
+
6
+ OpenAPI spec version: 3.3
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module Teleswagger
16
+ class InlineApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ #
24
+ #
25
+ # @param token bot&#39;s token to authorize the request
26
+ # @param [Hash] opts the optional parameters
27
+ # @option opts [AnswerInlineQueryBody] :body
28
+ # @return [ResponseBool]
29
+ def answer_inline_query(token, opts = {})
30
+ data, _status_code, _headers = answer_inline_query_with_http_info(token, opts)
31
+ return data
32
+ end
33
+
34
+ #
35
+ #
36
+ # @param token bot&#39;s token to authorize the request
37
+ # @param [Hash] opts the optional parameters
38
+ # @option opts [AnswerInlineQueryBody] :body
39
+ # @return [Array<(ResponseBool, Fixnum, Hash)>] ResponseBool data, response status code and response headers
40
+ def answer_inline_query_with_http_info(token, opts = {})
41
+ if @api_client.config.debugging
42
+ @api_client.config.logger.debug "Calling API: InlineApi.answer_inline_query ..."
43
+ end
44
+ # verify the required parameter 'token' is set
45
+ if @api_client.config.client_side_validation && token.nil?
46
+ fail ArgumentError, "Missing the required parameter 'token' when calling InlineApi.answer_inline_query"
47
+ end
48
+ # resource path
49
+ local_var_path = "/bot{token}/answerInlineQuery".sub('{' + 'token' + '}', token.to_s)
50
+
51
+ # query parameters
52
+ query_params = {}
53
+
54
+ # header parameters
55
+ header_params = {}
56
+ # HTTP header 'Accept' (if needed)
57
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
58
+ # HTTP header 'Content-Type'
59
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
60
+
61
+ # form parameters
62
+ form_params = {}
63
+
64
+ # http body (model)
65
+ post_body = @api_client.object_to_http_body(opts[:'body'])
66
+ auth_names = []
67
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
68
+ :header_params => header_params,
69
+ :query_params => query_params,
70
+ :form_params => form_params,
71
+ :body => post_body,
72
+ :auth_names => auth_names,
73
+ :return_type => 'ResponseBool')
74
+ if @api_client.config.debugging
75
+ @api_client.config.logger.debug "API called: InlineApi#answer_inline_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
76
+ end
77
+ return data, status_code, headers
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,460 @@
1
+ =begin
2
+ #Telegram bot API
3
+
4
+ #This is a swagger defenition for [Telegram bot API](https://core.telegram.org/bots/api).
5
+
6
+ OpenAPI spec version: 3.3
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module Teleswagger
16
+ class MessagesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ #
24
+ #
25
+ # @param token bot&#39;s token to authorize the request
26
+ # @param chat_id
27
+ # @param message_id
28
+ # @param [Hash] opts the optional parameters
29
+ # @return [ResponseBool]
30
+ def delete_message(token, chat_id, message_id, opts = {})
31
+ data, _status_code, _headers = delete_message_with_http_info(token, chat_id, message_id, opts)
32
+ return data
33
+ end
34
+
35
+ #
36
+ #
37
+ # @param token bot&#39;s token to authorize the request
38
+ # @param chat_id
39
+ # @param message_id
40
+ # @param [Hash] opts the optional parameters
41
+ # @return [Array<(ResponseBool, Fixnum, Hash)>] ResponseBool data, response status code and response headers
42
+ def delete_message_with_http_info(token, chat_id, message_id, opts = {})
43
+ if @api_client.config.debugging
44
+ @api_client.config.logger.debug "Calling API: MessagesApi.delete_message ..."
45
+ end
46
+ # verify the required parameter 'token' is set
47
+ if @api_client.config.client_side_validation && token.nil?
48
+ fail ArgumentError, "Missing the required parameter 'token' when calling MessagesApi.delete_message"
49
+ end
50
+ # verify the required parameter 'chat_id' is set
51
+ if @api_client.config.client_side_validation && chat_id.nil?
52
+ fail ArgumentError, "Missing the required parameter 'chat_id' when calling MessagesApi.delete_message"
53
+ end
54
+ # verify the required parameter 'message_id' is set
55
+ if @api_client.config.client_side_validation && message_id.nil?
56
+ fail ArgumentError, "Missing the required parameter 'message_id' when calling MessagesApi.delete_message"
57
+ end
58
+ # resource path
59
+ local_var_path = "/bot{token}/deleteMessage".sub('{' + 'token' + '}', token.to_s)
60
+
61
+ # query parameters
62
+ query_params = {}
63
+ query_params[:'chat_id'] = chat_id
64
+ query_params[:'message_id'] = message_id
65
+
66
+ # header parameters
67
+ header_params = {}
68
+ # HTTP header 'Accept' (if needed)
69
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
70
+ # HTTP header 'Content-Type'
71
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
72
+
73
+ # form parameters
74
+ form_params = {}
75
+
76
+ # http body (model)
77
+ post_body = nil
78
+ auth_names = []
79
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
80
+ :header_params => header_params,
81
+ :query_params => query_params,
82
+ :form_params => form_params,
83
+ :body => post_body,
84
+ :auth_names => auth_names,
85
+ :return_type => 'ResponseBool')
86
+ if @api_client.config.debugging
87
+ @api_client.config.logger.debug "API called: MessagesApi#delete_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
+ end
89
+ return data, status_code, headers
90
+ end
91
+
92
+ #
93
+ #
94
+ # @param token bot&#39;s token to authorize the request
95
+ # @param [Hash] opts the optional parameters
96
+ # @option opts [EditMessageCaptionBody] :body
97
+ # @return [InlineResponse2007]
98
+ def edit_message_caption(token, opts = {})
99
+ data, _status_code, _headers = edit_message_caption_with_http_info(token, opts)
100
+ return data
101
+ end
102
+
103
+ #
104
+ #
105
+ # @param token bot&#39;s token to authorize the request
106
+ # @param [Hash] opts the optional parameters
107
+ # @option opts [EditMessageCaptionBody] :body
108
+ # @return [Array<(InlineResponse2007, Fixnum, Hash)>] InlineResponse2007 data, response status code and response headers
109
+ def edit_message_caption_with_http_info(token, opts = {})
110
+ if @api_client.config.debugging
111
+ @api_client.config.logger.debug "Calling API: MessagesApi.edit_message_caption ..."
112
+ end
113
+ # verify the required parameter 'token' is set
114
+ if @api_client.config.client_side_validation && token.nil?
115
+ fail ArgumentError, "Missing the required parameter 'token' when calling MessagesApi.edit_message_caption"
116
+ end
117
+ # resource path
118
+ local_var_path = "/bot{token}/editMessageCaption".sub('{' + 'token' + '}', token.to_s)
119
+
120
+ # query parameters
121
+ query_params = {}
122
+
123
+ # header parameters
124
+ header_params = {}
125
+ # HTTP header 'Accept' (if needed)
126
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
127
+ # HTTP header 'Content-Type'
128
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
129
+
130
+ # form parameters
131
+ form_params = {}
132
+
133
+ # http body (model)
134
+ post_body = @api_client.object_to_http_body(opts[:'body'])
135
+ auth_names = []
136
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
137
+ :header_params => header_params,
138
+ :query_params => query_params,
139
+ :form_params => form_params,
140
+ :body => post_body,
141
+ :auth_names => auth_names,
142
+ :return_type => 'InlineResponse2007')
143
+ if @api_client.config.debugging
144
+ @api_client.config.logger.debug "API called: MessagesApi#edit_message_caption\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
145
+ end
146
+ return data, status_code, headers
147
+ end
148
+
149
+ #
150
+ #
151
+ # @param token bot&#39;s token to authorize the request
152
+ # @param [Hash] opts the optional parameters
153
+ # @option opts [EditMessageReplyMarkupBody] :body
154
+ # @return [InlineResponse2007]
155
+ def edit_message_reply_markup(token, opts = {})
156
+ data, _status_code, _headers = edit_message_reply_markup_with_http_info(token, opts)
157
+ return data
158
+ end
159
+
160
+ #
161
+ #
162
+ # @param token bot&#39;s token to authorize the request
163
+ # @param [Hash] opts the optional parameters
164
+ # @option opts [EditMessageReplyMarkupBody] :body
165
+ # @return [Array<(InlineResponse2007, Fixnum, Hash)>] InlineResponse2007 data, response status code and response headers
166
+ def edit_message_reply_markup_with_http_info(token, opts = {})
167
+ if @api_client.config.debugging
168
+ @api_client.config.logger.debug "Calling API: MessagesApi.edit_message_reply_markup ..."
169
+ end
170
+ # verify the required parameter 'token' is set
171
+ if @api_client.config.client_side_validation && token.nil?
172
+ fail ArgumentError, "Missing the required parameter 'token' when calling MessagesApi.edit_message_reply_markup"
173
+ end
174
+ # resource path
175
+ local_var_path = "/bot{token}/editMessageReplyMarkup".sub('{' + 'token' + '}', token.to_s)
176
+
177
+ # query parameters
178
+ query_params = {}
179
+
180
+ # header parameters
181
+ header_params = {}
182
+ # HTTP header 'Accept' (if needed)
183
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
184
+ # HTTP header 'Content-Type'
185
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
186
+
187
+ # form parameters
188
+ form_params = {}
189
+
190
+ # http body (model)
191
+ post_body = @api_client.object_to_http_body(opts[:'body'])
192
+ auth_names = []
193
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
194
+ :header_params => header_params,
195
+ :query_params => query_params,
196
+ :form_params => form_params,
197
+ :body => post_body,
198
+ :auth_names => auth_names,
199
+ :return_type => 'InlineResponse2007')
200
+ if @api_client.config.debugging
201
+ @api_client.config.logger.debug "API called: MessagesApi#edit_message_reply_markup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
202
+ end
203
+ return data, status_code, headers
204
+ end
205
+
206
+ #
207
+ #
208
+ # @param token bot&#39;s token to authorize the request
209
+ # @param [Hash] opts the optional parameters
210
+ # @option opts [EditMessageTextBody] :body
211
+ # @return [InlineResponse2007]
212
+ def edit_message_text(token, opts = {})
213
+ data, _status_code, _headers = edit_message_text_with_http_info(token, opts)
214
+ return data
215
+ end
216
+
217
+ #
218
+ #
219
+ # @param token bot&#39;s token to authorize the request
220
+ # @param [Hash] opts the optional parameters
221
+ # @option opts [EditMessageTextBody] :body
222
+ # @return [Array<(InlineResponse2007, Fixnum, Hash)>] InlineResponse2007 data, response status code and response headers
223
+ def edit_message_text_with_http_info(token, opts = {})
224
+ if @api_client.config.debugging
225
+ @api_client.config.logger.debug "Calling API: MessagesApi.edit_message_text ..."
226
+ end
227
+ # verify the required parameter 'token' is set
228
+ if @api_client.config.client_side_validation && token.nil?
229
+ fail ArgumentError, "Missing the required parameter 'token' when calling MessagesApi.edit_message_text"
230
+ end
231
+ # resource path
232
+ local_var_path = "/bot{token}/editMessageText".sub('{' + 'token' + '}', token.to_s)
233
+
234
+ # query parameters
235
+ query_params = {}
236
+
237
+ # header parameters
238
+ header_params = {}
239
+ # HTTP header 'Accept' (if needed)
240
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
241
+ # HTTP header 'Content-Type'
242
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
243
+
244
+ # form parameters
245
+ form_params = {}
246
+
247
+ # http body (model)
248
+ post_body = @api_client.object_to_http_body(opts[:'body'])
249
+ auth_names = []
250
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
251
+ :header_params => header_params,
252
+ :query_params => query_params,
253
+ :form_params => form_params,
254
+ :body => post_body,
255
+ :auth_names => auth_names,
256
+ :return_type => 'InlineResponse2007')
257
+ if @api_client.config.debugging
258
+ @api_client.config.logger.debug "API called: MessagesApi#edit_message_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
259
+ end
260
+ return data, status_code, headers
261
+ end
262
+
263
+ #
264
+ #
265
+ # @param token bot&#39;s token to authorize the request
266
+ # @param chat_id
267
+ # @param from_chat_id
268
+ # @param message_id
269
+ # @param [Hash] opts the optional parameters
270
+ # @option opts [BOOLEAN] :disable_notification
271
+ # @return [ResponseMessage]
272
+ def forward_message(token, chat_id, from_chat_id, message_id, opts = {})
273
+ data, _status_code, _headers = forward_message_with_http_info(token, chat_id, from_chat_id, message_id, opts)
274
+ return data
275
+ end
276
+
277
+ #
278
+ #
279
+ # @param token bot&#39;s token to authorize the request
280
+ # @param chat_id
281
+ # @param from_chat_id
282
+ # @param message_id
283
+ # @param [Hash] opts the optional parameters
284
+ # @option opts [BOOLEAN] :disable_notification
285
+ # @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
286
+ def forward_message_with_http_info(token, chat_id, from_chat_id, message_id, opts = {})
287
+ if @api_client.config.debugging
288
+ @api_client.config.logger.debug "Calling API: MessagesApi.forward_message ..."
289
+ end
290
+ # verify the required parameter 'token' is set
291
+ if @api_client.config.client_side_validation && token.nil?
292
+ fail ArgumentError, "Missing the required parameter 'token' when calling MessagesApi.forward_message"
293
+ end
294
+ # verify the required parameter 'chat_id' is set
295
+ if @api_client.config.client_side_validation && chat_id.nil?
296
+ fail ArgumentError, "Missing the required parameter 'chat_id' when calling MessagesApi.forward_message"
297
+ end
298
+ # verify the required parameter 'from_chat_id' is set
299
+ if @api_client.config.client_side_validation && from_chat_id.nil?
300
+ fail ArgumentError, "Missing the required parameter 'from_chat_id' when calling MessagesApi.forward_message"
301
+ end
302
+ # verify the required parameter 'message_id' is set
303
+ if @api_client.config.client_side_validation && message_id.nil?
304
+ fail ArgumentError, "Missing the required parameter 'message_id' when calling MessagesApi.forward_message"
305
+ end
306
+ # resource path
307
+ local_var_path = "/bot{token}/forwardMessage".sub('{' + 'token' + '}', token.to_s)
308
+
309
+ # query parameters
310
+ query_params = {}
311
+
312
+ # header parameters
313
+ header_params = {}
314
+ # HTTP header 'Accept' (if needed)
315
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
316
+ # HTTP header 'Content-Type'
317
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
318
+
319
+ # form parameters
320
+ form_params = {}
321
+ form_params["chat_id"] = chat_id
322
+ form_params["from_chat_id"] = from_chat_id
323
+ form_params["message_id"] = message_id
324
+ form_params["disable_notification"] = opts[:'disable_notification'] if !opts[:'disable_notification'].nil?
325
+
326
+ # http body (model)
327
+ post_body = nil
328
+ auth_names = []
329
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
330
+ :header_params => header_params,
331
+ :query_params => query_params,
332
+ :form_params => form_params,
333
+ :body => post_body,
334
+ :auth_names => auth_names,
335
+ :return_type => 'ResponseMessage')
336
+ if @api_client.config.debugging
337
+ @api_client.config.logger.debug "API called: MessagesApi#forward_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
338
+ end
339
+ return data, status_code, headers
340
+ end
341
+
342
+ #
343
+ #
344
+ # @param token bot&#39;s token to authorize the request
345
+ # @param [Hash] opts the optional parameters
346
+ # @option opts [SendMessageBody] :body
347
+ # @return [ResponseMessage]
348
+ def send_message(token, opts = {})
349
+ data, _status_code, _headers = send_message_with_http_info(token, opts)
350
+ return data
351
+ end
352
+
353
+ #
354
+ #
355
+ # @param token bot&#39;s token to authorize the request
356
+ # @param [Hash] opts the optional parameters
357
+ # @option opts [SendMessageBody] :body
358
+ # @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
359
+ def send_message_with_http_info(token, opts = {})
360
+ if @api_client.config.debugging
361
+ @api_client.config.logger.debug "Calling API: MessagesApi.send_message ..."
362
+ end
363
+ # verify the required parameter 'token' is set
364
+ if @api_client.config.client_side_validation && token.nil?
365
+ fail ArgumentError, "Missing the required parameter 'token' when calling MessagesApi.send_message"
366
+ end
367
+ # resource path
368
+ local_var_path = "/bot{token}/sendMessage".sub('{' + 'token' + '}', token.to_s)
369
+
370
+ # query parameters
371
+ query_params = {}
372
+
373
+ # header parameters
374
+ header_params = {}
375
+ # HTTP header 'Accept' (if needed)
376
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
377
+ # HTTP header 'Content-Type'
378
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
379
+
380
+ # form parameters
381
+ form_params = {}
382
+
383
+ # http body (model)
384
+ post_body = @api_client.object_to_http_body(opts[:'body'])
385
+ auth_names = []
386
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
387
+ :header_params => header_params,
388
+ :query_params => query_params,
389
+ :form_params => form_params,
390
+ :body => post_body,
391
+ :auth_names => auth_names,
392
+ :return_type => 'ResponseMessage')
393
+ if @api_client.config.debugging
394
+ @api_client.config.logger.debug "API called: MessagesApi#send_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
395
+ end
396
+ return data, status_code, headers
397
+ end
398
+
399
+ #
400
+ #
401
+ # @param token bot&#39;s token to authorize the request
402
+ # @param body
403
+ # @param [Hash] opts the optional parameters
404
+ # @return [ResponseMessage]
405
+ def send_message_bytes(token, body, opts = {})
406
+ data, _status_code, _headers = send_message_bytes_with_http_info(token, body, opts)
407
+ return data
408
+ end
409
+
410
+ #
411
+ #
412
+ # @param token bot&#39;s token to authorize the request
413
+ # @param body
414
+ # @param [Hash] opts the optional parameters
415
+ # @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
416
+ def send_message_bytes_with_http_info(token, body, opts = {})
417
+ if @api_client.config.debugging
418
+ @api_client.config.logger.debug "Calling API: MessagesApi.send_message_bytes ..."
419
+ end
420
+ # verify the required parameter 'token' is set
421
+ if @api_client.config.client_side_validation && token.nil?
422
+ fail ArgumentError, "Missing the required parameter 'token' when calling MessagesApi.send_message_bytes"
423
+ end
424
+ # verify the required parameter 'body' is set
425
+ if @api_client.config.client_side_validation && body.nil?
426
+ fail ArgumentError, "Missing the required parameter 'body' when calling MessagesApi.send_message_bytes"
427
+ end
428
+ # resource path
429
+ local_var_path = "/bot{token}/sendMessage#bytes".sub('{' + 'token' + '}', token.to_s)
430
+
431
+ # query parameters
432
+ query_params = {}
433
+
434
+ # header parameters
435
+ header_params = {}
436
+ # HTTP header 'Accept' (if needed)
437
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
438
+ # HTTP header 'Content-Type'
439
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
440
+
441
+ # form parameters
442
+ form_params = {}
443
+
444
+ # http body (model)
445
+ post_body = @api_client.object_to_http_body(body)
446
+ auth_names = []
447
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
448
+ :header_params => header_params,
449
+ :query_params => query_params,
450
+ :form_params => form_params,
451
+ :body => post_body,
452
+ :auth_names => auth_names,
453
+ :return_type => 'ResponseMessage')
454
+ if @api_client.config.debugging
455
+ @api_client.config.logger.debug "API called: MessagesApi#send_message_bytes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
456
+ end
457
+ return data, status_code, headers
458
+ end
459
+ end
460
+ end