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,209 @@
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 PaymentsApi
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 pre_checkout_query_id
27
+ # @param ok
28
+ # @param [Hash] opts the optional parameters
29
+ # @option opts [String] :error_message
30
+ # @return [ResponseBool]
31
+ def answer_pre_checkout_query(token, pre_checkout_query_id, ok, opts = {})
32
+ data, _status_code, _headers = answer_pre_checkout_query_with_http_info(token, pre_checkout_query_id, ok, opts)
33
+ return data
34
+ end
35
+
36
+ #
37
+ #
38
+ # @param token bot's token to authorize the request
39
+ # @param pre_checkout_query_id
40
+ # @param ok
41
+ # @param [Hash] opts the optional parameters
42
+ # @option opts [String] :error_message
43
+ # @return [Array<(ResponseBool, Fixnum, Hash)>] ResponseBool data, response status code and response headers
44
+ def answer_pre_checkout_query_with_http_info(token, pre_checkout_query_id, ok, opts = {})
45
+ if @api_client.config.debugging
46
+ @api_client.config.logger.debug "Calling API: PaymentsApi.answer_pre_checkout_query ..."
47
+ end
48
+ # verify the required parameter 'token' is set
49
+ if @api_client.config.client_side_validation && token.nil?
50
+ fail ArgumentError, "Missing the required parameter 'token' when calling PaymentsApi.answer_pre_checkout_query"
51
+ end
52
+ # verify the required parameter 'pre_checkout_query_id' is set
53
+ if @api_client.config.client_side_validation && pre_checkout_query_id.nil?
54
+ fail ArgumentError, "Missing the required parameter 'pre_checkout_query_id' when calling PaymentsApi.answer_pre_checkout_query"
55
+ end
56
+ # verify the required parameter 'ok' is set
57
+ if @api_client.config.client_side_validation && ok.nil?
58
+ fail ArgumentError, "Missing the required parameter 'ok' when calling PaymentsApi.answer_pre_checkout_query"
59
+ end
60
+ # resource path
61
+ local_var_path = "/bot{token}/answerPreCheckoutQuery".sub('{' + 'token' + '}', token.to_s)
62
+
63
+ # query parameters
64
+ query_params = {}
65
+ query_params[:'pre_checkout_query_id'] = pre_checkout_query_id
66
+ query_params[:'ok'] = ok
67
+ query_params[:'error_message'] = opts[:'error_message'] if !opts[:'error_message'].nil?
68
+
69
+ # header parameters
70
+ header_params = {}
71
+ # HTTP header 'Accept' (if needed)
72
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
73
+ # HTTP header 'Content-Type'
74
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
75
+
76
+ # form parameters
77
+ form_params = {}
78
+
79
+ # http body (model)
80
+ post_body = nil
81
+ auth_names = []
82
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
83
+ :header_params => header_params,
84
+ :query_params => query_params,
85
+ :form_params => form_params,
86
+ :body => post_body,
87
+ :auth_names => auth_names,
88
+ :return_type => 'ResponseBool')
89
+ if @api_client.config.debugging
90
+ @api_client.config.logger.debug "API called: PaymentsApi#answer_pre_checkout_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
91
+ end
92
+ return data, status_code, headers
93
+ end
94
+
95
+ #
96
+ #
97
+ # @param token bot&#39;s token to authorize the request
98
+ # @param [Hash] opts the optional parameters
99
+ # @option opts [AnswerShippingQueryBody] :body
100
+ # @return [ResponseMessage]
101
+ def answer_shipping_query(token, opts = {})
102
+ data, _status_code, _headers = answer_shipping_query_with_http_info(token, opts)
103
+ return data
104
+ end
105
+
106
+ #
107
+ #
108
+ # @param token bot&#39;s token to authorize the request
109
+ # @param [Hash] opts the optional parameters
110
+ # @option opts [AnswerShippingQueryBody] :body
111
+ # @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
112
+ def answer_shipping_query_with_http_info(token, opts = {})
113
+ if @api_client.config.debugging
114
+ @api_client.config.logger.debug "Calling API: PaymentsApi.answer_shipping_query ..."
115
+ end
116
+ # verify the required parameter 'token' is set
117
+ if @api_client.config.client_side_validation && token.nil?
118
+ fail ArgumentError, "Missing the required parameter 'token' when calling PaymentsApi.answer_shipping_query"
119
+ end
120
+ # resource path
121
+ local_var_path = "/bot{token}/answerShippingQuery".sub('{' + 'token' + '}', token.to_s)
122
+
123
+ # query parameters
124
+ query_params = {}
125
+
126
+ # header parameters
127
+ header_params = {}
128
+ # HTTP header 'Accept' (if needed)
129
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
130
+ # HTTP header 'Content-Type'
131
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
132
+
133
+ # form parameters
134
+ form_params = {}
135
+
136
+ # http body (model)
137
+ post_body = @api_client.object_to_http_body(opts[:'body'])
138
+ auth_names = []
139
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
140
+ :header_params => header_params,
141
+ :query_params => query_params,
142
+ :form_params => form_params,
143
+ :body => post_body,
144
+ :auth_names => auth_names,
145
+ :return_type => 'ResponseMessage')
146
+ if @api_client.config.debugging
147
+ @api_client.config.logger.debug "API called: PaymentsApi#answer_shipping_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
148
+ end
149
+ return data, status_code, headers
150
+ end
151
+
152
+ #
153
+ #
154
+ # @param token bot&#39;s token to authorize the request
155
+ # @param [Hash] opts the optional parameters
156
+ # @option opts [SendInvoiceBody] :body
157
+ # @return [ResponseMessage]
158
+ def send_invoice(token, opts = {})
159
+ data, _status_code, _headers = send_invoice_with_http_info(token, opts)
160
+ return data
161
+ end
162
+
163
+ #
164
+ #
165
+ # @param token bot&#39;s token to authorize the request
166
+ # @param [Hash] opts the optional parameters
167
+ # @option opts [SendInvoiceBody] :body
168
+ # @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
169
+ def send_invoice_with_http_info(token, opts = {})
170
+ if @api_client.config.debugging
171
+ @api_client.config.logger.debug "Calling API: PaymentsApi.send_invoice ..."
172
+ end
173
+ # verify the required parameter 'token' is set
174
+ if @api_client.config.client_side_validation && token.nil?
175
+ fail ArgumentError, "Missing the required parameter 'token' when calling PaymentsApi.send_invoice"
176
+ end
177
+ # resource path
178
+ local_var_path = "/bot{token}/sendInvoice".sub('{' + 'token' + '}', token.to_s)
179
+
180
+ # query parameters
181
+ query_params = {}
182
+
183
+ # header parameters
184
+ header_params = {}
185
+ # HTTP header 'Accept' (if needed)
186
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
187
+ # HTTP header 'Content-Type'
188
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
189
+
190
+ # form parameters
191
+ form_params = {}
192
+
193
+ # http body (model)
194
+ post_body = @api_client.object_to_http_body(opts[:'body'])
195
+ auth_names = []
196
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
197
+ :header_params => header_params,
198
+ :query_params => query_params,
199
+ :form_params => form_params,
200
+ :body => post_body,
201
+ :auth_names => auth_names,
202
+ :return_type => 'ResponseMessage')
203
+ if @api_client.config.debugging
204
+ @api_client.config.logger.debug "API called: PaymentsApi#send_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
205
+ end
206
+ return data, status_code, headers
207
+ end
208
+ end
209
+ end
@@ -0,0 +1,658 @@
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 StickersApi
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 user_id
27
+ # @param name
28
+ # @param png_sticker
29
+ # @param emojis
30
+ # @param [Hash] opts the optional parameters
31
+ # @option opts [String] :mask_position Serialized to JSON MaskPosition
32
+ # @return [ResponseBool]
33
+ def add_sticker_to_set(token, user_id, name, png_sticker, emojis, opts = {})
34
+ data, _status_code, _headers = add_sticker_to_set_with_http_info(token, user_id, name, png_sticker, emojis, opts)
35
+ return data
36
+ end
37
+
38
+ #
39
+ #
40
+ # @param token bot&#39;s token to authorize the request
41
+ # @param user_id
42
+ # @param name
43
+ # @param png_sticker
44
+ # @param emojis
45
+ # @param [Hash] opts the optional parameters
46
+ # @option opts [String] :mask_position Serialized to JSON MaskPosition
47
+ # @return [Array<(ResponseBool, Fixnum, Hash)>] ResponseBool data, response status code and response headers
48
+ def add_sticker_to_set_with_http_info(token, user_id, name, png_sticker, emojis, opts = {})
49
+ if @api_client.config.debugging
50
+ @api_client.config.logger.debug "Calling API: StickersApi.add_sticker_to_set ..."
51
+ end
52
+ # verify the required parameter 'token' is set
53
+ if @api_client.config.client_side_validation && token.nil?
54
+ fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.add_sticker_to_set"
55
+ end
56
+ # verify the required parameter 'user_id' is set
57
+ if @api_client.config.client_side_validation && user_id.nil?
58
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling StickersApi.add_sticker_to_set"
59
+ end
60
+ # verify the required parameter 'name' is set
61
+ if @api_client.config.client_side_validation && name.nil?
62
+ fail ArgumentError, "Missing the required parameter 'name' when calling StickersApi.add_sticker_to_set"
63
+ end
64
+ # verify the required parameter 'png_sticker' is set
65
+ if @api_client.config.client_side_validation && png_sticker.nil?
66
+ fail ArgumentError, "Missing the required parameter 'png_sticker' when calling StickersApi.add_sticker_to_set"
67
+ end
68
+ # verify the required parameter 'emojis' is set
69
+ if @api_client.config.client_side_validation && emojis.nil?
70
+ fail ArgumentError, "Missing the required parameter 'emojis' when calling StickersApi.add_sticker_to_set"
71
+ end
72
+ # resource path
73
+ local_var_path = "/bot{token}/addStickerToSet".sub('{' + 'token' + '}', token.to_s)
74
+
75
+ # query parameters
76
+ query_params = {}
77
+
78
+ # header parameters
79
+ header_params = {}
80
+ # HTTP header 'Accept' (if needed)
81
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
82
+ # HTTP header 'Content-Type'
83
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
84
+
85
+ # form parameters
86
+ form_params = {}
87
+ form_params["user_id"] = user_id
88
+ form_params["name"] = name
89
+ form_params["png_sticker"] = png_sticker
90
+ form_params["emojis"] = emojis
91
+ form_params["mask_position"] = opts[:'mask_position'] if !opts[:'mask_position'].nil?
92
+
93
+ # http body (model)
94
+ post_body = nil
95
+ auth_names = []
96
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
97
+ :header_params => header_params,
98
+ :query_params => query_params,
99
+ :form_params => form_params,
100
+ :body => post_body,
101
+ :auth_names => auth_names,
102
+ :return_type => 'ResponseBool')
103
+ if @api_client.config.debugging
104
+ @api_client.config.logger.debug "API called: StickersApi#add_sticker_to_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
105
+ end
106
+ return data, status_code, headers
107
+ end
108
+
109
+ #
110
+ #
111
+ # @param token bot&#39;s token to authorize the request
112
+ # @param body
113
+ # @param [Hash] opts the optional parameters
114
+ # @return [ResponseBool]
115
+ def add_sticker_to_set_link(token, body, opts = {})
116
+ data, _status_code, _headers = add_sticker_to_set_link_with_http_info(token, body, opts)
117
+ return data
118
+ end
119
+
120
+ #
121
+ #
122
+ # @param token bot&#39;s token to authorize the request
123
+ # @param body
124
+ # @param [Hash] opts the optional parameters
125
+ # @return [Array<(ResponseBool, Fixnum, Hash)>] ResponseBool data, response status code and response headers
126
+ def add_sticker_to_set_link_with_http_info(token, body, opts = {})
127
+ if @api_client.config.debugging
128
+ @api_client.config.logger.debug "Calling API: StickersApi.add_sticker_to_set_link ..."
129
+ end
130
+ # verify the required parameter 'token' is set
131
+ if @api_client.config.client_side_validation && token.nil?
132
+ fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.add_sticker_to_set_link"
133
+ end
134
+ # verify the required parameter 'body' is set
135
+ if @api_client.config.client_side_validation && body.nil?
136
+ fail ArgumentError, "Missing the required parameter 'body' when calling StickersApi.add_sticker_to_set_link"
137
+ end
138
+ # resource path
139
+ local_var_path = "/bot{token}/addStickerToSet#link".sub('{' + 'token' + '}', token.to_s)
140
+
141
+ # query parameters
142
+ query_params = {}
143
+
144
+ # header parameters
145
+ header_params = {}
146
+ # HTTP header 'Accept' (if needed)
147
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
148
+ # HTTP header 'Content-Type'
149
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
150
+
151
+ # form parameters
152
+ form_params = {}
153
+
154
+ # http body (model)
155
+ post_body = @api_client.object_to_http_body(body)
156
+ auth_names = []
157
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
158
+ :header_params => header_params,
159
+ :query_params => query_params,
160
+ :form_params => form_params,
161
+ :body => post_body,
162
+ :auth_names => auth_names,
163
+ :return_type => 'ResponseBool')
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug "API called: StickersApi#add_sticker_to_set_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
166
+ end
167
+ return data, status_code, headers
168
+ end
169
+
170
+ #
171
+ #
172
+ # @param token bot&#39;s token to authorize the request
173
+ # @param user_id
174
+ # @param name
175
+ # @param title
176
+ # @param png_sticker
177
+ # @param emojis
178
+ # @param [Hash] opts the optional parameters
179
+ # @option opts [BOOLEAN] :is_masks
180
+ # @option opts [String] :mask_position Serialized to JSON MaskPosition
181
+ # @return [File]
182
+ def create_new_sticker_set(token, user_id, name, title, png_sticker, emojis, opts = {})
183
+ data, _status_code, _headers = create_new_sticker_set_with_http_info(token, user_id, name, title, png_sticker, emojis, opts)
184
+ return data
185
+ end
186
+
187
+ #
188
+ #
189
+ # @param token bot&#39;s token to authorize the request
190
+ # @param user_id
191
+ # @param name
192
+ # @param title
193
+ # @param png_sticker
194
+ # @param emojis
195
+ # @param [Hash] opts the optional parameters
196
+ # @option opts [BOOLEAN] :is_masks
197
+ # @option opts [String] :mask_position Serialized to JSON MaskPosition
198
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
199
+ def create_new_sticker_set_with_http_info(token, user_id, name, title, png_sticker, emojis, opts = {})
200
+ if @api_client.config.debugging
201
+ @api_client.config.logger.debug "Calling API: StickersApi.create_new_sticker_set ..."
202
+ end
203
+ # verify the required parameter 'token' is set
204
+ if @api_client.config.client_side_validation && token.nil?
205
+ fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.create_new_sticker_set"
206
+ end
207
+ # verify the required parameter 'user_id' is set
208
+ if @api_client.config.client_side_validation && user_id.nil?
209
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling StickersApi.create_new_sticker_set"
210
+ end
211
+ # verify the required parameter 'name' is set
212
+ if @api_client.config.client_side_validation && name.nil?
213
+ fail ArgumentError, "Missing the required parameter 'name' when calling StickersApi.create_new_sticker_set"
214
+ end
215
+ # verify the required parameter 'title' is set
216
+ if @api_client.config.client_side_validation && title.nil?
217
+ fail ArgumentError, "Missing the required parameter 'title' when calling StickersApi.create_new_sticker_set"
218
+ end
219
+ # verify the required parameter 'png_sticker' is set
220
+ if @api_client.config.client_side_validation && png_sticker.nil?
221
+ fail ArgumentError, "Missing the required parameter 'png_sticker' when calling StickersApi.create_new_sticker_set"
222
+ end
223
+ # verify the required parameter 'emojis' is set
224
+ if @api_client.config.client_side_validation && emojis.nil?
225
+ fail ArgumentError, "Missing the required parameter 'emojis' when calling StickersApi.create_new_sticker_set"
226
+ end
227
+ # resource path
228
+ local_var_path = "/bot{token}/createNewStickerSet".sub('{' + 'token' + '}', token.to_s)
229
+
230
+ # query parameters
231
+ query_params = {}
232
+
233
+ # header parameters
234
+ header_params = {}
235
+ # HTTP header 'Accept' (if needed)
236
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
237
+ # HTTP header 'Content-Type'
238
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
239
+
240
+ # form parameters
241
+ form_params = {}
242
+ form_params["user_id"] = user_id
243
+ form_params["name"] = name
244
+ form_params["title"] = title
245
+ form_params["png_sticker"] = png_sticker
246
+ form_params["emojis"] = emojis
247
+ form_params["is_masks"] = opts[:'is_masks'] if !opts[:'is_masks'].nil?
248
+ form_params["mask_position"] = opts[:'mask_position'] if !opts[:'mask_position'].nil?
249
+
250
+ # http body (model)
251
+ post_body = nil
252
+ auth_names = []
253
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
254
+ :header_params => header_params,
255
+ :query_params => query_params,
256
+ :form_params => form_params,
257
+ :body => post_body,
258
+ :auth_names => auth_names,
259
+ :return_type => 'File')
260
+ if @api_client.config.debugging
261
+ @api_client.config.logger.debug "API called: StickersApi#create_new_sticker_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
262
+ end
263
+ return data, status_code, headers
264
+ end
265
+
266
+ #
267
+ #
268
+ # @param token bot&#39;s token to authorize the request
269
+ # @param body
270
+ # @param [Hash] opts the optional parameters
271
+ # @return [File]
272
+ def create_new_sticker_set_link(token, body, opts = {})
273
+ data, _status_code, _headers = create_new_sticker_set_link_with_http_info(token, body, opts)
274
+ return data
275
+ end
276
+
277
+ #
278
+ #
279
+ # @param token bot&#39;s token to authorize the request
280
+ # @param body
281
+ # @param [Hash] opts the optional parameters
282
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
283
+ def create_new_sticker_set_link_with_http_info(token, body, opts = {})
284
+ if @api_client.config.debugging
285
+ @api_client.config.logger.debug "Calling API: StickersApi.create_new_sticker_set_link ..."
286
+ end
287
+ # verify the required parameter 'token' is set
288
+ if @api_client.config.client_side_validation && token.nil?
289
+ fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.create_new_sticker_set_link"
290
+ end
291
+ # verify the required parameter 'body' is set
292
+ if @api_client.config.client_side_validation && body.nil?
293
+ fail ArgumentError, "Missing the required parameter 'body' when calling StickersApi.create_new_sticker_set_link"
294
+ end
295
+ # resource path
296
+ local_var_path = "/bot{token}/createNewStickerSet#link".sub('{' + 'token' + '}', token.to_s)
297
+
298
+ # query parameters
299
+ query_params = {}
300
+
301
+ # header parameters
302
+ header_params = {}
303
+ # HTTP header 'Accept' (if needed)
304
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
305
+ # HTTP header 'Content-Type'
306
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
307
+
308
+ # form parameters
309
+ form_params = {}
310
+
311
+ # http body (model)
312
+ post_body = @api_client.object_to_http_body(body)
313
+ auth_names = []
314
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
315
+ :header_params => header_params,
316
+ :query_params => query_params,
317
+ :form_params => form_params,
318
+ :body => post_body,
319
+ :auth_names => auth_names,
320
+ :return_type => 'File')
321
+ if @api_client.config.debugging
322
+ @api_client.config.logger.debug "API called: StickersApi#create_new_sticker_set_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
323
+ end
324
+ return data, status_code, headers
325
+ end
326
+
327
+ #
328
+ #
329
+ # @param token bot&#39;s token to authorize the request
330
+ # @param sticker
331
+ # @param [Hash] opts the optional parameters
332
+ # @return [ResponseBool]
333
+ def delete_sticker_from_set(token, sticker, opts = {})
334
+ data, _status_code, _headers = delete_sticker_from_set_with_http_info(token, sticker, opts)
335
+ return data
336
+ end
337
+
338
+ #
339
+ #
340
+ # @param token bot&#39;s token to authorize the request
341
+ # @param sticker
342
+ # @param [Hash] opts the optional parameters
343
+ # @return [Array<(ResponseBool, Fixnum, Hash)>] ResponseBool data, response status code and response headers
344
+ def delete_sticker_from_set_with_http_info(token, sticker, opts = {})
345
+ if @api_client.config.debugging
346
+ @api_client.config.logger.debug "Calling API: StickersApi.delete_sticker_from_set ..."
347
+ end
348
+ # verify the required parameter 'token' is set
349
+ if @api_client.config.client_side_validation && token.nil?
350
+ fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.delete_sticker_from_set"
351
+ end
352
+ # verify the required parameter 'sticker' is set
353
+ if @api_client.config.client_side_validation && sticker.nil?
354
+ fail ArgumentError, "Missing the required parameter 'sticker' when calling StickersApi.delete_sticker_from_set"
355
+ end
356
+ # resource path
357
+ local_var_path = "/bot{token}/deleteStickerFromSet".sub('{' + 'token' + '}', token.to_s)
358
+
359
+ # query parameters
360
+ query_params = {}
361
+
362
+ # header parameters
363
+ header_params = {}
364
+ # HTTP header 'Accept' (if needed)
365
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
366
+ # HTTP header 'Content-Type'
367
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
368
+
369
+ # form parameters
370
+ form_params = {}
371
+ form_params["sticker"] = sticker
372
+
373
+ # http body (model)
374
+ post_body = nil
375
+ auth_names = []
376
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
377
+ :header_params => header_params,
378
+ :query_params => query_params,
379
+ :form_params => form_params,
380
+ :body => post_body,
381
+ :auth_names => auth_names,
382
+ :return_type => 'ResponseBool')
383
+ if @api_client.config.debugging
384
+ @api_client.config.logger.debug "API called: StickersApi#delete_sticker_from_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
385
+ end
386
+ return data, status_code, headers
387
+ end
388
+
389
+ #
390
+ #
391
+ # @param token bot&#39;s token to authorize the request
392
+ # @param name
393
+ # @param [Hash] opts the optional parameters
394
+ # @return [InlineResponse2009]
395
+ def get_sticker_set(token, name, opts = {})
396
+ data, _status_code, _headers = get_sticker_set_with_http_info(token, name, opts)
397
+ return data
398
+ end
399
+
400
+ #
401
+ #
402
+ # @param token bot&#39;s token to authorize the request
403
+ # @param name
404
+ # @param [Hash] opts the optional parameters
405
+ # @return [Array<(InlineResponse2009, Fixnum, Hash)>] InlineResponse2009 data, response status code and response headers
406
+ def get_sticker_set_with_http_info(token, name, opts = {})
407
+ if @api_client.config.debugging
408
+ @api_client.config.logger.debug "Calling API: StickersApi.get_sticker_set ..."
409
+ end
410
+ # verify the required parameter 'token' is set
411
+ if @api_client.config.client_side_validation && token.nil?
412
+ fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.get_sticker_set"
413
+ end
414
+ # verify the required parameter 'name' is set
415
+ if @api_client.config.client_side_validation && name.nil?
416
+ fail ArgumentError, "Missing the required parameter 'name' when calling StickersApi.get_sticker_set"
417
+ end
418
+ # resource path
419
+ local_var_path = "/bot{token}/getStickerSet".sub('{' + 'token' + '}', token.to_s)
420
+
421
+ # query parameters
422
+ query_params = {}
423
+ query_params[:'name'] = name
424
+
425
+ # header parameters
426
+ header_params = {}
427
+ # HTTP header 'Accept' (if needed)
428
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
429
+ # HTTP header 'Content-Type'
430
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
431
+
432
+ # form parameters
433
+ form_params = {}
434
+
435
+ # http body (model)
436
+ post_body = nil
437
+ auth_names = []
438
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
439
+ :header_params => header_params,
440
+ :query_params => query_params,
441
+ :form_params => form_params,
442
+ :body => post_body,
443
+ :auth_names => auth_names,
444
+ :return_type => 'InlineResponse2009')
445
+ if @api_client.config.debugging
446
+ @api_client.config.logger.debug "API called: StickersApi#get_sticker_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
447
+ end
448
+ return data, status_code, headers
449
+ end
450
+
451
+ #
452
+ #
453
+ # @param token bot&#39;s token to authorize the request
454
+ # @param sticker
455
+ # @param position
456
+ # @param [Hash] opts the optional parameters
457
+ # @return [ResponseBool]
458
+ def set_sticker_position_in_set(token, sticker, position, opts = {})
459
+ data, _status_code, _headers = set_sticker_position_in_set_with_http_info(token, sticker, position, opts)
460
+ return data
461
+ end
462
+
463
+ #
464
+ #
465
+ # @param token bot&#39;s token to authorize the request
466
+ # @param sticker
467
+ # @param position
468
+ # @param [Hash] opts the optional parameters
469
+ # @return [Array<(ResponseBool, Fixnum, Hash)>] ResponseBool data, response status code and response headers
470
+ def set_sticker_position_in_set_with_http_info(token, sticker, position, opts = {})
471
+ if @api_client.config.debugging
472
+ @api_client.config.logger.debug "Calling API: StickersApi.set_sticker_position_in_set ..."
473
+ end
474
+ # verify the required parameter 'token' is set
475
+ if @api_client.config.client_side_validation && token.nil?
476
+ fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.set_sticker_position_in_set"
477
+ end
478
+ # verify the required parameter 'sticker' is set
479
+ if @api_client.config.client_side_validation && sticker.nil?
480
+ fail ArgumentError, "Missing the required parameter 'sticker' when calling StickersApi.set_sticker_position_in_set"
481
+ end
482
+ # verify the required parameter 'position' is set
483
+ if @api_client.config.client_side_validation && position.nil?
484
+ fail ArgumentError, "Missing the required parameter 'position' when calling StickersApi.set_sticker_position_in_set"
485
+ end
486
+ # resource path
487
+ local_var_path = "/bot{token}/setStickerPositionInSet".sub('{' + 'token' + '}', token.to_s)
488
+
489
+ # query parameters
490
+ query_params = {}
491
+
492
+ # header parameters
493
+ header_params = {}
494
+ # HTTP header 'Accept' (if needed)
495
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
496
+ # HTTP header 'Content-Type'
497
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
498
+
499
+ # form parameters
500
+ form_params = {}
501
+ form_params["sticker"] = sticker
502
+ form_params["position"] = position
503
+
504
+ # http body (model)
505
+ post_body = nil
506
+ auth_names = []
507
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
508
+ :header_params => header_params,
509
+ :query_params => query_params,
510
+ :form_params => form_params,
511
+ :body => post_body,
512
+ :auth_names => auth_names,
513
+ :return_type => 'ResponseBool')
514
+ if @api_client.config.debugging
515
+ @api_client.config.logger.debug "API called: StickersApi#set_sticker_position_in_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
516
+ end
517
+ return data, status_code, headers
518
+ end
519
+
520
+ #
521
+ #
522
+ # @param token bot&#39;s token to authorize the request
523
+ # @param user_id
524
+ # @param png_sticker
525
+ # @param [Hash] opts the optional parameters
526
+ # @return [File]
527
+ def upload_sticker_file(token, user_id, png_sticker, opts = {})
528
+ data, _status_code, _headers = upload_sticker_file_with_http_info(token, user_id, png_sticker, opts)
529
+ return data
530
+ end
531
+
532
+ #
533
+ #
534
+ # @param token bot&#39;s token to authorize the request
535
+ # @param user_id
536
+ # @param png_sticker
537
+ # @param [Hash] opts the optional parameters
538
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
539
+ def upload_sticker_file_with_http_info(token, user_id, png_sticker, opts = {})
540
+ if @api_client.config.debugging
541
+ @api_client.config.logger.debug "Calling API: StickersApi.upload_sticker_file ..."
542
+ end
543
+ # verify the required parameter 'token' is set
544
+ if @api_client.config.client_side_validation && token.nil?
545
+ fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.upload_sticker_file"
546
+ end
547
+ # verify the required parameter 'user_id' is set
548
+ if @api_client.config.client_side_validation && user_id.nil?
549
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling StickersApi.upload_sticker_file"
550
+ end
551
+ # verify the required parameter 'png_sticker' is set
552
+ if @api_client.config.client_side_validation && png_sticker.nil?
553
+ fail ArgumentError, "Missing the required parameter 'png_sticker' when calling StickersApi.upload_sticker_file"
554
+ end
555
+ # resource path
556
+ local_var_path = "/bot{token}/uploadStickerFile".sub('{' + 'token' + '}', token.to_s)
557
+
558
+ # query parameters
559
+ query_params = {}
560
+
561
+ # header parameters
562
+ header_params = {}
563
+ # HTTP header 'Accept' (if needed)
564
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
565
+ # HTTP header 'Content-Type'
566
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
567
+
568
+ # form parameters
569
+ form_params = {}
570
+ form_params["user_id"] = user_id
571
+ form_params["png_sticker"] = png_sticker
572
+
573
+ # http body (model)
574
+ post_body = nil
575
+ auth_names = []
576
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
577
+ :header_params => header_params,
578
+ :query_params => query_params,
579
+ :form_params => form_params,
580
+ :body => post_body,
581
+ :auth_names => auth_names,
582
+ :return_type => 'File')
583
+ if @api_client.config.debugging
584
+ @api_client.config.logger.debug "API called: StickersApi#upload_sticker_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
585
+ end
586
+ return data, status_code, headers
587
+ end
588
+
589
+ #
590
+ #
591
+ # @param token bot&#39;s token to authorize the request
592
+ # @param user_id
593
+ # @param png_sticker
594
+ # @param [Hash] opts the optional parameters
595
+ # @return [File]
596
+ def upload_sticker_file_link(token, user_id, png_sticker, opts = {})
597
+ data, _status_code, _headers = upload_sticker_file_link_with_http_info(token, user_id, png_sticker, opts)
598
+ return data
599
+ end
600
+
601
+ #
602
+ #
603
+ # @param token bot&#39;s token to authorize the request
604
+ # @param user_id
605
+ # @param png_sticker
606
+ # @param [Hash] opts the optional parameters
607
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
608
+ def upload_sticker_file_link_with_http_info(token, user_id, png_sticker, opts = {})
609
+ if @api_client.config.debugging
610
+ @api_client.config.logger.debug "Calling API: StickersApi.upload_sticker_file_link ..."
611
+ end
612
+ # verify the required parameter 'token' is set
613
+ if @api_client.config.client_side_validation && token.nil?
614
+ fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.upload_sticker_file_link"
615
+ end
616
+ # verify the required parameter 'user_id' is set
617
+ if @api_client.config.client_side_validation && user_id.nil?
618
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling StickersApi.upload_sticker_file_link"
619
+ end
620
+ # verify the required parameter 'png_sticker' is set
621
+ if @api_client.config.client_side_validation && png_sticker.nil?
622
+ fail ArgumentError, "Missing the required parameter 'png_sticker' when calling StickersApi.upload_sticker_file_link"
623
+ end
624
+ # resource path
625
+ local_var_path = "/bot{token}/uploadStickerFile#link".sub('{' + 'token' + '}', token.to_s)
626
+
627
+ # query parameters
628
+ query_params = {}
629
+
630
+ # header parameters
631
+ header_params = {}
632
+ # HTTP header 'Accept' (if needed)
633
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
634
+ # HTTP header 'Content-Type'
635
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
636
+
637
+ # form parameters
638
+ form_params = {}
639
+ form_params["user_id"] = user_id
640
+ form_params["png_sticker"] = png_sticker
641
+
642
+ # http body (model)
643
+ post_body = nil
644
+ auth_names = []
645
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
646
+ :header_params => header_params,
647
+ :query_params => query_params,
648
+ :form_params => form_params,
649
+ :body => post_body,
650
+ :auth_names => auth_names,
651
+ :return_type => 'File')
652
+ if @api_client.config.debugging
653
+ @api_client.config.logger.debug "API called: StickersApi#upload_sticker_file_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
654
+ end
655
+ return data, status_code, headers
656
+ end
657
+ end
658
+ end