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,1243 @@
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 AttachmentsApi
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 file_id
27
+ # @param [Hash] opts the optional parameters
28
+ # @return [InlineResponse2002]
29
+ def get_file(token, file_id, opts = {})
30
+ data, _status_code, _headers = get_file_with_http_info(token, file_id, opts)
31
+ return data
32
+ end
33
+
34
+ #
35
+ #
36
+ # @param token bot's token to authorize the request
37
+ # @param file_id
38
+ # @param [Hash] opts the optional parameters
39
+ # @return [Array<(InlineResponse2002, Fixnum, Hash)>] InlineResponse2002 data, response status code and response headers
40
+ def get_file_with_http_info(token, file_id, opts = {})
41
+ if @api_client.config.debugging
42
+ @api_client.config.logger.debug "Calling API: AttachmentsApi.get_file ..."
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 AttachmentsApi.get_file"
47
+ end
48
+ # verify the required parameter 'file_id' is set
49
+ if @api_client.config.client_side_validation && file_id.nil?
50
+ fail ArgumentError, "Missing the required parameter 'file_id' when calling AttachmentsApi.get_file"
51
+ end
52
+ # resource path
53
+ local_var_path = "/bot{token}/getFile".sub('{' + 'token' + '}', token.to_s)
54
+
55
+ # query parameters
56
+ query_params = {}
57
+ query_params[:'file_id'] = file_id
58
+
59
+ # header parameters
60
+ header_params = {}
61
+ # HTTP header 'Accept' (if needed)
62
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
63
+ # HTTP header 'Content-Type'
64
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
65
+
66
+ # form parameters
67
+ form_params = {}
68
+
69
+ # http body (model)
70
+ post_body = nil
71
+ auth_names = []
72
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
73
+ :header_params => header_params,
74
+ :query_params => query_params,
75
+ :form_params => form_params,
76
+ :body => post_body,
77
+ :auth_names => auth_names,
78
+ :return_type => 'InlineResponse2002')
79
+ if @api_client.config.debugging
80
+ @api_client.config.logger.debug "API called: AttachmentsApi#get_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
81
+ end
82
+ return data, status_code, headers
83
+ end
84
+
85
+ #
86
+ #
87
+ # @param token bot&#39;s token to authorize the request
88
+ # @param chat_id
89
+ # @param audio
90
+ # @param [Hash] opts the optional parameters
91
+ # @option opts [String] :caption
92
+ # @option opts [Integer] :duration
93
+ # @option opts [String] :performer
94
+ # @option opts [String] :title
95
+ # @option opts [BOOLEAN] :disable_notification
96
+ # @option opts [Integer] :reply_to_message_id
97
+ # @option opts [String] :reply_markup json string of reply_markup object
98
+ # @return [ResponseMessage]
99
+ def send_audio(token, chat_id, audio, opts = {})
100
+ data, _status_code, _headers = send_audio_with_http_info(token, chat_id, audio, opts)
101
+ return data
102
+ end
103
+
104
+ #
105
+ #
106
+ # @param token bot&#39;s token to authorize the request
107
+ # @param chat_id
108
+ # @param audio
109
+ # @param [Hash] opts the optional parameters
110
+ # @option opts [String] :caption
111
+ # @option opts [Integer] :duration
112
+ # @option opts [String] :performer
113
+ # @option opts [String] :title
114
+ # @option opts [BOOLEAN] :disable_notification
115
+ # @option opts [Integer] :reply_to_message_id
116
+ # @option opts [String] :reply_markup json string of reply_markup object
117
+ # @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
118
+ def send_audio_with_http_info(token, chat_id, audio, opts = {})
119
+ if @api_client.config.debugging
120
+ @api_client.config.logger.debug "Calling API: AttachmentsApi.send_audio ..."
121
+ end
122
+ # verify the required parameter 'token' is set
123
+ if @api_client.config.client_side_validation && token.nil?
124
+ fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_audio"
125
+ end
126
+ # verify the required parameter 'chat_id' is set
127
+ if @api_client.config.client_side_validation && chat_id.nil?
128
+ fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_audio"
129
+ end
130
+ # verify the required parameter 'audio' is set
131
+ if @api_client.config.client_side_validation && audio.nil?
132
+ fail ArgumentError, "Missing the required parameter 'audio' when calling AttachmentsApi.send_audio"
133
+ end
134
+ # resource path
135
+ local_var_path = "/bot{token}/sendAudio".sub('{' + 'token' + '}', token.to_s)
136
+
137
+ # query parameters
138
+ query_params = {}
139
+
140
+ # header parameters
141
+ header_params = {}
142
+ # HTTP header 'Accept' (if needed)
143
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
144
+ # HTTP header 'Content-Type'
145
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
146
+
147
+ # form parameters
148
+ form_params = {}
149
+ form_params["chat_id"] = chat_id
150
+ form_params["audio"] = audio
151
+ form_params["caption"] = opts[:'caption'] if !opts[:'caption'].nil?
152
+ form_params["duration"] = opts[:'duration'] if !opts[:'duration'].nil?
153
+ form_params["performer"] = opts[:'performer'] if !opts[:'performer'].nil?
154
+ form_params["title"] = opts[:'title'] if !opts[:'title'].nil?
155
+ form_params["disable_notification"] = opts[:'disable_notification'] if !opts[:'disable_notification'].nil?
156
+ form_params["reply_to_message_id"] = opts[:'reply_to_message_id'] if !opts[:'reply_to_message_id'].nil?
157
+ form_params["reply_markup"] = opts[:'reply_markup'] if !opts[:'reply_markup'].nil?
158
+
159
+ # http body (model)
160
+ post_body = nil
161
+ auth_names = []
162
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
163
+ :header_params => header_params,
164
+ :query_params => query_params,
165
+ :form_params => form_params,
166
+ :body => post_body,
167
+ :auth_names => auth_names,
168
+ :return_type => 'ResponseMessage')
169
+ if @api_client.config.debugging
170
+ @api_client.config.logger.debug "API called: AttachmentsApi#send_audio\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
171
+ end
172
+ return data, status_code, headers
173
+ end
174
+
175
+ #
176
+ #
177
+ # @param token bot&#39;s token to authorize the request
178
+ # @param [Hash] opts the optional parameters
179
+ # @option opts [SendAudioLinkBody] :body
180
+ # @return [ResponseMessage]
181
+ def send_audio_link(token, opts = {})
182
+ data, _status_code, _headers = send_audio_link_with_http_info(token, opts)
183
+ return data
184
+ end
185
+
186
+ #
187
+ #
188
+ # @param token bot&#39;s token to authorize the request
189
+ # @param [Hash] opts the optional parameters
190
+ # @option opts [SendAudioLinkBody] :body
191
+ # @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
192
+ def send_audio_link_with_http_info(token, opts = {})
193
+ if @api_client.config.debugging
194
+ @api_client.config.logger.debug "Calling API: AttachmentsApi.send_audio_link ..."
195
+ end
196
+ # verify the required parameter 'token' is set
197
+ if @api_client.config.client_side_validation && token.nil?
198
+ fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_audio_link"
199
+ end
200
+ # resource path
201
+ local_var_path = "/bot{token}/sendAudio#link".sub('{' + 'token' + '}', token.to_s)
202
+
203
+ # query parameters
204
+ query_params = {}
205
+
206
+ # header parameters
207
+ header_params = {}
208
+ # HTTP header 'Accept' (if needed)
209
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
210
+ # HTTP header 'Content-Type'
211
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
212
+
213
+ # form parameters
214
+ form_params = {}
215
+
216
+ # http body (model)
217
+ post_body = @api_client.object_to_http_body(opts[:'body'])
218
+ auth_names = []
219
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
220
+ :header_params => header_params,
221
+ :query_params => query_params,
222
+ :form_params => form_params,
223
+ :body => post_body,
224
+ :auth_names => auth_names,
225
+ :return_type => 'ResponseMessage')
226
+ if @api_client.config.debugging
227
+ @api_client.config.logger.debug "API called: AttachmentsApi#send_audio_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
228
+ end
229
+ return data, status_code, headers
230
+ end
231
+
232
+ #
233
+ #
234
+ # @param token bot&#39;s token to authorize the request
235
+ # @param [Hash] opts the optional parameters
236
+ # @option opts [SendContactBody] :body
237
+ # @return [ResponseMessage]
238
+ def send_contact(token, opts = {})
239
+ data, _status_code, _headers = send_contact_with_http_info(token, opts)
240
+ return data
241
+ end
242
+
243
+ #
244
+ #
245
+ # @param token bot&#39;s token to authorize the request
246
+ # @param [Hash] opts the optional parameters
247
+ # @option opts [SendContactBody] :body
248
+ # @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
249
+ def send_contact_with_http_info(token, opts = {})
250
+ if @api_client.config.debugging
251
+ @api_client.config.logger.debug "Calling API: AttachmentsApi.send_contact ..."
252
+ end
253
+ # verify the required parameter 'token' is set
254
+ if @api_client.config.client_side_validation && token.nil?
255
+ fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_contact"
256
+ end
257
+ # resource path
258
+ local_var_path = "/bot{token}/sendContact".sub('{' + 'token' + '}', token.to_s)
259
+
260
+ # query parameters
261
+ query_params = {}
262
+
263
+ # header parameters
264
+ header_params = {}
265
+ # HTTP header 'Accept' (if needed)
266
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
267
+ # HTTP header 'Content-Type'
268
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
269
+
270
+ # form parameters
271
+ form_params = {}
272
+
273
+ # http body (model)
274
+ post_body = @api_client.object_to_http_body(opts[:'body'])
275
+ auth_names = []
276
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
277
+ :header_params => header_params,
278
+ :query_params => query_params,
279
+ :form_params => form_params,
280
+ :body => post_body,
281
+ :auth_names => auth_names,
282
+ :return_type => 'ResponseMessage')
283
+ if @api_client.config.debugging
284
+ @api_client.config.logger.debug "API called: AttachmentsApi#send_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
285
+ end
286
+ return data, status_code, headers
287
+ end
288
+
289
+ #
290
+ #
291
+ # @param token bot&#39;s token to authorize the request
292
+ # @param chat_id
293
+ # @param document
294
+ # @param [Hash] opts the optional parameters
295
+ # @option opts [String] :caption
296
+ # @option opts [BOOLEAN] :disable_notification
297
+ # @option opts [Integer] :reply_to_message_id
298
+ # @option opts [String] :reply_markup json string of reply_markup object
299
+ # @return [ResponseMessage]
300
+ def send_document(token, chat_id, document, opts = {})
301
+ data, _status_code, _headers = send_document_with_http_info(token, chat_id, document, opts)
302
+ return data
303
+ end
304
+
305
+ #
306
+ #
307
+ # @param token bot&#39;s token to authorize the request
308
+ # @param chat_id
309
+ # @param document
310
+ # @param [Hash] opts the optional parameters
311
+ # @option opts [String] :caption
312
+ # @option opts [BOOLEAN] :disable_notification
313
+ # @option opts [Integer] :reply_to_message_id
314
+ # @option opts [String] :reply_markup json string of reply_markup object
315
+ # @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
316
+ def send_document_with_http_info(token, chat_id, document, opts = {})
317
+ if @api_client.config.debugging
318
+ @api_client.config.logger.debug "Calling API: AttachmentsApi.send_document ..."
319
+ end
320
+ # verify the required parameter 'token' is set
321
+ if @api_client.config.client_side_validation && token.nil?
322
+ fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_document"
323
+ end
324
+ # verify the required parameter 'chat_id' is set
325
+ if @api_client.config.client_side_validation && chat_id.nil?
326
+ fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_document"
327
+ end
328
+ # verify the required parameter 'document' is set
329
+ if @api_client.config.client_side_validation && document.nil?
330
+ fail ArgumentError, "Missing the required parameter 'document' when calling AttachmentsApi.send_document"
331
+ end
332
+ # resource path
333
+ local_var_path = "/bot{token}/sendDocument".sub('{' + 'token' + '}', token.to_s)
334
+
335
+ # query parameters
336
+ query_params = {}
337
+
338
+ # header parameters
339
+ header_params = {}
340
+ # HTTP header 'Accept' (if needed)
341
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
342
+ # HTTP header 'Content-Type'
343
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
344
+
345
+ # form parameters
346
+ form_params = {}
347
+ form_params["chat_id"] = chat_id
348
+ form_params["document"] = document
349
+ form_params["caption"] = opts[:'caption'] if !opts[:'caption'].nil?
350
+ form_params["disable_notification"] = opts[:'disable_notification'] if !opts[:'disable_notification'].nil?
351
+ form_params["reply_to_message_id"] = opts[:'reply_to_message_id'] if !opts[:'reply_to_message_id'].nil?
352
+ form_params["reply_markup"] = opts[:'reply_markup'] if !opts[:'reply_markup'].nil?
353
+
354
+ # http body (model)
355
+ post_body = nil
356
+ auth_names = []
357
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
358
+ :header_params => header_params,
359
+ :query_params => query_params,
360
+ :form_params => form_params,
361
+ :body => post_body,
362
+ :auth_names => auth_names,
363
+ :return_type => 'ResponseMessage')
364
+ if @api_client.config.debugging
365
+ @api_client.config.logger.debug "API called: AttachmentsApi#send_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
366
+ end
367
+ return data, status_code, headers
368
+ end
369
+
370
+ #
371
+ #
372
+ # @param token bot&#39;s token to authorize the request
373
+ # @param [Hash] opts the optional parameters
374
+ # @option opts [SendDocumentLinkBody] :body
375
+ # @return [ResponseMessage]
376
+ def send_document_link(token, opts = {})
377
+ data, _status_code, _headers = send_document_link_with_http_info(token, opts)
378
+ return data
379
+ end
380
+
381
+ #
382
+ #
383
+ # @param token bot&#39;s token to authorize the request
384
+ # @param [Hash] opts the optional parameters
385
+ # @option opts [SendDocumentLinkBody] :body
386
+ # @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
387
+ def send_document_link_with_http_info(token, opts = {})
388
+ if @api_client.config.debugging
389
+ @api_client.config.logger.debug "Calling API: AttachmentsApi.send_document_link ..."
390
+ end
391
+ # verify the required parameter 'token' is set
392
+ if @api_client.config.client_side_validation && token.nil?
393
+ fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_document_link"
394
+ end
395
+ # resource path
396
+ local_var_path = "/bot{token}/sendDocument#link".sub('{' + 'token' + '}', token.to_s)
397
+
398
+ # query parameters
399
+ query_params = {}
400
+
401
+ # header parameters
402
+ header_params = {}
403
+ # HTTP header 'Accept' (if needed)
404
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
405
+ # HTTP header 'Content-Type'
406
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
407
+
408
+ # form parameters
409
+ form_params = {}
410
+
411
+ # http body (model)
412
+ post_body = @api_client.object_to_http_body(opts[:'body'])
413
+ auth_names = []
414
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
415
+ :header_params => header_params,
416
+ :query_params => query_params,
417
+ :form_params => form_params,
418
+ :body => post_body,
419
+ :auth_names => auth_names,
420
+ :return_type => 'ResponseMessage')
421
+ if @api_client.config.debugging
422
+ @api_client.config.logger.debug "API called: AttachmentsApi#send_document_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
423
+ end
424
+ return data, status_code, headers
425
+ end
426
+
427
+ #
428
+ #
429
+ # @param token bot&#39;s token to authorize the request
430
+ # @param [Hash] opts the optional parameters
431
+ # @option opts [SendLocationBody] :body
432
+ # @return [ResponseMessage]
433
+ def send_location(token, opts = {})
434
+ data, _status_code, _headers = send_location_with_http_info(token, opts)
435
+ return data
436
+ end
437
+
438
+ #
439
+ #
440
+ # @param token bot&#39;s token to authorize the request
441
+ # @param [Hash] opts the optional parameters
442
+ # @option opts [SendLocationBody] :body
443
+ # @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
444
+ def send_location_with_http_info(token, opts = {})
445
+ if @api_client.config.debugging
446
+ @api_client.config.logger.debug "Calling API: AttachmentsApi.send_location ..."
447
+ end
448
+ # verify the required parameter 'token' is set
449
+ if @api_client.config.client_side_validation && token.nil?
450
+ fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_location"
451
+ end
452
+ # resource path
453
+ local_var_path = "/bot{token}/sendLocation".sub('{' + 'token' + '}', token.to_s)
454
+
455
+ # query parameters
456
+ query_params = {}
457
+
458
+ # header parameters
459
+ header_params = {}
460
+ # HTTP header 'Accept' (if needed)
461
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
462
+ # HTTP header 'Content-Type'
463
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
464
+
465
+ # form parameters
466
+ form_params = {}
467
+
468
+ # http body (model)
469
+ post_body = @api_client.object_to_http_body(opts[:'body'])
470
+ auth_names = []
471
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
472
+ :header_params => header_params,
473
+ :query_params => query_params,
474
+ :form_params => form_params,
475
+ :body => post_body,
476
+ :auth_names => auth_names,
477
+ :return_type => 'ResponseMessage')
478
+ if @api_client.config.debugging
479
+ @api_client.config.logger.debug "API called: AttachmentsApi#send_location\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
480
+ end
481
+ return data, status_code, headers
482
+ end
483
+
484
+ #
485
+ #
486
+ # @param token bot&#39;s token to authorize the request
487
+ # @param chat_id
488
+ # @param photo
489
+ # @param [Hash] opts the optional parameters
490
+ # @option opts [String] :caption
491
+ # @option opts [BOOLEAN] :disable_notification
492
+ # @option opts [Integer] :reply_to_message_id
493
+ # @option opts [String] :reply_markup json string of reply_markup object
494
+ # @return [ResponseMessage]
495
+ def send_photo(token, chat_id, photo, opts = {})
496
+ data, _status_code, _headers = send_photo_with_http_info(token, chat_id, photo, opts)
497
+ return data
498
+ end
499
+
500
+ #
501
+ #
502
+ # @param token bot&#39;s token to authorize the request
503
+ # @param chat_id
504
+ # @param photo
505
+ # @param [Hash] opts the optional parameters
506
+ # @option opts [String] :caption
507
+ # @option opts [BOOLEAN] :disable_notification
508
+ # @option opts [Integer] :reply_to_message_id
509
+ # @option opts [String] :reply_markup json string of reply_markup object
510
+ # @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
511
+ def send_photo_with_http_info(token, chat_id, photo, opts = {})
512
+ if @api_client.config.debugging
513
+ @api_client.config.logger.debug "Calling API: AttachmentsApi.send_photo ..."
514
+ end
515
+ # verify the required parameter 'token' is set
516
+ if @api_client.config.client_side_validation && token.nil?
517
+ fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_photo"
518
+ end
519
+ # verify the required parameter 'chat_id' is set
520
+ if @api_client.config.client_side_validation && chat_id.nil?
521
+ fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_photo"
522
+ end
523
+ # verify the required parameter 'photo' is set
524
+ if @api_client.config.client_side_validation && photo.nil?
525
+ fail ArgumentError, "Missing the required parameter 'photo' when calling AttachmentsApi.send_photo"
526
+ end
527
+ # resource path
528
+ local_var_path = "/bot{token}/sendPhoto".sub('{' + 'token' + '}', token.to_s)
529
+
530
+ # query parameters
531
+ query_params = {}
532
+
533
+ # header parameters
534
+ header_params = {}
535
+ # HTTP header 'Accept' (if needed)
536
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
537
+ # HTTP header 'Content-Type'
538
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
539
+
540
+ # form parameters
541
+ form_params = {}
542
+ form_params["chat_id"] = chat_id
543
+ form_params["photo"] = photo
544
+ form_params["caption"] = opts[:'caption'] if !opts[:'caption'].nil?
545
+ form_params["disable_notification"] = opts[:'disable_notification'] if !opts[:'disable_notification'].nil?
546
+ form_params["reply_to_message_id"] = opts[:'reply_to_message_id'] if !opts[:'reply_to_message_id'].nil?
547
+ form_params["reply_markup"] = opts[:'reply_markup'] if !opts[:'reply_markup'].nil?
548
+
549
+ # http body (model)
550
+ post_body = nil
551
+ auth_names = []
552
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
553
+ :header_params => header_params,
554
+ :query_params => query_params,
555
+ :form_params => form_params,
556
+ :body => post_body,
557
+ :auth_names => auth_names,
558
+ :return_type => 'ResponseMessage')
559
+ if @api_client.config.debugging
560
+ @api_client.config.logger.debug "API called: AttachmentsApi#send_photo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
561
+ end
562
+ return data, status_code, headers
563
+ end
564
+
565
+ #
566
+ #
567
+ # @param token bot&#39;s token to authorize the request
568
+ # @param [Hash] opts the optional parameters
569
+ # @option opts [SendPhotoLinkBody] :body
570
+ # @return [ResponseMessage]
571
+ def send_photo_link(token, opts = {})
572
+ data, _status_code, _headers = send_photo_link_with_http_info(token, opts)
573
+ return data
574
+ end
575
+
576
+ #
577
+ #
578
+ # @param token bot&#39;s token to authorize the request
579
+ # @param [Hash] opts the optional parameters
580
+ # @option opts [SendPhotoLinkBody] :body
581
+ # @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
582
+ def send_photo_link_with_http_info(token, opts = {})
583
+ if @api_client.config.debugging
584
+ @api_client.config.logger.debug "Calling API: AttachmentsApi.send_photo_link ..."
585
+ end
586
+ # verify the required parameter 'token' is set
587
+ if @api_client.config.client_side_validation && token.nil?
588
+ fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_photo_link"
589
+ end
590
+ # resource path
591
+ local_var_path = "/bot{token}/sendPhoto#link".sub('{' + 'token' + '}', token.to_s)
592
+
593
+ # query parameters
594
+ query_params = {}
595
+
596
+ # header parameters
597
+ header_params = {}
598
+ # HTTP header 'Accept' (if needed)
599
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
600
+ # HTTP header 'Content-Type'
601
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
602
+
603
+ # form parameters
604
+ form_params = {}
605
+
606
+ # http body (model)
607
+ post_body = @api_client.object_to_http_body(opts[:'body'])
608
+ auth_names = []
609
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
610
+ :header_params => header_params,
611
+ :query_params => query_params,
612
+ :form_params => form_params,
613
+ :body => post_body,
614
+ :auth_names => auth_names,
615
+ :return_type => 'ResponseMessage')
616
+ if @api_client.config.debugging
617
+ @api_client.config.logger.debug "API called: AttachmentsApi#send_photo_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
618
+ end
619
+ return data, status_code, headers
620
+ end
621
+
622
+ #
623
+ #
624
+ # @param token bot&#39;s token to authorize the request
625
+ # @param chat_id
626
+ # @param sticker
627
+ # @param [Hash] opts the optional parameters
628
+ # @option opts [BOOLEAN] :disable_notification
629
+ # @option opts [Integer] :reply_to_message_id
630
+ # @option opts [String] :reply_markup json string of reply_markup object
631
+ # @return [ResponseMessage]
632
+ def send_sticker(token, chat_id, sticker, opts = {})
633
+ data, _status_code, _headers = send_sticker_with_http_info(token, chat_id, sticker, opts)
634
+ return data
635
+ end
636
+
637
+ #
638
+ #
639
+ # @param token bot&#39;s token to authorize the request
640
+ # @param chat_id
641
+ # @param sticker
642
+ # @param [Hash] opts the optional parameters
643
+ # @option opts [BOOLEAN] :disable_notification
644
+ # @option opts [Integer] :reply_to_message_id
645
+ # @option opts [String] :reply_markup json string of reply_markup object
646
+ # @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
647
+ def send_sticker_with_http_info(token, chat_id, sticker, opts = {})
648
+ if @api_client.config.debugging
649
+ @api_client.config.logger.debug "Calling API: AttachmentsApi.send_sticker ..."
650
+ end
651
+ # verify the required parameter 'token' is set
652
+ if @api_client.config.client_side_validation && token.nil?
653
+ fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_sticker"
654
+ end
655
+ # verify the required parameter 'chat_id' is set
656
+ if @api_client.config.client_side_validation && chat_id.nil?
657
+ fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_sticker"
658
+ end
659
+ # verify the required parameter 'sticker' is set
660
+ if @api_client.config.client_side_validation && sticker.nil?
661
+ fail ArgumentError, "Missing the required parameter 'sticker' when calling AttachmentsApi.send_sticker"
662
+ end
663
+ # resource path
664
+ local_var_path = "/bot{token}/sendSticker".sub('{' + 'token' + '}', token.to_s)
665
+
666
+ # query parameters
667
+ query_params = {}
668
+
669
+ # header parameters
670
+ header_params = {}
671
+ # HTTP header 'Accept' (if needed)
672
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
673
+ # HTTP header 'Content-Type'
674
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
675
+
676
+ # form parameters
677
+ form_params = {}
678
+ form_params["chat_id"] = chat_id
679
+ form_params["sticker"] = sticker
680
+ form_params["disable_notification"] = opts[:'disable_notification'] if !opts[:'disable_notification'].nil?
681
+ form_params["reply_to_message_id"] = opts[:'reply_to_message_id'] if !opts[:'reply_to_message_id'].nil?
682
+ form_params["reply_markup"] = opts[:'reply_markup'] if !opts[:'reply_markup'].nil?
683
+
684
+ # http body (model)
685
+ post_body = nil
686
+ auth_names = []
687
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
688
+ :header_params => header_params,
689
+ :query_params => query_params,
690
+ :form_params => form_params,
691
+ :body => post_body,
692
+ :auth_names => auth_names,
693
+ :return_type => 'ResponseMessage')
694
+ if @api_client.config.debugging
695
+ @api_client.config.logger.debug "API called: AttachmentsApi#send_sticker\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
696
+ end
697
+ return data, status_code, headers
698
+ end
699
+
700
+ #
701
+ #
702
+ # @param token bot&#39;s token to authorize the request
703
+ # @param [Hash] opts the optional parameters
704
+ # @option opts [SendStickerLinkBody] :body
705
+ # @return [ResponseMessage]
706
+ def send_sticker_link(token, opts = {})
707
+ data, _status_code, _headers = send_sticker_link_with_http_info(token, opts)
708
+ return data
709
+ end
710
+
711
+ #
712
+ #
713
+ # @param token bot&#39;s token to authorize the request
714
+ # @param [Hash] opts the optional parameters
715
+ # @option opts [SendStickerLinkBody] :body
716
+ # @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
717
+ def send_sticker_link_with_http_info(token, opts = {})
718
+ if @api_client.config.debugging
719
+ @api_client.config.logger.debug "Calling API: AttachmentsApi.send_sticker_link ..."
720
+ end
721
+ # verify the required parameter 'token' is set
722
+ if @api_client.config.client_side_validation && token.nil?
723
+ fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_sticker_link"
724
+ end
725
+ # resource path
726
+ local_var_path = "/bot{token}/sendSticker#link".sub('{' + 'token' + '}', token.to_s)
727
+
728
+ # query parameters
729
+ query_params = {}
730
+
731
+ # header parameters
732
+ header_params = {}
733
+ # HTTP header 'Accept' (if needed)
734
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
735
+ # HTTP header 'Content-Type'
736
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
737
+
738
+ # form parameters
739
+ form_params = {}
740
+
741
+ # http body (model)
742
+ post_body = @api_client.object_to_http_body(opts[:'body'])
743
+ auth_names = []
744
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
745
+ :header_params => header_params,
746
+ :query_params => query_params,
747
+ :form_params => form_params,
748
+ :body => post_body,
749
+ :auth_names => auth_names,
750
+ :return_type => 'ResponseMessage')
751
+ if @api_client.config.debugging
752
+ @api_client.config.logger.debug "API called: AttachmentsApi#send_sticker_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
753
+ end
754
+ return data, status_code, headers
755
+ end
756
+
757
+ #
758
+ #
759
+ # @param token bot&#39;s token to authorize the request
760
+ # @param [Hash] opts the optional parameters
761
+ # @option opts [SendVenueBody] :body
762
+ # @return [ResponseMessage]
763
+ def send_venue(token, opts = {})
764
+ data, _status_code, _headers = send_venue_with_http_info(token, opts)
765
+ return data
766
+ end
767
+
768
+ #
769
+ #
770
+ # @param token bot&#39;s token to authorize the request
771
+ # @param [Hash] opts the optional parameters
772
+ # @option opts [SendVenueBody] :body
773
+ # @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
774
+ def send_venue_with_http_info(token, opts = {})
775
+ if @api_client.config.debugging
776
+ @api_client.config.logger.debug "Calling API: AttachmentsApi.send_venue ..."
777
+ end
778
+ # verify the required parameter 'token' is set
779
+ if @api_client.config.client_side_validation && token.nil?
780
+ fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_venue"
781
+ end
782
+ # resource path
783
+ local_var_path = "/bot{token}/sendVenue".sub('{' + 'token' + '}', token.to_s)
784
+
785
+ # query parameters
786
+ query_params = {}
787
+
788
+ # header parameters
789
+ header_params = {}
790
+ # HTTP header 'Accept' (if needed)
791
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
792
+ # HTTP header 'Content-Type'
793
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
794
+
795
+ # form parameters
796
+ form_params = {}
797
+
798
+ # http body (model)
799
+ post_body = @api_client.object_to_http_body(opts[:'body'])
800
+ auth_names = []
801
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
802
+ :header_params => header_params,
803
+ :query_params => query_params,
804
+ :form_params => form_params,
805
+ :body => post_body,
806
+ :auth_names => auth_names,
807
+ :return_type => 'ResponseMessage')
808
+ if @api_client.config.debugging
809
+ @api_client.config.logger.debug "API called: AttachmentsApi#send_venue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
810
+ end
811
+ return data, status_code, headers
812
+ end
813
+
814
+ #
815
+ #
816
+ # @param token bot&#39;s token to authorize the request
817
+ # @param chat_id
818
+ # @param video
819
+ # @param [Hash] opts the optional parameters
820
+ # @option opts [Integer] :duration
821
+ # @option opts [Integer] :width
822
+ # @option opts [Integer] :height
823
+ # @option opts [String] :caption
824
+ # @option opts [BOOLEAN] :disable_notification
825
+ # @option opts [Integer] :reply_to_message_id
826
+ # @option opts [String] :reply_markup json string of reply_markup object
827
+ # @return [ResponseMessage]
828
+ def send_video(token, chat_id, video, opts = {})
829
+ data, _status_code, _headers = send_video_with_http_info(token, chat_id, video, opts)
830
+ return data
831
+ end
832
+
833
+ #
834
+ #
835
+ # @param token bot&#39;s token to authorize the request
836
+ # @param chat_id
837
+ # @param video
838
+ # @param [Hash] opts the optional parameters
839
+ # @option opts [Integer] :duration
840
+ # @option opts [Integer] :width
841
+ # @option opts [Integer] :height
842
+ # @option opts [String] :caption
843
+ # @option opts [BOOLEAN] :disable_notification
844
+ # @option opts [Integer] :reply_to_message_id
845
+ # @option opts [String] :reply_markup json string of reply_markup object
846
+ # @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
847
+ def send_video_with_http_info(token, chat_id, video, opts = {})
848
+ if @api_client.config.debugging
849
+ @api_client.config.logger.debug "Calling API: AttachmentsApi.send_video ..."
850
+ end
851
+ # verify the required parameter 'token' is set
852
+ if @api_client.config.client_side_validation && token.nil?
853
+ fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_video"
854
+ end
855
+ # verify the required parameter 'chat_id' is set
856
+ if @api_client.config.client_side_validation && chat_id.nil?
857
+ fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_video"
858
+ end
859
+ # verify the required parameter 'video' is set
860
+ if @api_client.config.client_side_validation && video.nil?
861
+ fail ArgumentError, "Missing the required parameter 'video' when calling AttachmentsApi.send_video"
862
+ end
863
+ # resource path
864
+ local_var_path = "/bot{token}/sendVideo".sub('{' + 'token' + '}', token.to_s)
865
+
866
+ # query parameters
867
+ query_params = {}
868
+
869
+ # header parameters
870
+ header_params = {}
871
+ # HTTP header 'Accept' (if needed)
872
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
873
+ # HTTP header 'Content-Type'
874
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
875
+
876
+ # form parameters
877
+ form_params = {}
878
+ form_params["chat_id"] = chat_id
879
+ form_params["video"] = video
880
+ form_params["duration"] = opts[:'duration'] if !opts[:'duration'].nil?
881
+ form_params["width"] = opts[:'width'] if !opts[:'width'].nil?
882
+ form_params["height"] = opts[:'height'] if !opts[:'height'].nil?
883
+ form_params["caption"] = opts[:'caption'] if !opts[:'caption'].nil?
884
+ form_params["disable_notification"] = opts[:'disable_notification'] if !opts[:'disable_notification'].nil?
885
+ form_params["reply_to_message_id"] = opts[:'reply_to_message_id'] if !opts[:'reply_to_message_id'].nil?
886
+ form_params["reply_markup"] = opts[:'reply_markup'] if !opts[:'reply_markup'].nil?
887
+
888
+ # http body (model)
889
+ post_body = nil
890
+ auth_names = []
891
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
892
+ :header_params => header_params,
893
+ :query_params => query_params,
894
+ :form_params => form_params,
895
+ :body => post_body,
896
+ :auth_names => auth_names,
897
+ :return_type => 'ResponseMessage')
898
+ if @api_client.config.debugging
899
+ @api_client.config.logger.debug "API called: AttachmentsApi#send_video\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
900
+ end
901
+ return data, status_code, headers
902
+ end
903
+
904
+ #
905
+ #
906
+ # @param token bot&#39;s token to authorize the request
907
+ # @param [Hash] opts the optional parameters
908
+ # @option opts [SendVideoLinkBody] :body
909
+ # @return [ResponseMessage]
910
+ def send_video_link(token, opts = {})
911
+ data, _status_code, _headers = send_video_link_with_http_info(token, opts)
912
+ return data
913
+ end
914
+
915
+ #
916
+ #
917
+ # @param token bot&#39;s token to authorize the request
918
+ # @param [Hash] opts the optional parameters
919
+ # @option opts [SendVideoLinkBody] :body
920
+ # @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
921
+ def send_video_link_with_http_info(token, opts = {})
922
+ if @api_client.config.debugging
923
+ @api_client.config.logger.debug "Calling API: AttachmentsApi.send_video_link ..."
924
+ end
925
+ # verify the required parameter 'token' is set
926
+ if @api_client.config.client_side_validation && token.nil?
927
+ fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_video_link"
928
+ end
929
+ # resource path
930
+ local_var_path = "/bot{token}/sendVideo#link".sub('{' + 'token' + '}', token.to_s)
931
+
932
+ # query parameters
933
+ query_params = {}
934
+
935
+ # header parameters
936
+ header_params = {}
937
+ # HTTP header 'Accept' (if needed)
938
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
939
+ # HTTP header 'Content-Type'
940
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
941
+
942
+ # form parameters
943
+ form_params = {}
944
+
945
+ # http body (model)
946
+ post_body = @api_client.object_to_http_body(opts[:'body'])
947
+ auth_names = []
948
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
949
+ :header_params => header_params,
950
+ :query_params => query_params,
951
+ :form_params => form_params,
952
+ :body => post_body,
953
+ :auth_names => auth_names,
954
+ :return_type => 'ResponseMessage')
955
+ if @api_client.config.debugging
956
+ @api_client.config.logger.debug "API called: AttachmentsApi#send_video_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
957
+ end
958
+ return data, status_code, headers
959
+ end
960
+
961
+ #
962
+ #
963
+ # @param token bot&#39;s token to authorize the request
964
+ # @param chat_id
965
+ # @param video_note
966
+ # @param [Hash] opts the optional parameters
967
+ # @option opts [Integer] :duration
968
+ # @option opts [Integer] :length
969
+ # @option opts [BOOLEAN] :disable_notification
970
+ # @option opts [Integer] :reply_to_message_id
971
+ # @option opts [String] :reply_markup json string of reply_markup object
972
+ # @return [ResponseMessage]
973
+ def send_video_note(token, chat_id, video_note, opts = {})
974
+ data, _status_code, _headers = send_video_note_with_http_info(token, chat_id, video_note, opts)
975
+ return data
976
+ end
977
+
978
+ #
979
+ #
980
+ # @param token bot&#39;s token to authorize the request
981
+ # @param chat_id
982
+ # @param video_note
983
+ # @param [Hash] opts the optional parameters
984
+ # @option opts [Integer] :duration
985
+ # @option opts [Integer] :length
986
+ # @option opts [BOOLEAN] :disable_notification
987
+ # @option opts [Integer] :reply_to_message_id
988
+ # @option opts [String] :reply_markup json string of reply_markup object
989
+ # @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
990
+ def send_video_note_with_http_info(token, chat_id, video_note, opts = {})
991
+ if @api_client.config.debugging
992
+ @api_client.config.logger.debug "Calling API: AttachmentsApi.send_video_note ..."
993
+ end
994
+ # verify the required parameter 'token' is set
995
+ if @api_client.config.client_side_validation && token.nil?
996
+ fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_video_note"
997
+ end
998
+ # verify the required parameter 'chat_id' is set
999
+ if @api_client.config.client_side_validation && chat_id.nil?
1000
+ fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_video_note"
1001
+ end
1002
+ # verify the required parameter 'video_note' is set
1003
+ if @api_client.config.client_side_validation && video_note.nil?
1004
+ fail ArgumentError, "Missing the required parameter 'video_note' when calling AttachmentsApi.send_video_note"
1005
+ end
1006
+ # resource path
1007
+ local_var_path = "/bot{token}/sendVideoNote".sub('{' + 'token' + '}', token.to_s)
1008
+
1009
+ # query parameters
1010
+ query_params = {}
1011
+
1012
+ # header parameters
1013
+ header_params = {}
1014
+ # HTTP header 'Accept' (if needed)
1015
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1016
+ # HTTP header 'Content-Type'
1017
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
1018
+
1019
+ # form parameters
1020
+ form_params = {}
1021
+ form_params["chat_id"] = chat_id
1022
+ form_params["video_note"] = video_note
1023
+ form_params["duration"] = opts[:'duration'] if !opts[:'duration'].nil?
1024
+ form_params["length"] = opts[:'length'] if !opts[:'length'].nil?
1025
+ form_params["disable_notification"] = opts[:'disable_notification'] if !opts[:'disable_notification'].nil?
1026
+ form_params["reply_to_message_id"] = opts[:'reply_to_message_id'] if !opts[:'reply_to_message_id'].nil?
1027
+ form_params["reply_markup"] = opts[:'reply_markup'] if !opts[:'reply_markup'].nil?
1028
+
1029
+ # http body (model)
1030
+ post_body = nil
1031
+ auth_names = []
1032
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1033
+ :header_params => header_params,
1034
+ :query_params => query_params,
1035
+ :form_params => form_params,
1036
+ :body => post_body,
1037
+ :auth_names => auth_names,
1038
+ :return_type => 'ResponseMessage')
1039
+ if @api_client.config.debugging
1040
+ @api_client.config.logger.debug "API called: AttachmentsApi#send_video_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1041
+ end
1042
+ return data, status_code, headers
1043
+ end
1044
+
1045
+ #
1046
+ #
1047
+ # @param token bot&#39;s token to authorize the request
1048
+ # @param [Hash] opts the optional parameters
1049
+ # @option opts [SendVideoNoteLinkBody] :body
1050
+ # @return [ResponseMessage]
1051
+ def send_video_note_link(token, opts = {})
1052
+ data, _status_code, _headers = send_video_note_link_with_http_info(token, opts)
1053
+ return data
1054
+ end
1055
+
1056
+ #
1057
+ #
1058
+ # @param token bot&#39;s token to authorize the request
1059
+ # @param [Hash] opts the optional parameters
1060
+ # @option opts [SendVideoNoteLinkBody] :body
1061
+ # @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
1062
+ def send_video_note_link_with_http_info(token, opts = {})
1063
+ if @api_client.config.debugging
1064
+ @api_client.config.logger.debug "Calling API: AttachmentsApi.send_video_note_link ..."
1065
+ end
1066
+ # verify the required parameter 'token' is set
1067
+ if @api_client.config.client_side_validation && token.nil?
1068
+ fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_video_note_link"
1069
+ end
1070
+ # resource path
1071
+ local_var_path = "/bot{token}/sendVideoNote#link".sub('{' + 'token' + '}', token.to_s)
1072
+
1073
+ # query parameters
1074
+ query_params = {}
1075
+
1076
+ # header parameters
1077
+ header_params = {}
1078
+ # HTTP header 'Accept' (if needed)
1079
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1080
+ # HTTP header 'Content-Type'
1081
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1082
+
1083
+ # form parameters
1084
+ form_params = {}
1085
+
1086
+ # http body (model)
1087
+ post_body = @api_client.object_to_http_body(opts[:'body'])
1088
+ auth_names = []
1089
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1090
+ :header_params => header_params,
1091
+ :query_params => query_params,
1092
+ :form_params => form_params,
1093
+ :body => post_body,
1094
+ :auth_names => auth_names,
1095
+ :return_type => 'ResponseMessage')
1096
+ if @api_client.config.debugging
1097
+ @api_client.config.logger.debug "API called: AttachmentsApi#send_video_note_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1098
+ end
1099
+ return data, status_code, headers
1100
+ end
1101
+
1102
+ #
1103
+ #
1104
+ # @param token bot&#39;s token to authorize the request
1105
+ # @param chat_id
1106
+ # @param voice
1107
+ # @param [Hash] opts the optional parameters
1108
+ # @option opts [String] :caption
1109
+ # @option opts [Integer] :duration
1110
+ # @option opts [BOOLEAN] :disable_notification
1111
+ # @option opts [Integer] :reply_to_message_id
1112
+ # @option opts [String] :reply_markup json string of reply_markup object
1113
+ # @return [ResponseMessage]
1114
+ def send_voice(token, chat_id, voice, opts = {})
1115
+ data, _status_code, _headers = send_voice_with_http_info(token, chat_id, voice, opts)
1116
+ return data
1117
+ end
1118
+
1119
+ #
1120
+ #
1121
+ # @param token bot&#39;s token to authorize the request
1122
+ # @param chat_id
1123
+ # @param voice
1124
+ # @param [Hash] opts the optional parameters
1125
+ # @option opts [String] :caption
1126
+ # @option opts [Integer] :duration
1127
+ # @option opts [BOOLEAN] :disable_notification
1128
+ # @option opts [Integer] :reply_to_message_id
1129
+ # @option opts [String] :reply_markup json string of reply_markup object
1130
+ # @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
1131
+ def send_voice_with_http_info(token, chat_id, voice, opts = {})
1132
+ if @api_client.config.debugging
1133
+ @api_client.config.logger.debug "Calling API: AttachmentsApi.send_voice ..."
1134
+ end
1135
+ # verify the required parameter 'token' is set
1136
+ if @api_client.config.client_side_validation && token.nil?
1137
+ fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_voice"
1138
+ end
1139
+ # verify the required parameter 'chat_id' is set
1140
+ if @api_client.config.client_side_validation && chat_id.nil?
1141
+ fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_voice"
1142
+ end
1143
+ # verify the required parameter 'voice' is set
1144
+ if @api_client.config.client_side_validation && voice.nil?
1145
+ fail ArgumentError, "Missing the required parameter 'voice' when calling AttachmentsApi.send_voice"
1146
+ end
1147
+ # resource path
1148
+ local_var_path = "/bot{token}/sendVoice".sub('{' + 'token' + '}', token.to_s)
1149
+
1150
+ # query parameters
1151
+ query_params = {}
1152
+
1153
+ # header parameters
1154
+ header_params = {}
1155
+ # HTTP header 'Accept' (if needed)
1156
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1157
+ # HTTP header 'Content-Type'
1158
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
1159
+
1160
+ # form parameters
1161
+ form_params = {}
1162
+ form_params["chat_id"] = chat_id
1163
+ form_params["voice"] = voice
1164
+ form_params["caption"] = opts[:'caption'] if !opts[:'caption'].nil?
1165
+ form_params["duration"] = opts[:'duration'] if !opts[:'duration'].nil?
1166
+ form_params["disable_notification"] = opts[:'disable_notification'] if !opts[:'disable_notification'].nil?
1167
+ form_params["reply_to_message_id"] = opts[:'reply_to_message_id'] if !opts[:'reply_to_message_id'].nil?
1168
+ form_params["reply_markup"] = opts[:'reply_markup'] if !opts[:'reply_markup'].nil?
1169
+
1170
+ # http body (model)
1171
+ post_body = nil
1172
+ auth_names = []
1173
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1174
+ :header_params => header_params,
1175
+ :query_params => query_params,
1176
+ :form_params => form_params,
1177
+ :body => post_body,
1178
+ :auth_names => auth_names,
1179
+ :return_type => 'ResponseMessage')
1180
+ if @api_client.config.debugging
1181
+ @api_client.config.logger.debug "API called: AttachmentsApi#send_voice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1182
+ end
1183
+ return data, status_code, headers
1184
+ end
1185
+
1186
+ #
1187
+ #
1188
+ # @param token bot&#39;s token to authorize the request
1189
+ # @param [Hash] opts the optional parameters
1190
+ # @option opts [SendVoiceLinkBody] :body
1191
+ # @return [ResponseMessage]
1192
+ def send_voice_link(token, opts = {})
1193
+ data, _status_code, _headers = send_voice_link_with_http_info(token, opts)
1194
+ return data
1195
+ end
1196
+
1197
+ #
1198
+ #
1199
+ # @param token bot&#39;s token to authorize the request
1200
+ # @param [Hash] opts the optional parameters
1201
+ # @option opts [SendVoiceLinkBody] :body
1202
+ # @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
1203
+ def send_voice_link_with_http_info(token, opts = {})
1204
+ if @api_client.config.debugging
1205
+ @api_client.config.logger.debug "Calling API: AttachmentsApi.send_voice_link ..."
1206
+ end
1207
+ # verify the required parameter 'token' is set
1208
+ if @api_client.config.client_side_validation && token.nil?
1209
+ fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_voice_link"
1210
+ end
1211
+ # resource path
1212
+ local_var_path = "/bot{token}/sendVoice#link".sub('{' + 'token' + '}', token.to_s)
1213
+
1214
+ # query parameters
1215
+ query_params = {}
1216
+
1217
+ # header parameters
1218
+ header_params = {}
1219
+ # HTTP header 'Accept' (if needed)
1220
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1221
+ # HTTP header 'Content-Type'
1222
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1223
+
1224
+ # form parameters
1225
+ form_params = {}
1226
+
1227
+ # http body (model)
1228
+ post_body = @api_client.object_to_http_body(opts[:'body'])
1229
+ auth_names = []
1230
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1231
+ :header_params => header_params,
1232
+ :query_params => query_params,
1233
+ :form_params => form_params,
1234
+ :body => post_body,
1235
+ :auth_names => auth_names,
1236
+ :return_type => 'ResponseMessage')
1237
+ if @api_client.config.debugging
1238
+ @api_client.config.logger.debug "API called: AttachmentsApi#send_voice_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1239
+ end
1240
+ return data, status_code, headers
1241
+ end
1242
+ end
1243
+ end