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,207 @@
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 'date'
14
+
15
+ module Teleswagger
16
+
17
+ class InputLocationMessageContent
18
+ attr_accessor :latitude
19
+
20
+ attr_accessor :longitude
21
+
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'latitude' => :'latitude',
27
+ :'longitude' => :'longitude'
28
+ }
29
+ end
30
+
31
+ # Attribute type mapping.
32
+ def self.swagger_types
33
+ {
34
+ :'latitude' => :'Float',
35
+ :'longitude' => :'Float'
36
+ }
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ return unless attributes.is_a?(Hash)
43
+
44
+ # convert string to symbol for hash key
45
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
46
+
47
+ if attributes.has_key?(:'latitude')
48
+ self.latitude = attributes[:'latitude']
49
+ end
50
+
51
+ if attributes.has_key?(:'longitude')
52
+ self.longitude = attributes[:'longitude']
53
+ end
54
+
55
+ end
56
+
57
+ # Show invalid properties with the reasons. Usually used together with valid?
58
+ # @return Array for valid properies with the reasons
59
+ def list_invalid_properties
60
+ invalid_properties = Array.new
61
+ if @latitude.nil?
62
+ invalid_properties.push("invalid value for 'latitude', latitude cannot be nil.")
63
+ end
64
+
65
+ if @longitude.nil?
66
+ invalid_properties.push("invalid value for 'longitude', longitude cannot be nil.")
67
+ end
68
+
69
+ return invalid_properties
70
+ end
71
+
72
+ # Check to see if the all the properties in the model are valid
73
+ # @return true if the model is valid
74
+ def valid?
75
+ return false if @latitude.nil?
76
+ return false if @longitude.nil?
77
+ return true
78
+ end
79
+
80
+ # Checks equality by comparing each attribute.
81
+ # @param [Object] Object to be compared
82
+ def ==(o)
83
+ return true if self.equal?(o)
84
+ self.class == o.class &&
85
+ latitude == o.latitude &&
86
+ longitude == o.longitude
87
+ end
88
+
89
+ # @see the `==` method
90
+ # @param [Object] Object to be compared
91
+ def eql?(o)
92
+ self == o
93
+ end
94
+
95
+ # Calculates hash code according to all attributes.
96
+ # @return [Fixnum] Hash code
97
+ def hash
98
+ [latitude, longitude].hash
99
+ end
100
+
101
+ # Builds the object from hash
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ # @return [Object] Returns the model itself
104
+ def build_from_hash(attributes)
105
+ return nil unless attributes.is_a?(Hash)
106
+ self.class.swagger_types.each_pair do |key, type|
107
+ if type =~ /\AArray<(.*)>/i
108
+ # check to ensure the input is an array given that the the attribute
109
+ # is documented as an array but the input is not
110
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
111
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
112
+ end
113
+ elsif !attributes[self.class.attribute_map[key]].nil?
114
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
115
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
116
+ end
117
+
118
+ self
119
+ end
120
+
121
+ # Deserializes the data based on type
122
+ # @param string type Data type
123
+ # @param string value Value to be deserialized
124
+ # @return [Object] Deserialized data
125
+ def _deserialize(type, value)
126
+ case type.to_sym
127
+ when :DateTime
128
+ DateTime.parse(value)
129
+ when :Date
130
+ Date.parse(value)
131
+ when :String
132
+ value.to_s
133
+ when :Integer
134
+ value.to_i
135
+ when :Float
136
+ value.to_f
137
+ when :BOOLEAN
138
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
139
+ true
140
+ else
141
+ false
142
+ end
143
+ when :Object
144
+ # generic object (usually a Hash), return directly
145
+ value
146
+ when /\AArray<(?<inner_type>.+)>\z/
147
+ inner_type = Regexp.last_match[:inner_type]
148
+ value.map { |v| _deserialize(inner_type, v) }
149
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
150
+ k_type = Regexp.last_match[:k_type]
151
+ v_type = Regexp.last_match[:v_type]
152
+ {}.tap do |hash|
153
+ value.each do |k, v|
154
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
155
+ end
156
+ end
157
+ else # model
158
+ temp_model = Teleswagger.const_get(type).new
159
+ temp_model.build_from_hash(value)
160
+ end
161
+ end
162
+
163
+ # Returns the string representation of the object
164
+ # @return [String] String presentation of the object
165
+ def to_s
166
+ to_hash.to_s
167
+ end
168
+
169
+ # to_body is an alias to to_hash (backward compatibility)
170
+ # @return [Hash] Returns the object in the form of hash
171
+ def to_body
172
+ to_hash
173
+ end
174
+
175
+ # Returns the object in the form of hash
176
+ # @return [Hash] Returns the object in the form of hash
177
+ def to_hash
178
+ hash = {}
179
+ self.class.attribute_map.each_pair do |attr, param|
180
+ value = self.send(attr)
181
+ next if value.nil?
182
+ hash[param] = _to_hash(value)
183
+ end
184
+ hash
185
+ end
186
+
187
+ # Outputs non-array value in the form of hash
188
+ # For object, use to_hash. Otherwise, just return the value
189
+ # @param [Object] value Any valid value
190
+ # @return [Hash] Returns the value in the form of hash
191
+ def _to_hash(value)
192
+ if value.is_a?(Array)
193
+ value.compact.map{ |v| _to_hash(v) }
194
+ elsif value.is_a?(Hash)
195
+ {}.tap do |hash|
196
+ value.each { |k, v| hash[k] = _to_hash(v) }
197
+ end
198
+ elsif value.respond_to? :to_hash
199
+ value.to_hash
200
+ else
201
+ value
202
+ end
203
+ end
204
+
205
+ end
206
+
207
+ end
@@ -0,0 +1,211 @@
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 'date'
14
+
15
+ module Teleswagger
16
+
17
+ class InputTextMessageContent
18
+ attr_accessor :message_text
19
+
20
+ attr_accessor :parse_mode
21
+
22
+ attr_accessor :disable_web_page_preview
23
+
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'message_text' => :'message_text',
29
+ :'parse_mode' => :'parse_mode',
30
+ :'disable_web_page_preview' => :'disable_web_page_preview'
31
+ }
32
+ end
33
+
34
+ # Attribute type mapping.
35
+ def self.swagger_types
36
+ {
37
+ :'message_text' => :'String',
38
+ :'parse_mode' => :'ParseMode',
39
+ :'disable_web_page_preview' => :'BOOLEAN'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ return unless attributes.is_a?(Hash)
47
+
48
+ # convert string to symbol for hash key
49
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
50
+
51
+ if attributes.has_key?(:'message_text')
52
+ self.message_text = attributes[:'message_text']
53
+ end
54
+
55
+ if attributes.has_key?(:'parse_mode')
56
+ self.parse_mode = attributes[:'parse_mode']
57
+ end
58
+
59
+ if attributes.has_key?(:'disable_web_page_preview')
60
+ self.disable_web_page_preview = attributes[:'disable_web_page_preview']
61
+ end
62
+
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properies with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = Array.new
69
+ if @message_text.nil?
70
+ invalid_properties.push("invalid value for 'message_text', message_text cannot be nil.")
71
+ end
72
+
73
+ return invalid_properties
74
+ end
75
+
76
+ # Check to see if the all the properties in the model are valid
77
+ # @return true if the model is valid
78
+ def valid?
79
+ return false if @message_text.nil?
80
+ return true
81
+ end
82
+
83
+ # Checks equality by comparing each attribute.
84
+ # @param [Object] Object to be compared
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ message_text == o.message_text &&
89
+ parse_mode == o.parse_mode &&
90
+ disable_web_page_preview == o.disable_web_page_preview
91
+ end
92
+
93
+ # @see the `==` method
94
+ # @param [Object] Object to be compared
95
+ def eql?(o)
96
+ self == o
97
+ end
98
+
99
+ # Calculates hash code according to all attributes.
100
+ # @return [Fixnum] Hash code
101
+ def hash
102
+ [message_text, parse_mode, disable_web_page_preview].hash
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def build_from_hash(attributes)
109
+ return nil unless attributes.is_a?(Hash)
110
+ self.class.swagger_types.each_pair do |key, type|
111
+ if type =~ /\AArray<(.*)>/i
112
+ # check to ensure the input is an array given that the the attribute
113
+ # is documented as an array but the input is not
114
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
115
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
116
+ end
117
+ elsif !attributes[self.class.attribute_map[key]].nil?
118
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
119
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
120
+ end
121
+
122
+ self
123
+ end
124
+
125
+ # Deserializes the data based on type
126
+ # @param string type Data type
127
+ # @param string value Value to be deserialized
128
+ # @return [Object] Deserialized data
129
+ def _deserialize(type, value)
130
+ case type.to_sym
131
+ when :DateTime
132
+ DateTime.parse(value)
133
+ when :Date
134
+ Date.parse(value)
135
+ when :String
136
+ value.to_s
137
+ when :Integer
138
+ value.to_i
139
+ when :Float
140
+ value.to_f
141
+ when :BOOLEAN
142
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
143
+ true
144
+ else
145
+ false
146
+ end
147
+ when :Object
148
+ # generic object (usually a Hash), return directly
149
+ value
150
+ when /\AArray<(?<inner_type>.+)>\z/
151
+ inner_type = Regexp.last_match[:inner_type]
152
+ value.map { |v| _deserialize(inner_type, v) }
153
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
154
+ k_type = Regexp.last_match[:k_type]
155
+ v_type = Regexp.last_match[:v_type]
156
+ {}.tap do |hash|
157
+ value.each do |k, v|
158
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
159
+ end
160
+ end
161
+ else # model
162
+ temp_model = Teleswagger.const_get(type).new
163
+ temp_model.build_from_hash(value)
164
+ end
165
+ end
166
+
167
+ # Returns the string representation of the object
168
+ # @return [String] String presentation of the object
169
+ def to_s
170
+ to_hash.to_s
171
+ end
172
+
173
+ # to_body is an alias to to_hash (backward compatibility)
174
+ # @return [Hash] Returns the object in the form of hash
175
+ def to_body
176
+ to_hash
177
+ end
178
+
179
+ # Returns the object in the form of hash
180
+ # @return [Hash] Returns the object in the form of hash
181
+ def to_hash
182
+ hash = {}
183
+ self.class.attribute_map.each_pair do |attr, param|
184
+ value = self.send(attr)
185
+ next if value.nil?
186
+ hash[param] = _to_hash(value)
187
+ end
188
+ hash
189
+ end
190
+
191
+ # Outputs non-array value in the form of hash
192
+ # For object, use to_hash. Otherwise, just return the value
193
+ # @param [Object] value Any valid value
194
+ # @return [Hash] Returns the value in the form of hash
195
+ def _to_hash(value)
196
+ if value.is_a?(Array)
197
+ value.compact.map{ |v| _to_hash(v) }
198
+ elsif value.is_a?(Hash)
199
+ {}.tap do |hash|
200
+ value.each { |k, v| hash[k] = _to_hash(v) }
201
+ end
202
+ elsif value.respond_to? :to_hash
203
+ value.to_hash
204
+ else
205
+ value
206
+ end
207
+ end
208
+
209
+ end
210
+
211
+ end
@@ -0,0 +1,244 @@
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 'date'
14
+
15
+ module Teleswagger
16
+
17
+ class InputVenueMessageContent
18
+ attr_accessor :latitude
19
+
20
+ attr_accessor :longitude
21
+
22
+ attr_accessor :title
23
+
24
+ attr_accessor :address
25
+
26
+ attr_accessor :foursquare_id
27
+
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'latitude' => :'latitude',
33
+ :'longitude' => :'longitude',
34
+ :'title' => :'title',
35
+ :'address' => :'address',
36
+ :'foursquare_id' => :'foursquare_id'
37
+ }
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.swagger_types
42
+ {
43
+ :'latitude' => :'Float',
44
+ :'longitude' => :'Float',
45
+ :'title' => :'String',
46
+ :'address' => :'String',
47
+ :'foursquare_id' => :'String'
48
+ }
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ return unless attributes.is_a?(Hash)
55
+
56
+ # convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
58
+
59
+ if attributes.has_key?(:'latitude')
60
+ self.latitude = attributes[:'latitude']
61
+ end
62
+
63
+ if attributes.has_key?(:'longitude')
64
+ self.longitude = attributes[:'longitude']
65
+ end
66
+
67
+ if attributes.has_key?(:'title')
68
+ self.title = attributes[:'title']
69
+ end
70
+
71
+ if attributes.has_key?(:'address')
72
+ self.address = attributes[:'address']
73
+ end
74
+
75
+ if attributes.has_key?(:'foursquare_id')
76
+ self.foursquare_id = attributes[:'foursquare_id']
77
+ end
78
+
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properies with the reasons
83
+ def list_invalid_properties
84
+ invalid_properties = Array.new
85
+ if @latitude.nil?
86
+ invalid_properties.push("invalid value for 'latitude', latitude cannot be nil.")
87
+ end
88
+
89
+ if @longitude.nil?
90
+ invalid_properties.push("invalid value for 'longitude', longitude cannot be nil.")
91
+ end
92
+
93
+ if @title.nil?
94
+ invalid_properties.push("invalid value for 'title', title cannot be nil.")
95
+ end
96
+
97
+ if @address.nil?
98
+ invalid_properties.push("invalid value for 'address', address cannot be nil.")
99
+ end
100
+
101
+ return invalid_properties
102
+ end
103
+
104
+ # Check to see if the all the properties in the model are valid
105
+ # @return true if the model is valid
106
+ def valid?
107
+ return false if @latitude.nil?
108
+ return false if @longitude.nil?
109
+ return false if @title.nil?
110
+ return false if @address.nil?
111
+ return true
112
+ end
113
+
114
+ # Checks equality by comparing each attribute.
115
+ # @param [Object] Object to be compared
116
+ def ==(o)
117
+ return true if self.equal?(o)
118
+ self.class == o.class &&
119
+ latitude == o.latitude &&
120
+ longitude == o.longitude &&
121
+ title == o.title &&
122
+ address == o.address &&
123
+ foursquare_id == o.foursquare_id
124
+ end
125
+
126
+ # @see the `==` method
127
+ # @param [Object] Object to be compared
128
+ def eql?(o)
129
+ self == o
130
+ end
131
+
132
+ # Calculates hash code according to all attributes.
133
+ # @return [Fixnum] Hash code
134
+ def hash
135
+ [latitude, longitude, title, address, foursquare_id].hash
136
+ end
137
+
138
+ # Builds the object from hash
139
+ # @param [Hash] attributes Model attributes in the form of hash
140
+ # @return [Object] Returns the model itself
141
+ def build_from_hash(attributes)
142
+ return nil unless attributes.is_a?(Hash)
143
+ self.class.swagger_types.each_pair do |key, type|
144
+ if type =~ /\AArray<(.*)>/i
145
+ # check to ensure the input is an array given that the the attribute
146
+ # is documented as an array but the input is not
147
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
148
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
149
+ end
150
+ elsif !attributes[self.class.attribute_map[key]].nil?
151
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
152
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
153
+ end
154
+
155
+ self
156
+ end
157
+
158
+ # Deserializes the data based on type
159
+ # @param string type Data type
160
+ # @param string value Value to be deserialized
161
+ # @return [Object] Deserialized data
162
+ def _deserialize(type, value)
163
+ case type.to_sym
164
+ when :DateTime
165
+ DateTime.parse(value)
166
+ when :Date
167
+ Date.parse(value)
168
+ when :String
169
+ value.to_s
170
+ when :Integer
171
+ value.to_i
172
+ when :Float
173
+ value.to_f
174
+ when :BOOLEAN
175
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
176
+ true
177
+ else
178
+ false
179
+ end
180
+ when :Object
181
+ # generic object (usually a Hash), return directly
182
+ value
183
+ when /\AArray<(?<inner_type>.+)>\z/
184
+ inner_type = Regexp.last_match[:inner_type]
185
+ value.map { |v| _deserialize(inner_type, v) }
186
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
187
+ k_type = Regexp.last_match[:k_type]
188
+ v_type = Regexp.last_match[:v_type]
189
+ {}.tap do |hash|
190
+ value.each do |k, v|
191
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
192
+ end
193
+ end
194
+ else # model
195
+ temp_model = Teleswagger.const_get(type).new
196
+ temp_model.build_from_hash(value)
197
+ end
198
+ end
199
+
200
+ # Returns the string representation of the object
201
+ # @return [String] String presentation of the object
202
+ def to_s
203
+ to_hash.to_s
204
+ end
205
+
206
+ # to_body is an alias to to_hash (backward compatibility)
207
+ # @return [Hash] Returns the object in the form of hash
208
+ def to_body
209
+ to_hash
210
+ end
211
+
212
+ # Returns the object in the form of hash
213
+ # @return [Hash] Returns the object in the form of hash
214
+ def to_hash
215
+ hash = {}
216
+ self.class.attribute_map.each_pair do |attr, param|
217
+ value = self.send(attr)
218
+ next if value.nil?
219
+ hash[param] = _to_hash(value)
220
+ end
221
+ hash
222
+ end
223
+
224
+ # Outputs non-array value in the form of hash
225
+ # For object, use to_hash. Otherwise, just return the value
226
+ # @param [Object] value Any valid value
227
+ # @return [Hash] Returns the value in the form of hash
228
+ def _to_hash(value)
229
+ if value.is_a?(Array)
230
+ value.compact.map{ |v| _to_hash(v) }
231
+ elsif value.is_a?(Hash)
232
+ {}.tap do |hash|
233
+ value.each { |k, v| hash[k] = _to_hash(v) }
234
+ end
235
+ elsif value.respond_to? :to_hash
236
+ value.to_hash
237
+ else
238
+ value
239
+ end
240
+ end
241
+
242
+ end
243
+
244
+ end