teleswagger 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +5 -5
  3. data/LICENSE +201 -0
  4. data/README.md +88 -74
  5. data/docs/AnswerCallbackQueryBody.md +12 -0
  6. data/docs/AttachmentsApi.md +166 -3
  7. data/docs/CallbacksApi.md +6 -18
  8. data/docs/Chat.md +2 -0
  9. data/docs/ChatsApi.md +112 -9
  10. data/docs/EditMessageCaptionBody.md +1 -0
  11. data/docs/EditMessageLiveLocationBody.md +13 -0
  12. data/docs/GamesApi.md +5 -5
  13. data/docs/GetUpdatesBody.md +11 -0
  14. data/docs/InlineApi.md +1 -1
  15. data/docs/InlineQueryResultAudio.md +1 -0
  16. data/docs/InlineQueryResultCachedAudio.md +1 -0
  17. data/docs/InlineQueryResultCachedDocument.md +1 -0
  18. data/docs/InlineQueryResultCachedGif.md +1 -0
  19. data/docs/InlineQueryResultCachedMpeg4Gif.md +1 -0
  20. data/docs/InlineQueryResultCachedPhoto.md +1 -0
  21. data/docs/InlineQueryResultCachedVideo.md +1 -0
  22. data/docs/InlineQueryResultCachedVoice.md +1 -0
  23. data/docs/InlineQueryResultDocument.md +1 -0
  24. data/docs/InlineQueryResultGif.md +1 -0
  25. data/docs/InlineQueryResultLocation.md +1 -0
  26. data/docs/InlineQueryResultMpeg4Gif.md +1 -0
  27. data/docs/InlineQueryResultPhoto.md +1 -0
  28. data/docs/InlineQueryResultVideo.md +1 -0
  29. data/docs/InlineQueryResultVoice.md +1 -0
  30. data/docs/InlineResponse200.md +1 -1
  31. data/docs/InlineResponse2001.md +1 -1
  32. data/docs/InlineResponse2002.md +1 -1
  33. data/docs/InlineResponse2003.md +1 -1
  34. data/docs/InlineResponse2004.md +1 -1
  35. data/docs/InlineResponse2005.md +1 -1
  36. data/docs/InlineResponse2006.md +1 -1
  37. data/docs/InlineResponse2007.md +1 -1
  38. data/docs/InlineResponse2008.md +1 -1
  39. data/docs/InlineResponse2009.md +1 -1
  40. data/docs/InputLocationMessageContent.md +1 -0
  41. data/docs/InputMediaPhoto.md +11 -0
  42. data/docs/InputMediaVideo.md +15 -0
  43. data/docs/Message.md +3 -0
  44. data/docs/MessagesApi.md +7 -7
  45. data/docs/PaymentsApi.md +1 -1
  46. data/docs/ReplyKeyboardMarkup.md +1 -1
  47. data/docs/SendInvoiceBody.md +1 -0
  48. data/docs/SendLocationBody.md +1 -0
  49. data/docs/SendMediaGroupLinkBody.md +11 -0
  50. data/docs/StickersApi.md +3 -3
  51. data/docs/StopMessageLiveLocationBody.md +11 -0
  52. data/docs/UpdatesApi.md +4 -8
  53. data/docs/UsersApi.md +5 -5
  54. data/git_push.sh +67 -0
  55. data/lib/teleswagger.rb +20 -2
  56. data/lib/teleswagger/api/attachments_api.rb +367 -158
  57. data/lib/teleswagger/api/callbacks_api.rb +29 -47
  58. data/lib/teleswagger/api/chats_api.rb +316 -192
  59. data/lib/teleswagger/api/games_api.rb +46 -35
  60. data/lib/teleswagger/api/inline_api.rb +21 -8
  61. data/lib/teleswagger/api/messages_api.rb +84 -71
  62. data/lib/teleswagger/api/payments_api.rb +39 -26
  63. data/lib/teleswagger/api/stickers_api.rb +107 -116
  64. data/lib/teleswagger/api/updates_api.rb +50 -39
  65. data/lib/teleswagger/api/users_api.rb +36 -23
  66. data/lib/teleswagger/api_client.rb +45 -55
  67. data/lib/teleswagger/api_error.rb +18 -9
  68. data/lib/teleswagger/configuration.rb +13 -8
  69. data/lib/teleswagger/models/add_sticker_to_set_link_body.rb +16 -21
  70. data/lib/teleswagger/models/allowed_update.rb +15 -2
  71. data/lib/teleswagger/models/animation.rb +16 -9
  72. data/lib/teleswagger/models/answer_callback_query_body.rb +235 -0
  73. data/lib/teleswagger/models/answer_inline_query_body.rb +16 -13
  74. data/lib/teleswagger/models/answer_shipping_query_body.rb +16 -13
  75. data/lib/teleswagger/models/audio.rb +16 -5
  76. data/lib/teleswagger/models/callback_game.rb +16 -5
  77. data/lib/teleswagger/models/callback_query.rb +16 -5
  78. data/lib/teleswagger/models/chat.rb +38 -17
  79. data/lib/teleswagger/models/chat_member.rb +16 -13
  80. data/lib/teleswagger/models/chat_photo.rb +16 -5
  81. data/lib/teleswagger/models/chosen_inline_result.rb +16 -17
  82. data/lib/teleswagger/models/contact.rb +16 -5
  83. data/lib/teleswagger/models/create_new_sticker_set_link_body.rb +16 -25
  84. data/lib/teleswagger/models/document.rb +16 -5
  85. data/lib/teleswagger/models/edit_message_caption_body.rb +26 -6
  86. data/lib/teleswagger/models/edit_message_live_location_body.rb +246 -0
  87. data/lib/teleswagger/models/edit_message_reply_markup_body.rb +16 -5
  88. data/lib/teleswagger/models/edit_message_text_body.rb +16 -9
  89. data/lib/teleswagger/models/error.rb +16 -5
  90. data/lib/teleswagger/models/file.rb +16 -5
  91. data/lib/teleswagger/models/force_reply.rb +16 -5
  92. data/lib/teleswagger/models/game.rb +16 -17
  93. data/lib/teleswagger/models/game_high_score.rb +16 -5
  94. data/lib/teleswagger/models/get_updates_body.rb +228 -0
  95. data/lib/teleswagger/models/inline_keyboard_button.rb +16 -5
  96. data/lib/teleswagger/models/inline_keyboard_markup.rb +16 -5
  97. data/lib/teleswagger/models/inline_query.rb +16 -5
  98. data/lib/teleswagger/models/inline_query_result_article.rb +16 -21
  99. data/lib/teleswagger/models/inline_query_result_audio.rb +26 -22
  100. data/lib/teleswagger/models/inline_query_result_cached_audio.rb +26 -18
  101. data/lib/teleswagger/models/inline_query_result_cached_document.rb +26 -18
  102. data/lib/teleswagger/models/inline_query_result_cached_gif.rb +26 -18
  103. data/lib/teleswagger/models/inline_query_result_cached_mpeg4_gif.rb +26 -18
  104. data/lib/teleswagger/models/inline_query_result_cached_photo.rb +26 -18
  105. data/lib/teleswagger/models/inline_query_result_cached_sticker.rb +16 -17
  106. data/lib/teleswagger/models/inline_query_result_cached_video.rb +26 -18
  107. data/lib/teleswagger/models/inline_query_result_cached_voice.rb +26 -18
  108. data/lib/teleswagger/models/inline_query_result_contact.rb +16 -21
  109. data/lib/teleswagger/models/inline_query_result_document.rb +26 -26
  110. data/lib/teleswagger/models/inline_query_result_game.rb +16 -17
  111. data/lib/teleswagger/models/inline_query_result_gif.rb +26 -22
  112. data/lib/teleswagger/models/inline_query_result_location.rb +50 -24
  113. data/lib/teleswagger/models/inline_query_result_mpeg4_gif.rb +26 -22
  114. data/lib/teleswagger/models/inline_query_result_photo.rb +26 -22
  115. data/lib/teleswagger/models/inline_query_result_venue.rb +16 -29
  116. data/lib/teleswagger/models/inline_query_result_video.rb +26 -30
  117. data/lib/teleswagger/models/inline_query_result_voice.rb +26 -22
  118. data/lib/teleswagger/models/inline_response_200.rb +17 -6
  119. data/lib/teleswagger/models/inline_response_200_1.rb +17 -6
  120. data/lib/teleswagger/models/inline_response_200_2.rb +20 -7
  121. data/lib/teleswagger/models/inline_response_200_3.rb +17 -6
  122. data/lib/teleswagger/models/inline_response_200_4.rb +18 -9
  123. data/lib/teleswagger/models/inline_response_200_5.rb +17 -6
  124. data/lib/teleswagger/models/inline_response_200_6.rb +17 -6
  125. data/lib/teleswagger/models/inline_response_200_7.rb +17 -6
  126. data/lib/teleswagger/models/inline_response_200_8.rb +17 -6
  127. data/lib/teleswagger/models/inline_response_200_9.rb +17 -6
  128. data/lib/teleswagger/models/inline_type.rb +13 -2
  129. data/lib/teleswagger/models/input_contact_message_content.rb +16 -13
  130. data/lib/teleswagger/models/input_location_message_content.rb +51 -13
  131. data/lib/teleswagger/models/input_media_photo.rb +228 -0
  132. data/lib/teleswagger/models/input_media_video.rb +264 -0
  133. data/lib/teleswagger/models/input_text_message_content.rb +16 -9
  134. data/lib/teleswagger/models/input_venue_message_content.rb +16 -21
  135. data/lib/teleswagger/models/invoice.rb +16 -5
  136. data/lib/teleswagger/models/keyboard_button.rb +16 -5
  137. data/lib/teleswagger/models/labeled_price.rb +16 -5
  138. data/lib/teleswagger/models/location.rb +16 -5
  139. data/lib/teleswagger/models/mask_position.rb +16 -5
  140. data/lib/teleswagger/models/message.rb +49 -9
  141. data/lib/teleswagger/models/message_entity.rb +16 -5
  142. data/lib/teleswagger/models/order_info.rb +16 -5
  143. data/lib/teleswagger/models/parse_mode.rb +13 -2
  144. data/lib/teleswagger/models/photo_size.rb +16 -5
  145. data/lib/teleswagger/models/pre_checkout_query.rb +16 -5
  146. data/lib/teleswagger/models/promote_chat_member_body.rb +16 -13
  147. data/lib/teleswagger/models/reply_keyboard_markup.rb +17 -6
  148. data/lib/teleswagger/models/reply_keyboard_remove.rb +16 -5
  149. data/lib/teleswagger/models/response_bool.rb +16 -5
  150. data/lib/teleswagger/models/response_message.rb +16 -5
  151. data/lib/teleswagger/models/response_parameters.rb +16 -5
  152. data/lib/teleswagger/models/response_update.rb +16 -5
  153. data/lib/teleswagger/models/restrict_chat_member_body.rb +16 -13
  154. data/lib/teleswagger/models/send_audio_link_body.rb +16 -13
  155. data/lib/teleswagger/models/send_contact_body.rb +16 -17
  156. data/lib/teleswagger/models/send_document_link_body.rb +16 -13
  157. data/lib/teleswagger/models/send_game_body.rb +16 -13
  158. data/lib/teleswagger/models/send_invoice_body.rb +26 -38
  159. data/lib/teleswagger/models/send_location_body.rb +50 -16
  160. data/lib/teleswagger/models/send_media_group_link_body.rb +230 -0
  161. data/lib/teleswagger/models/send_message_body.rb +16 -13
  162. data/lib/teleswagger/models/send_photo_link_body.rb +16 -13
  163. data/lib/teleswagger/models/send_sticker_link_body.rb +16 -13
  164. data/lib/teleswagger/models/send_venue_body.rb +16 -25
  165. data/lib/teleswagger/models/send_video_link_body.rb +16 -13
  166. data/lib/teleswagger/models/send_video_note_link_body.rb +16 -13
  167. data/lib/teleswagger/models/send_voice_link_body.rb +16 -13
  168. data/lib/teleswagger/models/shipping_address.rb +16 -5
  169. data/lib/teleswagger/models/shipping_option.rb +16 -5
  170. data/lib/teleswagger/models/shipping_query.rb +16 -5
  171. data/lib/teleswagger/models/sticker.rb +16 -5
  172. data/lib/teleswagger/models/sticker_set.rb +16 -5
  173. data/lib/teleswagger/models/stop_message_live_location_body.rb +226 -0
  174. data/lib/teleswagger/models/successful_payment.rb +16 -5
  175. data/lib/teleswagger/models/update.rb +16 -5
  176. data/lib/teleswagger/models/user.rb +16 -5
  177. data/lib/teleswagger/models/user_profile_photos.rb +16 -5
  178. data/lib/teleswagger/models/venue.rb +16 -5
  179. data/lib/teleswagger/models/video.rb +16 -5
  180. data/lib/teleswagger/models/video_note.rb +16 -5
  181. data/lib/teleswagger/models/voice.rb +16 -5
  182. data/lib/teleswagger/models/webhook_info.rb +16 -17
  183. data/lib/teleswagger/version.rb +15 -4
  184. data/spec/models/answer_callback_query_body_spec.rb +77 -0
  185. data/spec/models/edit_message_live_location_body_spec.rb +83 -0
  186. data/spec/models/get_updates_body_spec.rb +71 -0
  187. data/spec/models/input_media_photo_spec.rb +71 -0
  188. data/spec/models/input_media_video_spec.rb +95 -0
  189. data/spec/models/send_media_group_link_body_spec.rb +71 -0
  190. data/spec/models/stop_message_live_location_body_spec.rb +71 -0
  191. data/swagger.yaml +428 -52
  192. data/teleswagger.gemspec +17 -8
  193. metadata +45 -14
@@ -3,10 +3,21 @@
3
3
 
4
4
  #This is a swagger defenition for [Telegram bot API](https://core.telegram.org/bots/api).
5
5
 
6
- OpenAPI spec version: 3.3
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.2.3
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
10
21
 
11
22
  =end
12
23
 
@@ -46,19 +57,13 @@ module Teleswagger
46
57
  @api_client.config.logger.debug "Calling API: PaymentsApi.answer_pre_checkout_query ..."
47
58
  end
48
59
  # 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
60
+ fail ArgumentError, "Missing the required parameter 'token' when calling PaymentsApi.answer_pre_checkout_query" if token.nil?
52
61
  # 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
62
+ fail ArgumentError, "Missing the required parameter 'pre_checkout_query_id' when calling PaymentsApi.answer_pre_checkout_query" if pre_checkout_query_id.nil?
56
63
  # 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
64
+ fail ArgumentError, "Missing the required parameter 'ok' when calling PaymentsApi.answer_pre_checkout_query" if ok.nil?
60
65
  # resource path
61
- local_var_path = "/bot{token}/answerPreCheckoutQuery".sub('{' + 'token' + '}', token.to_s)
66
+ local_var_path = "/bot{token}/answerPreCheckoutQuery".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
62
67
 
63
68
  # query parameters
64
69
  query_params = {}
@@ -68,10 +73,14 @@ module Teleswagger
68
73
 
69
74
  # header parameters
70
75
  header_params = {}
76
+
71
77
  # HTTP header 'Accept' (if needed)
72
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
78
+ local_header_accept = ['application/json']
79
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
80
+
73
81
  # HTTP header 'Content-Type'
74
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
82
+ local_header_content_type = ['application/json']
83
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
75
84
 
76
85
  # form parameters
77
86
  form_params = {}
@@ -114,21 +123,23 @@ module Teleswagger
114
123
  @api_client.config.logger.debug "Calling API: PaymentsApi.answer_shipping_query ..."
115
124
  end
116
125
  # 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
126
+ fail ArgumentError, "Missing the required parameter 'token' when calling PaymentsApi.answer_shipping_query" if token.nil?
120
127
  # resource path
121
- local_var_path = "/bot{token}/answerShippingQuery".sub('{' + 'token' + '}', token.to_s)
128
+ local_var_path = "/bot{token}/answerShippingQuery".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
122
129
 
123
130
  # query parameters
124
131
  query_params = {}
125
132
 
126
133
  # header parameters
127
134
  header_params = {}
135
+
128
136
  # HTTP header 'Accept' (if needed)
129
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
137
+ local_header_accept = ['application/json']
138
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
139
+
130
140
  # HTTP header 'Content-Type'
131
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
141
+ local_header_content_type = ['application/json']
142
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
132
143
 
133
144
  # form parameters
134
145
  form_params = {}
@@ -171,21 +182,23 @@ module Teleswagger
171
182
  @api_client.config.logger.debug "Calling API: PaymentsApi.send_invoice ..."
172
183
  end
173
184
  # 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
185
+ fail ArgumentError, "Missing the required parameter 'token' when calling PaymentsApi.send_invoice" if token.nil?
177
186
  # resource path
178
- local_var_path = "/bot{token}/sendInvoice".sub('{' + 'token' + '}', token.to_s)
187
+ local_var_path = "/bot{token}/sendInvoice".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
179
188
 
180
189
  # query parameters
181
190
  query_params = {}
182
191
 
183
192
  # header parameters
184
193
  header_params = {}
194
+
185
195
  # HTTP header 'Accept' (if needed)
186
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
196
+ local_header_accept = ['application/json']
197
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
198
+
187
199
  # HTTP header 'Content-Type'
188
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
200
+ local_header_content_type = ['application/json']
201
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
189
202
 
190
203
  # form parameters
191
204
  form_params = {}
@@ -3,10 +3,21 @@
3
3
 
4
4
  #This is a swagger defenition for [Telegram bot API](https://core.telegram.org/bots/api).
5
5
 
6
- OpenAPI spec version: 3.3
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.2.3
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
10
21
 
11
22
  =end
12
23
 
@@ -50,37 +61,31 @@ module Teleswagger
50
61
  @api_client.config.logger.debug "Calling API: StickersApi.add_sticker_to_set ..."
51
62
  end
52
63
  # 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
64
+ fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.add_sticker_to_set" if token.nil?
56
65
  # 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
66
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling StickersApi.add_sticker_to_set" if user_id.nil?
60
67
  # 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
68
+ fail ArgumentError, "Missing the required parameter 'name' when calling StickersApi.add_sticker_to_set" if name.nil?
64
69
  # 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
70
+ fail ArgumentError, "Missing the required parameter 'png_sticker' when calling StickersApi.add_sticker_to_set" if png_sticker.nil?
68
71
  # 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
+ fail ArgumentError, "Missing the required parameter 'emojis' when calling StickersApi.add_sticker_to_set" if emojis.nil?
72
73
  # resource path
73
- local_var_path = "/bot{token}/addStickerToSet".sub('{' + 'token' + '}', token.to_s)
74
+ local_var_path = "/bot{token}/addStickerToSet".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
74
75
 
75
76
  # query parameters
76
77
  query_params = {}
77
78
 
78
79
  # header parameters
79
80
  header_params = {}
81
+
80
82
  # HTTP header 'Accept' (if needed)
81
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
83
+ local_header_accept = ['application/json']
84
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
85
+
82
86
  # HTTP header 'Content-Type'
83
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
87
+ local_header_content_type = ['multipart/form-data']
88
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
84
89
 
85
90
  # form parameters
86
91
  form_params = {}
@@ -128,25 +133,25 @@ module Teleswagger
128
133
  @api_client.config.logger.debug "Calling API: StickersApi.add_sticker_to_set_link ..."
129
134
  end
130
135
  # 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
136
+ fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.add_sticker_to_set_link" if token.nil?
134
137
  # 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
+ fail ArgumentError, "Missing the required parameter 'body' when calling StickersApi.add_sticker_to_set_link" if body.nil?
138
139
  # resource path
139
- local_var_path = "/bot{token}/addStickerToSet#link".sub('{' + 'token' + '}', token.to_s)
140
+ local_var_path = "/bot{token}/addStickerToSet#link".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
140
141
 
141
142
  # query parameters
142
143
  query_params = {}
143
144
 
144
145
  # header parameters
145
146
  header_params = {}
147
+
146
148
  # HTTP header 'Accept' (if needed)
147
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
149
+ local_header_accept = ['application/json']
150
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
151
+
148
152
  # HTTP header 'Content-Type'
149
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
153
+ local_header_content_type = ['application/json']
154
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
150
155
 
151
156
  # form parameters
152
157
  form_params = {}
@@ -201,41 +206,33 @@ module Teleswagger
201
206
  @api_client.config.logger.debug "Calling API: StickersApi.create_new_sticker_set ..."
202
207
  end
203
208
  # 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
209
+ fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.create_new_sticker_set" if token.nil?
207
210
  # 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
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling StickersApi.create_new_sticker_set" if user_id.nil?
211
212
  # 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
213
+ fail ArgumentError, "Missing the required parameter 'name' when calling StickersApi.create_new_sticker_set" if name.nil?
215
214
  # 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
215
+ fail ArgumentError, "Missing the required parameter 'title' when calling StickersApi.create_new_sticker_set" if title.nil?
219
216
  # 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
217
+ fail ArgumentError, "Missing the required parameter 'png_sticker' when calling StickersApi.create_new_sticker_set" if png_sticker.nil?
223
218
  # 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
219
+ fail ArgumentError, "Missing the required parameter 'emojis' when calling StickersApi.create_new_sticker_set" if emojis.nil?
227
220
  # resource path
228
- local_var_path = "/bot{token}/createNewStickerSet".sub('{' + 'token' + '}', token.to_s)
221
+ local_var_path = "/bot{token}/createNewStickerSet".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
229
222
 
230
223
  # query parameters
231
224
  query_params = {}
232
225
 
233
226
  # header parameters
234
227
  header_params = {}
228
+
235
229
  # HTTP header 'Accept' (if needed)
236
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
230
+ local_header_accept = ['application/json']
231
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
232
+
237
233
  # HTTP header 'Content-Type'
238
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
234
+ local_header_content_type = ['multipart/form-data']
235
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
239
236
 
240
237
  # form parameters
241
238
  form_params = {}
@@ -285,25 +282,25 @@ module Teleswagger
285
282
  @api_client.config.logger.debug "Calling API: StickersApi.create_new_sticker_set_link ..."
286
283
  end
287
284
  # 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
285
+ fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.create_new_sticker_set_link" if token.nil?
291
286
  # 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
287
+ fail ArgumentError, "Missing the required parameter 'body' when calling StickersApi.create_new_sticker_set_link" if body.nil?
295
288
  # resource path
296
- local_var_path = "/bot{token}/createNewStickerSet#link".sub('{' + 'token' + '}', token.to_s)
289
+ local_var_path = "/bot{token}/createNewStickerSet#link".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
297
290
 
298
291
  # query parameters
299
292
  query_params = {}
300
293
 
301
294
  # header parameters
302
295
  header_params = {}
296
+
303
297
  # HTTP header 'Accept' (if needed)
304
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
298
+ local_header_accept = ['application/json']
299
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
300
+
305
301
  # HTTP header 'Content-Type'
306
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
302
+ local_header_content_type = ['application/json']
303
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
307
304
 
308
305
  # form parameters
309
306
  form_params = {}
@@ -346,25 +343,25 @@ module Teleswagger
346
343
  @api_client.config.logger.debug "Calling API: StickersApi.delete_sticker_from_set ..."
347
344
  end
348
345
  # 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
346
+ fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.delete_sticker_from_set" if token.nil?
352
347
  # 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
348
+ fail ArgumentError, "Missing the required parameter 'sticker' when calling StickersApi.delete_sticker_from_set" if sticker.nil?
356
349
  # resource path
357
- local_var_path = "/bot{token}/deleteStickerFromSet".sub('{' + 'token' + '}', token.to_s)
350
+ local_var_path = "/bot{token}/deleteStickerFromSet".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
358
351
 
359
352
  # query parameters
360
353
  query_params = {}
361
354
 
362
355
  # header parameters
363
356
  header_params = {}
357
+
364
358
  # HTTP header 'Accept' (if needed)
365
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
359
+ local_header_accept = ['application/json']
360
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
361
+
366
362
  # HTTP header 'Content-Type'
367
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
363
+ local_header_content_type = ['application/json']
364
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
368
365
 
369
366
  # form parameters
370
367
  form_params = {}
@@ -391,7 +388,7 @@ module Teleswagger
391
388
  # @param token bot's token to authorize the request
392
389
  # @param name
393
390
  # @param [Hash] opts the optional parameters
394
- # @return [InlineResponse2009]
391
+ # @return [InlineResponse2008]
395
392
  def get_sticker_set(token, name, opts = {})
396
393
  data, _status_code, _headers = get_sticker_set_with_http_info(token, name, opts)
397
394
  return data
@@ -402,21 +399,17 @@ module Teleswagger
402
399
  # @param token bot's token to authorize the request
403
400
  # @param name
404
401
  # @param [Hash] opts the optional parameters
405
- # @return [Array<(InlineResponse2009, Fixnum, Hash)>] InlineResponse2009 data, response status code and response headers
402
+ # @return [Array<(InlineResponse2008, Fixnum, Hash)>] InlineResponse2008 data, response status code and response headers
406
403
  def get_sticker_set_with_http_info(token, name, opts = {})
407
404
  if @api_client.config.debugging
408
405
  @api_client.config.logger.debug "Calling API: StickersApi.get_sticker_set ..."
409
406
  end
410
407
  # 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
408
+ fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.get_sticker_set" if token.nil?
414
409
  # 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
410
+ fail ArgumentError, "Missing the required parameter 'name' when calling StickersApi.get_sticker_set" if name.nil?
418
411
  # resource path
419
- local_var_path = "/bot{token}/getStickerSet".sub('{' + 'token' + '}', token.to_s)
412
+ local_var_path = "/bot{token}/getStickerSet".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
420
413
 
421
414
  # query parameters
422
415
  query_params = {}
@@ -424,10 +417,14 @@ module Teleswagger
424
417
 
425
418
  # header parameters
426
419
  header_params = {}
420
+
427
421
  # HTTP header 'Accept' (if needed)
428
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
422
+ local_header_accept = ['application/json']
423
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
424
+
429
425
  # HTTP header 'Content-Type'
430
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
426
+ local_header_content_type = ['application/json']
427
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
431
428
 
432
429
  # form parameters
433
430
  form_params = {}
@@ -441,7 +438,7 @@ module Teleswagger
441
438
  :form_params => form_params,
442
439
  :body => post_body,
443
440
  :auth_names => auth_names,
444
- :return_type => 'InlineResponse2009')
441
+ :return_type => 'InlineResponse2008')
445
442
  if @api_client.config.debugging
446
443
  @api_client.config.logger.debug "API called: StickersApi#get_sticker_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
447
444
  end
@@ -472,29 +469,27 @@ module Teleswagger
472
469
  @api_client.config.logger.debug "Calling API: StickersApi.set_sticker_position_in_set ..."
473
470
  end
474
471
  # 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
472
+ fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.set_sticker_position_in_set" if token.nil?
478
473
  # 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
474
+ fail ArgumentError, "Missing the required parameter 'sticker' when calling StickersApi.set_sticker_position_in_set" if sticker.nil?
482
475
  # 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
476
+ fail ArgumentError, "Missing the required parameter 'position' when calling StickersApi.set_sticker_position_in_set" if position.nil?
486
477
  # resource path
487
- local_var_path = "/bot{token}/setStickerPositionInSet".sub('{' + 'token' + '}', token.to_s)
478
+ local_var_path = "/bot{token}/setStickerPositionInSet".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
488
479
 
489
480
  # query parameters
490
481
  query_params = {}
491
482
 
492
483
  # header parameters
493
484
  header_params = {}
485
+
494
486
  # HTTP header 'Accept' (if needed)
495
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
487
+ local_header_accept = ['application/json']
488
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
489
+
496
490
  # HTTP header 'Content-Type'
497
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
491
+ local_header_content_type = ['application/json']
492
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
498
493
 
499
494
  # form parameters
500
495
  form_params = {}
@@ -541,29 +536,27 @@ module Teleswagger
541
536
  @api_client.config.logger.debug "Calling API: StickersApi.upload_sticker_file ..."
542
537
  end
543
538
  # 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
539
+ fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.upload_sticker_file" if token.nil?
547
540
  # 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
541
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling StickersApi.upload_sticker_file" if user_id.nil?
551
542
  # 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
543
+ fail ArgumentError, "Missing the required parameter 'png_sticker' when calling StickersApi.upload_sticker_file" if png_sticker.nil?
555
544
  # resource path
556
- local_var_path = "/bot{token}/uploadStickerFile".sub('{' + 'token' + '}', token.to_s)
545
+ local_var_path = "/bot{token}/uploadStickerFile".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
557
546
 
558
547
  # query parameters
559
548
  query_params = {}
560
549
 
561
550
  # header parameters
562
551
  header_params = {}
552
+
563
553
  # HTTP header 'Accept' (if needed)
564
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
554
+ local_header_accept = ['application/json']
555
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
556
+
565
557
  # HTTP header 'Content-Type'
566
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
558
+ local_header_content_type = ['multipart/form-data']
559
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
567
560
 
568
561
  # form parameters
569
562
  form_params = {}
@@ -610,29 +603,27 @@ module Teleswagger
610
603
  @api_client.config.logger.debug "Calling API: StickersApi.upload_sticker_file_link ..."
611
604
  end
612
605
  # 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
606
+ fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.upload_sticker_file_link" if token.nil?
616
607
  # 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
608
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling StickersApi.upload_sticker_file_link" if user_id.nil?
620
609
  # 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
610
+ fail ArgumentError, "Missing the required parameter 'png_sticker' when calling StickersApi.upload_sticker_file_link" if png_sticker.nil?
624
611
  # resource path
625
- local_var_path = "/bot{token}/uploadStickerFile#link".sub('{' + 'token' + '}', token.to_s)
612
+ local_var_path = "/bot{token}/uploadStickerFile#link".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
626
613
 
627
614
  # query parameters
628
615
  query_params = {}
629
616
 
630
617
  # header parameters
631
618
  header_params = {}
619
+
632
620
  # HTTP header 'Accept' (if needed)
633
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
621
+ local_header_accept = ['application/json']
622
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
623
+
634
624
  # HTTP header 'Content-Type'
635
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
625
+ local_header_content_type = ['application/json']
626
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
636
627
 
637
628
  # form parameters
638
629
  form_params = {}