teleswagger 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -5
- data/LICENSE +201 -0
- data/README.md +88 -74
- data/docs/AnswerCallbackQueryBody.md +12 -0
- data/docs/AttachmentsApi.md +166 -3
- data/docs/CallbacksApi.md +6 -18
- data/docs/Chat.md +2 -0
- data/docs/ChatsApi.md +112 -9
- data/docs/EditMessageCaptionBody.md +1 -0
- data/docs/EditMessageLiveLocationBody.md +13 -0
- data/docs/GamesApi.md +5 -5
- data/docs/GetUpdatesBody.md +11 -0
- data/docs/InlineApi.md +1 -1
- data/docs/InlineQueryResultAudio.md +1 -0
- data/docs/InlineQueryResultCachedAudio.md +1 -0
- data/docs/InlineQueryResultCachedDocument.md +1 -0
- data/docs/InlineQueryResultCachedGif.md +1 -0
- data/docs/InlineQueryResultCachedMpeg4Gif.md +1 -0
- data/docs/InlineQueryResultCachedPhoto.md +1 -0
- data/docs/InlineQueryResultCachedVideo.md +1 -0
- data/docs/InlineQueryResultCachedVoice.md +1 -0
- data/docs/InlineQueryResultDocument.md +1 -0
- data/docs/InlineQueryResultGif.md +1 -0
- data/docs/InlineQueryResultLocation.md +1 -0
- data/docs/InlineQueryResultMpeg4Gif.md +1 -0
- data/docs/InlineQueryResultPhoto.md +1 -0
- data/docs/InlineQueryResultVideo.md +1 -0
- data/docs/InlineQueryResultVoice.md +1 -0
- data/docs/InlineResponse200.md +1 -1
- data/docs/InlineResponse2001.md +1 -1
- data/docs/InlineResponse2002.md +1 -1
- data/docs/InlineResponse2003.md +1 -1
- data/docs/InlineResponse2004.md +1 -1
- data/docs/InlineResponse2005.md +1 -1
- data/docs/InlineResponse2006.md +1 -1
- data/docs/InlineResponse2007.md +1 -1
- data/docs/InlineResponse2008.md +1 -1
- data/docs/InlineResponse2009.md +1 -1
- data/docs/InputLocationMessageContent.md +1 -0
- data/docs/InputMediaPhoto.md +11 -0
- data/docs/InputMediaVideo.md +15 -0
- data/docs/Message.md +3 -0
- data/docs/MessagesApi.md +7 -7
- data/docs/PaymentsApi.md +1 -1
- data/docs/ReplyKeyboardMarkup.md +1 -1
- data/docs/SendInvoiceBody.md +1 -0
- data/docs/SendLocationBody.md +1 -0
- data/docs/SendMediaGroupLinkBody.md +11 -0
- data/docs/StickersApi.md +3 -3
- data/docs/StopMessageLiveLocationBody.md +11 -0
- data/docs/UpdatesApi.md +4 -8
- data/docs/UsersApi.md +5 -5
- data/git_push.sh +67 -0
- data/lib/teleswagger.rb +20 -2
- data/lib/teleswagger/api/attachments_api.rb +367 -158
- data/lib/teleswagger/api/callbacks_api.rb +29 -47
- data/lib/teleswagger/api/chats_api.rb +316 -192
- data/lib/teleswagger/api/games_api.rb +46 -35
- data/lib/teleswagger/api/inline_api.rb +21 -8
- data/lib/teleswagger/api/messages_api.rb +84 -71
- data/lib/teleswagger/api/payments_api.rb +39 -26
- data/lib/teleswagger/api/stickers_api.rb +107 -116
- data/lib/teleswagger/api/updates_api.rb +50 -39
- data/lib/teleswagger/api/users_api.rb +36 -23
- data/lib/teleswagger/api_client.rb +45 -55
- data/lib/teleswagger/api_error.rb +18 -9
- data/lib/teleswagger/configuration.rb +13 -8
- data/lib/teleswagger/models/add_sticker_to_set_link_body.rb +16 -21
- data/lib/teleswagger/models/allowed_update.rb +15 -2
- data/lib/teleswagger/models/animation.rb +16 -9
- data/lib/teleswagger/models/answer_callback_query_body.rb +235 -0
- data/lib/teleswagger/models/answer_inline_query_body.rb +16 -13
- data/lib/teleswagger/models/answer_shipping_query_body.rb +16 -13
- data/lib/teleswagger/models/audio.rb +16 -5
- data/lib/teleswagger/models/callback_game.rb +16 -5
- data/lib/teleswagger/models/callback_query.rb +16 -5
- data/lib/teleswagger/models/chat.rb +38 -17
- data/lib/teleswagger/models/chat_member.rb +16 -13
- data/lib/teleswagger/models/chat_photo.rb +16 -5
- data/lib/teleswagger/models/chosen_inline_result.rb +16 -17
- data/lib/teleswagger/models/contact.rb +16 -5
- data/lib/teleswagger/models/create_new_sticker_set_link_body.rb +16 -25
- data/lib/teleswagger/models/document.rb +16 -5
- data/lib/teleswagger/models/edit_message_caption_body.rb +26 -6
- data/lib/teleswagger/models/edit_message_live_location_body.rb +246 -0
- data/lib/teleswagger/models/edit_message_reply_markup_body.rb +16 -5
- data/lib/teleswagger/models/edit_message_text_body.rb +16 -9
- data/lib/teleswagger/models/error.rb +16 -5
- data/lib/teleswagger/models/file.rb +16 -5
- data/lib/teleswagger/models/force_reply.rb +16 -5
- data/lib/teleswagger/models/game.rb +16 -17
- data/lib/teleswagger/models/game_high_score.rb +16 -5
- data/lib/teleswagger/models/get_updates_body.rb +228 -0
- data/lib/teleswagger/models/inline_keyboard_button.rb +16 -5
- data/lib/teleswagger/models/inline_keyboard_markup.rb +16 -5
- data/lib/teleswagger/models/inline_query.rb +16 -5
- data/lib/teleswagger/models/inline_query_result_article.rb +16 -21
- data/lib/teleswagger/models/inline_query_result_audio.rb +26 -22
- data/lib/teleswagger/models/inline_query_result_cached_audio.rb +26 -18
- data/lib/teleswagger/models/inline_query_result_cached_document.rb +26 -18
- data/lib/teleswagger/models/inline_query_result_cached_gif.rb +26 -18
- data/lib/teleswagger/models/inline_query_result_cached_mpeg4_gif.rb +26 -18
- data/lib/teleswagger/models/inline_query_result_cached_photo.rb +26 -18
- data/lib/teleswagger/models/inline_query_result_cached_sticker.rb +16 -17
- data/lib/teleswagger/models/inline_query_result_cached_video.rb +26 -18
- data/lib/teleswagger/models/inline_query_result_cached_voice.rb +26 -18
- data/lib/teleswagger/models/inline_query_result_contact.rb +16 -21
- data/lib/teleswagger/models/inline_query_result_document.rb +26 -26
- data/lib/teleswagger/models/inline_query_result_game.rb +16 -17
- data/lib/teleswagger/models/inline_query_result_gif.rb +26 -22
- data/lib/teleswagger/models/inline_query_result_location.rb +50 -24
- data/lib/teleswagger/models/inline_query_result_mpeg4_gif.rb +26 -22
- data/lib/teleswagger/models/inline_query_result_photo.rb +26 -22
- data/lib/teleswagger/models/inline_query_result_venue.rb +16 -29
- data/lib/teleswagger/models/inline_query_result_video.rb +26 -30
- data/lib/teleswagger/models/inline_query_result_voice.rb +26 -22
- data/lib/teleswagger/models/inline_response_200.rb +17 -6
- data/lib/teleswagger/models/inline_response_200_1.rb +17 -6
- data/lib/teleswagger/models/inline_response_200_2.rb +20 -7
- data/lib/teleswagger/models/inline_response_200_3.rb +17 -6
- data/lib/teleswagger/models/inline_response_200_4.rb +18 -9
- data/lib/teleswagger/models/inline_response_200_5.rb +17 -6
- data/lib/teleswagger/models/inline_response_200_6.rb +17 -6
- data/lib/teleswagger/models/inline_response_200_7.rb +17 -6
- data/lib/teleswagger/models/inline_response_200_8.rb +17 -6
- data/lib/teleswagger/models/inline_response_200_9.rb +17 -6
- data/lib/teleswagger/models/inline_type.rb +13 -2
- data/lib/teleswagger/models/input_contact_message_content.rb +16 -13
- data/lib/teleswagger/models/input_location_message_content.rb +51 -13
- data/lib/teleswagger/models/input_media_photo.rb +228 -0
- data/lib/teleswagger/models/input_media_video.rb +264 -0
- data/lib/teleswagger/models/input_text_message_content.rb +16 -9
- data/lib/teleswagger/models/input_venue_message_content.rb +16 -21
- data/lib/teleswagger/models/invoice.rb +16 -5
- data/lib/teleswagger/models/keyboard_button.rb +16 -5
- data/lib/teleswagger/models/labeled_price.rb +16 -5
- data/lib/teleswagger/models/location.rb +16 -5
- data/lib/teleswagger/models/mask_position.rb +16 -5
- data/lib/teleswagger/models/message.rb +49 -9
- data/lib/teleswagger/models/message_entity.rb +16 -5
- data/lib/teleswagger/models/order_info.rb +16 -5
- data/lib/teleswagger/models/parse_mode.rb +13 -2
- data/lib/teleswagger/models/photo_size.rb +16 -5
- data/lib/teleswagger/models/pre_checkout_query.rb +16 -5
- data/lib/teleswagger/models/promote_chat_member_body.rb +16 -13
- data/lib/teleswagger/models/reply_keyboard_markup.rb +17 -6
- data/lib/teleswagger/models/reply_keyboard_remove.rb +16 -5
- data/lib/teleswagger/models/response_bool.rb +16 -5
- data/lib/teleswagger/models/response_message.rb +16 -5
- data/lib/teleswagger/models/response_parameters.rb +16 -5
- data/lib/teleswagger/models/response_update.rb +16 -5
- data/lib/teleswagger/models/restrict_chat_member_body.rb +16 -13
- data/lib/teleswagger/models/send_audio_link_body.rb +16 -13
- data/lib/teleswagger/models/send_contact_body.rb +16 -17
- data/lib/teleswagger/models/send_document_link_body.rb +16 -13
- data/lib/teleswagger/models/send_game_body.rb +16 -13
- data/lib/teleswagger/models/send_invoice_body.rb +26 -38
- data/lib/teleswagger/models/send_location_body.rb +50 -16
- data/lib/teleswagger/models/send_media_group_link_body.rb +230 -0
- data/lib/teleswagger/models/send_message_body.rb +16 -13
- data/lib/teleswagger/models/send_photo_link_body.rb +16 -13
- data/lib/teleswagger/models/send_sticker_link_body.rb +16 -13
- data/lib/teleswagger/models/send_venue_body.rb +16 -25
- data/lib/teleswagger/models/send_video_link_body.rb +16 -13
- data/lib/teleswagger/models/send_video_note_link_body.rb +16 -13
- data/lib/teleswagger/models/send_voice_link_body.rb +16 -13
- data/lib/teleswagger/models/shipping_address.rb +16 -5
- data/lib/teleswagger/models/shipping_option.rb +16 -5
- data/lib/teleswagger/models/shipping_query.rb +16 -5
- data/lib/teleswagger/models/sticker.rb +16 -5
- data/lib/teleswagger/models/sticker_set.rb +16 -5
- data/lib/teleswagger/models/stop_message_live_location_body.rb +226 -0
- data/lib/teleswagger/models/successful_payment.rb +16 -5
- data/lib/teleswagger/models/update.rb +16 -5
- data/lib/teleswagger/models/user.rb +16 -5
- data/lib/teleswagger/models/user_profile_photos.rb +16 -5
- data/lib/teleswagger/models/venue.rb +16 -5
- data/lib/teleswagger/models/video.rb +16 -5
- data/lib/teleswagger/models/video_note.rb +16 -5
- data/lib/teleswagger/models/voice.rb +16 -5
- data/lib/teleswagger/models/webhook_info.rb +16 -17
- data/lib/teleswagger/version.rb +15 -4
- data/spec/models/answer_callback_query_body_spec.rb +77 -0
- data/spec/models/edit_message_live_location_body_spec.rb +83 -0
- data/spec/models/get_updates_body_spec.rb +71 -0
- data/spec/models/input_media_photo_spec.rb +71 -0
- data/spec/models/input_media_video_spec.rb +95 -0
- data/spec/models/send_media_group_link_body_spec.rb +71 -0
- data/spec/models/stop_message_live_location_body_spec.rb +71 -0
- data/swagger.yaml +428 -52
- data/teleswagger.gemspec +17 -8
- 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.
|
6
|
+
OpenAPI spec version: 3.6
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
|
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
|
|
@@ -23,79 +34,50 @@ module Teleswagger
|
|
23
34
|
#
|
24
35
|
#
|
25
36
|
# @param token bot's token to authorize the request
|
26
|
-
# @param
|
27
|
-
# @param text
|
28
|
-
# @param show_alert
|
29
|
-
# @param url
|
30
|
-
# @param cache_time
|
37
|
+
# @param body
|
31
38
|
# @param [Hash] opts the optional parameters
|
32
39
|
# @return [ResponseBool]
|
33
|
-
def answer_callback_query(token,
|
34
|
-
data, _status_code, _headers = answer_callback_query_with_http_info(token,
|
40
|
+
def answer_callback_query(token, body, opts = {})
|
41
|
+
data, _status_code, _headers = answer_callback_query_with_http_info(token, body, opts)
|
35
42
|
return data
|
36
43
|
end
|
37
44
|
|
38
45
|
#
|
39
46
|
#
|
40
47
|
# @param token bot's token to authorize the request
|
41
|
-
# @param
|
42
|
-
# @param text
|
43
|
-
# @param show_alert
|
44
|
-
# @param url
|
45
|
-
# @param cache_time
|
48
|
+
# @param body
|
46
49
|
# @param [Hash] opts the optional parameters
|
47
50
|
# @return [Array<(ResponseBool, Fixnum, Hash)>] ResponseBool data, response status code and response headers
|
48
|
-
def answer_callback_query_with_http_info(token,
|
51
|
+
def answer_callback_query_with_http_info(token, body, opts = {})
|
49
52
|
if @api_client.config.debugging
|
50
53
|
@api_client.config.logger.debug "Calling API: CallbacksApi.answer_callback_query ..."
|
51
54
|
end
|
52
55
|
# verify the required parameter 'token' is set
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
# verify the required parameter 'callback_query_id' is set
|
57
|
-
if @api_client.config.client_side_validation && callback_query_id.nil?
|
58
|
-
fail ArgumentError, "Missing the required parameter 'callback_query_id' when calling CallbacksApi.answer_callback_query"
|
59
|
-
end
|
60
|
-
# verify the required parameter 'text' is set
|
61
|
-
if @api_client.config.client_side_validation && text.nil?
|
62
|
-
fail ArgumentError, "Missing the required parameter 'text' when calling CallbacksApi.answer_callback_query"
|
63
|
-
end
|
64
|
-
# verify the required parameter 'show_alert' is set
|
65
|
-
if @api_client.config.client_side_validation && show_alert.nil?
|
66
|
-
fail ArgumentError, "Missing the required parameter 'show_alert' when calling CallbacksApi.answer_callback_query"
|
67
|
-
end
|
68
|
-
# verify the required parameter 'url' is set
|
69
|
-
if @api_client.config.client_side_validation && url.nil?
|
70
|
-
fail ArgumentError, "Missing the required parameter 'url' when calling CallbacksApi.answer_callback_query"
|
71
|
-
end
|
72
|
-
# verify the required parameter 'cache_time' is set
|
73
|
-
if @api_client.config.client_side_validation && cache_time.nil?
|
74
|
-
fail ArgumentError, "Missing the required parameter 'cache_time' when calling CallbacksApi.answer_callback_query"
|
75
|
-
end
|
56
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling CallbacksApi.answer_callback_query" if token.nil?
|
57
|
+
# verify the required parameter 'body' is set
|
58
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling CallbacksApi.answer_callback_query" if body.nil?
|
76
59
|
# resource path
|
77
|
-
local_var_path = "/bot{token}/answerCallbackQuery".sub('{' + 'token' + '}', token.to_s)
|
60
|
+
local_var_path = "/bot{token}/answerCallbackQuery".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
78
61
|
|
79
62
|
# query parameters
|
80
63
|
query_params = {}
|
81
64
|
|
82
65
|
# header parameters
|
83
66
|
header_params = {}
|
67
|
+
|
84
68
|
# HTTP header 'Accept' (if needed)
|
85
|
-
|
69
|
+
local_header_accept = ['application/json']
|
70
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
71
|
+
|
86
72
|
# HTTP header 'Content-Type'
|
87
|
-
|
73
|
+
local_header_content_type = ['application/json']
|
74
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
88
75
|
|
89
76
|
# form parameters
|
90
77
|
form_params = {}
|
91
|
-
form_params["callback_query_id"] = callback_query_id
|
92
|
-
form_params["text"] = text
|
93
|
-
form_params["show_alert"] = show_alert
|
94
|
-
form_params["url"] = url
|
95
|
-
form_params["cache_time"] = cache_time
|
96
78
|
|
97
79
|
# http body (model)
|
98
|
-
post_body =
|
80
|
+
post_body = @api_client.object_to_http_body(body)
|
99
81
|
auth_names = []
|
100
82
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
101
83
|
:header_params => header_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.
|
6
|
+
OpenAPI spec version: 3.6
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
|
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
|
|
@@ -42,15 +53,11 @@ module Teleswagger
|
|
42
53
|
@api_client.config.logger.debug "Calling API: ChatsApi.delete_chat_photo ..."
|
43
54
|
end
|
44
55
|
# verify the required parameter 'token' is set
|
45
|
-
|
46
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.delete_chat_photo"
|
47
|
-
end
|
56
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.delete_chat_photo" if token.nil?
|
48
57
|
# verify the required parameter 'chat_id' is set
|
49
|
-
|
50
|
-
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.delete_chat_photo"
|
51
|
-
end
|
58
|
+
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.delete_chat_photo" if chat_id.nil?
|
52
59
|
# resource path
|
53
|
-
local_var_path = "/bot{token}/deleteChatPhoto".sub('{' + 'token' + '}', token.to_s)
|
60
|
+
local_var_path = "/bot{token}/deleteChatPhoto".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
54
61
|
|
55
62
|
# query parameters
|
56
63
|
query_params = {}
|
@@ -58,10 +65,14 @@ module Teleswagger
|
|
58
65
|
|
59
66
|
# header parameters
|
60
67
|
header_params = {}
|
68
|
+
|
61
69
|
# HTTP header 'Accept' (if needed)
|
62
|
-
|
70
|
+
local_header_accept = ['application/json']
|
71
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
72
|
+
|
63
73
|
# HTTP header 'Content-Type'
|
64
|
-
|
74
|
+
local_header_content_type = ['application/json']
|
75
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
65
76
|
|
66
77
|
# form parameters
|
67
78
|
form_params = {}
|
@@ -82,6 +93,68 @@ module Teleswagger
|
|
82
93
|
return data, status_code, headers
|
83
94
|
end
|
84
95
|
|
96
|
+
#
|
97
|
+
#
|
98
|
+
# @param token bot's token to authorize the request
|
99
|
+
# @param chat_id
|
100
|
+
# @param [Hash] opts the optional parameters
|
101
|
+
# @return [ResponseBool]
|
102
|
+
def delete_chat_sticker_set(token, chat_id, opts = {})
|
103
|
+
data, _status_code, _headers = delete_chat_sticker_set_with_http_info(token, chat_id, opts)
|
104
|
+
return data
|
105
|
+
end
|
106
|
+
|
107
|
+
#
|
108
|
+
#
|
109
|
+
# @param token bot's token to authorize the request
|
110
|
+
# @param chat_id
|
111
|
+
# @param [Hash] opts the optional parameters
|
112
|
+
# @return [Array<(ResponseBool, Fixnum, Hash)>] ResponseBool data, response status code and response headers
|
113
|
+
def delete_chat_sticker_set_with_http_info(token, chat_id, opts = {})
|
114
|
+
if @api_client.config.debugging
|
115
|
+
@api_client.config.logger.debug "Calling API: ChatsApi.delete_chat_sticker_set ..."
|
116
|
+
end
|
117
|
+
# verify the required parameter 'token' is set
|
118
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.delete_chat_sticker_set" if token.nil?
|
119
|
+
# verify the required parameter 'chat_id' is set
|
120
|
+
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.delete_chat_sticker_set" if chat_id.nil?
|
121
|
+
# resource path
|
122
|
+
local_var_path = "/bot{token}/deleteChatStickerSet".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
123
|
+
|
124
|
+
# query parameters
|
125
|
+
query_params = {}
|
126
|
+
query_params[:'chat_id'] = chat_id
|
127
|
+
|
128
|
+
# header parameters
|
129
|
+
header_params = {}
|
130
|
+
|
131
|
+
# HTTP header 'Accept' (if needed)
|
132
|
+
local_header_accept = ['application/json']
|
133
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
134
|
+
|
135
|
+
# HTTP header 'Content-Type'
|
136
|
+
local_header_content_type = ['application/json']
|
137
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
138
|
+
|
139
|
+
# form parameters
|
140
|
+
form_params = {}
|
141
|
+
|
142
|
+
# http body (model)
|
143
|
+
post_body = nil
|
144
|
+
auth_names = []
|
145
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
146
|
+
:header_params => header_params,
|
147
|
+
:query_params => query_params,
|
148
|
+
:form_params => form_params,
|
149
|
+
:body => post_body,
|
150
|
+
:auth_names => auth_names,
|
151
|
+
:return_type => 'ResponseBool')
|
152
|
+
if @api_client.config.debugging
|
153
|
+
@api_client.config.logger.debug "API called: ChatsApi#delete_chat_sticker_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
154
|
+
end
|
155
|
+
return data, status_code, headers
|
156
|
+
end
|
157
|
+
|
85
158
|
#
|
86
159
|
#
|
87
160
|
# @param token bot's token to authorize the request
|
@@ -104,15 +177,11 @@ module Teleswagger
|
|
104
177
|
@api_client.config.logger.debug "Calling API: ChatsApi.export_chat_invite_link ..."
|
105
178
|
end
|
106
179
|
# verify the required parameter 'token' is set
|
107
|
-
|
108
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.export_chat_invite_link"
|
109
|
-
end
|
180
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.export_chat_invite_link" if token.nil?
|
110
181
|
# verify the required parameter 'chat_id' is set
|
111
|
-
|
112
|
-
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.export_chat_invite_link"
|
113
|
-
end
|
182
|
+
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.export_chat_invite_link" if chat_id.nil?
|
114
183
|
# resource path
|
115
|
-
local_var_path = "/bot{token}/exportChatInviteLink".sub('{' + 'token' + '}', token.to_s)
|
184
|
+
local_var_path = "/bot{token}/exportChatInviteLink".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
116
185
|
|
117
186
|
# query parameters
|
118
187
|
query_params = {}
|
@@ -120,10 +189,14 @@ module Teleswagger
|
|
120
189
|
|
121
190
|
# header parameters
|
122
191
|
header_params = {}
|
192
|
+
|
123
193
|
# HTTP header 'Accept' (if needed)
|
124
|
-
|
194
|
+
local_header_accept = ['application/json']
|
195
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
196
|
+
|
125
197
|
# HTTP header 'Content-Type'
|
126
|
-
|
198
|
+
local_header_content_type = ['application/json']
|
199
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
127
200
|
|
128
201
|
# form parameters
|
129
202
|
form_params = {}
|
@@ -149,7 +222,7 @@ module Teleswagger
|
|
149
222
|
# @param token bot's token to authorize the request
|
150
223
|
# @param chat_id
|
151
224
|
# @param [Hash] opts the optional parameters
|
152
|
-
# @return [
|
225
|
+
# @return [InlineResponse2001]
|
153
226
|
def get_chat(token, chat_id, opts = {})
|
154
227
|
data, _status_code, _headers = get_chat_with_http_info(token, chat_id, opts)
|
155
228
|
return data
|
@@ -160,21 +233,17 @@ module Teleswagger
|
|
160
233
|
# @param token bot's token to authorize the request
|
161
234
|
# @param chat_id
|
162
235
|
# @param [Hash] opts the optional parameters
|
163
|
-
# @return [Array<(
|
236
|
+
# @return [Array<(InlineResponse2001, Fixnum, Hash)>] InlineResponse2001 data, response status code and response headers
|
164
237
|
def get_chat_with_http_info(token, chat_id, opts = {})
|
165
238
|
if @api_client.config.debugging
|
166
239
|
@api_client.config.logger.debug "Calling API: ChatsApi.get_chat ..."
|
167
240
|
end
|
168
241
|
# verify the required parameter 'token' is set
|
169
|
-
|
170
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.get_chat"
|
171
|
-
end
|
242
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.get_chat" if token.nil?
|
172
243
|
# verify the required parameter 'chat_id' is set
|
173
|
-
|
174
|
-
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.get_chat"
|
175
|
-
end
|
244
|
+
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.get_chat" if chat_id.nil?
|
176
245
|
# resource path
|
177
|
-
local_var_path = "/bot{token}/getChat".sub('{' + 'token' + '}', token.to_s)
|
246
|
+
local_var_path = "/bot{token}/getChat".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
178
247
|
|
179
248
|
# query parameters
|
180
249
|
query_params = {}
|
@@ -182,10 +251,14 @@ module Teleswagger
|
|
182
251
|
|
183
252
|
# header parameters
|
184
253
|
header_params = {}
|
254
|
+
|
185
255
|
# HTTP header 'Accept' (if needed)
|
186
|
-
|
256
|
+
local_header_accept = ['application/json']
|
257
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
258
|
+
|
187
259
|
# HTTP header 'Content-Type'
|
188
|
-
|
260
|
+
local_header_content_type = ['application/json']
|
261
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
189
262
|
|
190
263
|
# form parameters
|
191
264
|
form_params = {}
|
@@ -199,7 +272,7 @@ module Teleswagger
|
|
199
272
|
:form_params => form_params,
|
200
273
|
:body => post_body,
|
201
274
|
:auth_names => auth_names,
|
202
|
-
:return_type => '
|
275
|
+
:return_type => 'InlineResponse2001')
|
203
276
|
if @api_client.config.debugging
|
204
277
|
@api_client.config.logger.debug "API called: ChatsApi#get_chat\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
205
278
|
end
|
@@ -211,7 +284,7 @@ module Teleswagger
|
|
211
284
|
# @param token bot's token to authorize the request
|
212
285
|
# @param chat_id
|
213
286
|
# @param [Hash] opts the optional parameters
|
214
|
-
# @return [
|
287
|
+
# @return [InlineResponse2002]
|
215
288
|
def get_chat_administrators(token, chat_id, opts = {})
|
216
289
|
data, _status_code, _headers = get_chat_administrators_with_http_info(token, chat_id, opts)
|
217
290
|
return data
|
@@ -222,21 +295,17 @@ module Teleswagger
|
|
222
295
|
# @param token bot's token to authorize the request
|
223
296
|
# @param chat_id
|
224
297
|
# @param [Hash] opts the optional parameters
|
225
|
-
# @return [Array<(
|
298
|
+
# @return [Array<(InlineResponse2002, Fixnum, Hash)>] InlineResponse2002 data, response status code and response headers
|
226
299
|
def get_chat_administrators_with_http_info(token, chat_id, opts = {})
|
227
300
|
if @api_client.config.debugging
|
228
301
|
@api_client.config.logger.debug "Calling API: ChatsApi.get_chat_administrators ..."
|
229
302
|
end
|
230
303
|
# verify the required parameter 'token' is set
|
231
|
-
|
232
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.get_chat_administrators"
|
233
|
-
end
|
304
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.get_chat_administrators" if token.nil?
|
234
305
|
# verify the required parameter 'chat_id' is set
|
235
|
-
|
236
|
-
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.get_chat_administrators"
|
237
|
-
end
|
306
|
+
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.get_chat_administrators" if chat_id.nil?
|
238
307
|
# resource path
|
239
|
-
local_var_path = "/bot{token}/getChatAdministrators".sub('{' + 'token' + '}', token.to_s)
|
308
|
+
local_var_path = "/bot{token}/getChatAdministrators".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
240
309
|
|
241
310
|
# query parameters
|
242
311
|
query_params = {}
|
@@ -244,10 +313,14 @@ module Teleswagger
|
|
244
313
|
|
245
314
|
# header parameters
|
246
315
|
header_params = {}
|
316
|
+
|
247
317
|
# HTTP header 'Accept' (if needed)
|
248
|
-
|
318
|
+
local_header_accept = ['application/json']
|
319
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
320
|
+
|
249
321
|
# HTTP header 'Content-Type'
|
250
|
-
|
322
|
+
local_header_content_type = ['application/json']
|
323
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
251
324
|
|
252
325
|
# form parameters
|
253
326
|
form_params = {}
|
@@ -261,7 +334,7 @@ module Teleswagger
|
|
261
334
|
:form_params => form_params,
|
262
335
|
:body => post_body,
|
263
336
|
:auth_names => auth_names,
|
264
|
-
:return_type => '
|
337
|
+
:return_type => 'InlineResponse2002')
|
265
338
|
if @api_client.config.debugging
|
266
339
|
@api_client.config.logger.debug "API called: ChatsApi#get_chat_administrators\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
267
340
|
end
|
@@ -274,7 +347,7 @@ module Teleswagger
|
|
274
347
|
# @param chat_id
|
275
348
|
# @param user_id
|
276
349
|
# @param [Hash] opts the optional parameters
|
277
|
-
# @return [
|
350
|
+
# @return [InlineResponse2003]
|
278
351
|
def get_chat_member(token, chat_id, user_id, opts = {})
|
279
352
|
data, _status_code, _headers = get_chat_member_with_http_info(token, chat_id, user_id, opts)
|
280
353
|
return data
|
@@ -286,25 +359,19 @@ module Teleswagger
|
|
286
359
|
# @param chat_id
|
287
360
|
# @param user_id
|
288
361
|
# @param [Hash] opts the optional parameters
|
289
|
-
# @return [Array<(
|
362
|
+
# @return [Array<(InlineResponse2003, Fixnum, Hash)>] InlineResponse2003 data, response status code and response headers
|
290
363
|
def get_chat_member_with_http_info(token, chat_id, user_id, opts = {})
|
291
364
|
if @api_client.config.debugging
|
292
365
|
@api_client.config.logger.debug "Calling API: ChatsApi.get_chat_member ..."
|
293
366
|
end
|
294
367
|
# verify the required parameter 'token' is set
|
295
|
-
|
296
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.get_chat_member"
|
297
|
-
end
|
368
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.get_chat_member" if token.nil?
|
298
369
|
# verify the required parameter 'chat_id' is set
|
299
|
-
|
300
|
-
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.get_chat_member"
|
301
|
-
end
|
370
|
+
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.get_chat_member" if chat_id.nil?
|
302
371
|
# verify the required parameter 'user_id' is set
|
303
|
-
|
304
|
-
fail ArgumentError, "Missing the required parameter 'user_id' when calling ChatsApi.get_chat_member"
|
305
|
-
end
|
372
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling ChatsApi.get_chat_member" if user_id.nil?
|
306
373
|
# resource path
|
307
|
-
local_var_path = "/bot{token}/getChatMember".sub('{' + 'token' + '}', token.to_s)
|
374
|
+
local_var_path = "/bot{token}/getChatMember".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
308
375
|
|
309
376
|
# query parameters
|
310
377
|
query_params = {}
|
@@ -313,10 +380,14 @@ module Teleswagger
|
|
313
380
|
|
314
381
|
# header parameters
|
315
382
|
header_params = {}
|
383
|
+
|
316
384
|
# HTTP header 'Accept' (if needed)
|
317
|
-
|
385
|
+
local_header_accept = ['application/json']
|
386
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
387
|
+
|
318
388
|
# HTTP header 'Content-Type'
|
319
|
-
|
389
|
+
local_header_content_type = ['application/json']
|
390
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
320
391
|
|
321
392
|
# form parameters
|
322
393
|
form_params = {}
|
@@ -330,7 +401,7 @@ module Teleswagger
|
|
330
401
|
:form_params => form_params,
|
331
402
|
:body => post_body,
|
332
403
|
:auth_names => auth_names,
|
333
|
-
:return_type => '
|
404
|
+
:return_type => 'InlineResponse2003')
|
334
405
|
if @api_client.config.debugging
|
335
406
|
@api_client.config.logger.debug "API called: ChatsApi#get_chat_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
336
407
|
end
|
@@ -342,7 +413,7 @@ module Teleswagger
|
|
342
413
|
# @param token bot's token to authorize the request
|
343
414
|
# @param chat_id
|
344
415
|
# @param [Hash] opts the optional parameters
|
345
|
-
# @return [
|
416
|
+
# @return [InlineResponse2004]
|
346
417
|
def get_chat_members_count(token, chat_id, opts = {})
|
347
418
|
data, _status_code, _headers = get_chat_members_count_with_http_info(token, chat_id, opts)
|
348
419
|
return data
|
@@ -353,21 +424,17 @@ module Teleswagger
|
|
353
424
|
# @param token bot's token to authorize the request
|
354
425
|
# @param chat_id
|
355
426
|
# @param [Hash] opts the optional parameters
|
356
|
-
# @return [Array<(
|
427
|
+
# @return [Array<(InlineResponse2004, Fixnum, Hash)>] InlineResponse2004 data, response status code and response headers
|
357
428
|
def get_chat_members_count_with_http_info(token, chat_id, opts = {})
|
358
429
|
if @api_client.config.debugging
|
359
430
|
@api_client.config.logger.debug "Calling API: ChatsApi.get_chat_members_count ..."
|
360
431
|
end
|
361
432
|
# verify the required parameter 'token' is set
|
362
|
-
|
363
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.get_chat_members_count"
|
364
|
-
end
|
433
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.get_chat_members_count" if token.nil?
|
365
434
|
# verify the required parameter 'chat_id' is set
|
366
|
-
|
367
|
-
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.get_chat_members_count"
|
368
|
-
end
|
435
|
+
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.get_chat_members_count" if chat_id.nil?
|
369
436
|
# resource path
|
370
|
-
local_var_path = "/bot{token}/getChatMembersCount".sub('{' + 'token' + '}', token.to_s)
|
437
|
+
local_var_path = "/bot{token}/getChatMembersCount".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
371
438
|
|
372
439
|
# query parameters
|
373
440
|
query_params = {}
|
@@ -375,10 +442,14 @@ module Teleswagger
|
|
375
442
|
|
376
443
|
# header parameters
|
377
444
|
header_params = {}
|
445
|
+
|
378
446
|
# HTTP header 'Accept' (if needed)
|
379
|
-
|
447
|
+
local_header_accept = ['application/json']
|
448
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
449
|
+
|
380
450
|
# HTTP header 'Content-Type'
|
381
|
-
|
451
|
+
local_header_content_type = ['application/json']
|
452
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
382
453
|
|
383
454
|
# form parameters
|
384
455
|
form_params = {}
|
@@ -392,7 +463,7 @@ module Teleswagger
|
|
392
463
|
:form_params => form_params,
|
393
464
|
:body => post_body,
|
394
465
|
:auth_names => auth_names,
|
395
|
-
:return_type => '
|
466
|
+
:return_type => 'InlineResponse2004')
|
396
467
|
if @api_client.config.debugging
|
397
468
|
@api_client.config.logger.debug "API called: ChatsApi#get_chat_members_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
398
469
|
end
|
@@ -425,19 +496,13 @@ module Teleswagger
|
|
425
496
|
@api_client.config.logger.debug "Calling API: ChatsApi.kick_chat_member ..."
|
426
497
|
end
|
427
498
|
# verify the required parameter 'token' is set
|
428
|
-
|
429
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.kick_chat_member"
|
430
|
-
end
|
499
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.kick_chat_member" if token.nil?
|
431
500
|
# verify the required parameter 'chat_id' is set
|
432
|
-
|
433
|
-
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.kick_chat_member"
|
434
|
-
end
|
501
|
+
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.kick_chat_member" if chat_id.nil?
|
435
502
|
# verify the required parameter 'user_id' is set
|
436
|
-
|
437
|
-
fail ArgumentError, "Missing the required parameter 'user_id' when calling ChatsApi.kick_chat_member"
|
438
|
-
end
|
503
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling ChatsApi.kick_chat_member" if user_id.nil?
|
439
504
|
# resource path
|
440
|
-
local_var_path = "/bot{token}/kickChatMember".sub('{' + 'token' + '}', token.to_s)
|
505
|
+
local_var_path = "/bot{token}/kickChatMember".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
441
506
|
|
442
507
|
# query parameters
|
443
508
|
query_params = {}
|
@@ -447,10 +512,14 @@ module Teleswagger
|
|
447
512
|
|
448
513
|
# header parameters
|
449
514
|
header_params = {}
|
515
|
+
|
450
516
|
# HTTP header 'Accept' (if needed)
|
451
|
-
|
517
|
+
local_header_accept = ['application/json']
|
518
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
519
|
+
|
452
520
|
# HTTP header 'Content-Type'
|
453
|
-
|
521
|
+
local_header_content_type = ['application/json']
|
522
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
454
523
|
|
455
524
|
# form parameters
|
456
525
|
form_params = {}
|
@@ -493,15 +562,11 @@ module Teleswagger
|
|
493
562
|
@api_client.config.logger.debug "Calling API: ChatsApi.leave_chat ..."
|
494
563
|
end
|
495
564
|
# verify the required parameter 'token' is set
|
496
|
-
|
497
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.leave_chat"
|
498
|
-
end
|
565
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.leave_chat" if token.nil?
|
499
566
|
# verify the required parameter 'chat_id' is set
|
500
|
-
|
501
|
-
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.leave_chat"
|
502
|
-
end
|
567
|
+
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.leave_chat" if chat_id.nil?
|
503
568
|
# resource path
|
504
|
-
local_var_path = "/bot{token}/leaveChat".sub('{' + 'token' + '}', token.to_s)
|
569
|
+
local_var_path = "/bot{token}/leaveChat".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
505
570
|
|
506
571
|
# query parameters
|
507
572
|
query_params = {}
|
@@ -509,10 +574,14 @@ module Teleswagger
|
|
509
574
|
|
510
575
|
# header parameters
|
511
576
|
header_params = {}
|
577
|
+
|
512
578
|
# HTTP header 'Accept' (if needed)
|
513
|
-
|
579
|
+
local_header_accept = ['application/json']
|
580
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
581
|
+
|
514
582
|
# HTTP header 'Content-Type'
|
515
|
-
|
583
|
+
local_header_content_type = ['application/json']
|
584
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
516
585
|
|
517
586
|
# form parameters
|
518
587
|
form_params = {}
|
@@ -559,19 +628,13 @@ module Teleswagger
|
|
559
628
|
@api_client.config.logger.debug "Calling API: ChatsApi.pin_chat_message ..."
|
560
629
|
end
|
561
630
|
# verify the required parameter 'token' is set
|
562
|
-
|
563
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.pin_chat_message"
|
564
|
-
end
|
631
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.pin_chat_message" if token.nil?
|
565
632
|
# verify the required parameter 'chat_id' is set
|
566
|
-
|
567
|
-
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.pin_chat_message"
|
568
|
-
end
|
633
|
+
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.pin_chat_message" if chat_id.nil?
|
569
634
|
# verify the required parameter 'message_id' is set
|
570
|
-
|
571
|
-
fail ArgumentError, "Missing the required parameter 'message_id' when calling ChatsApi.pin_chat_message"
|
572
|
-
end
|
635
|
+
fail ArgumentError, "Missing the required parameter 'message_id' when calling ChatsApi.pin_chat_message" if message_id.nil?
|
573
636
|
# resource path
|
574
|
-
local_var_path = "/bot{token}/pinChatMessage".sub('{' + 'token' + '}', token.to_s)
|
637
|
+
local_var_path = "/bot{token}/pinChatMessage".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
575
638
|
|
576
639
|
# query parameters
|
577
640
|
query_params = {}
|
@@ -581,10 +644,14 @@ module Teleswagger
|
|
581
644
|
|
582
645
|
# header parameters
|
583
646
|
header_params = {}
|
647
|
+
|
584
648
|
# HTTP header 'Accept' (if needed)
|
585
|
-
|
649
|
+
local_header_accept = ['application/json']
|
650
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
651
|
+
|
586
652
|
# HTTP header 'Content-Type'
|
587
|
-
|
653
|
+
local_header_content_type = ['application/json']
|
654
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
588
655
|
|
589
656
|
# form parameters
|
590
657
|
form_params = {}
|
@@ -627,25 +694,25 @@ module Teleswagger
|
|
627
694
|
@api_client.config.logger.debug "Calling API: ChatsApi.promote_chat_member ..."
|
628
695
|
end
|
629
696
|
# verify the required parameter 'token' is set
|
630
|
-
|
631
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.promote_chat_member"
|
632
|
-
end
|
697
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.promote_chat_member" if token.nil?
|
633
698
|
# verify the required parameter 'body' is set
|
634
|
-
|
635
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling ChatsApi.promote_chat_member"
|
636
|
-
end
|
699
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling ChatsApi.promote_chat_member" if body.nil?
|
637
700
|
# resource path
|
638
|
-
local_var_path = "/bot{token}/promoteChatMember".sub('{' + 'token' + '}', token.to_s)
|
701
|
+
local_var_path = "/bot{token}/promoteChatMember".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
639
702
|
|
640
703
|
# query parameters
|
641
704
|
query_params = {}
|
642
705
|
|
643
706
|
# header parameters
|
644
707
|
header_params = {}
|
708
|
+
|
645
709
|
# HTTP header 'Accept' (if needed)
|
646
|
-
|
710
|
+
local_header_accept = ['application/json']
|
711
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
712
|
+
|
647
713
|
# HTTP header 'Content-Type'
|
648
|
-
|
714
|
+
local_header_content_type = ['application/json']
|
715
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
649
716
|
|
650
717
|
# form parameters
|
651
718
|
form_params = {}
|
@@ -688,25 +755,25 @@ module Teleswagger
|
|
688
755
|
@api_client.config.logger.debug "Calling API: ChatsApi.restrict_chat_member ..."
|
689
756
|
end
|
690
757
|
# verify the required parameter 'token' is set
|
691
|
-
|
692
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.restrict_chat_member"
|
693
|
-
end
|
758
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.restrict_chat_member" if token.nil?
|
694
759
|
# verify the required parameter 'body' is set
|
695
|
-
|
696
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling ChatsApi.restrict_chat_member"
|
697
|
-
end
|
760
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling ChatsApi.restrict_chat_member" if body.nil?
|
698
761
|
# resource path
|
699
|
-
local_var_path = "/bot{token}/restrictChatMember".sub('{' + 'token' + '}', token.to_s)
|
762
|
+
local_var_path = "/bot{token}/restrictChatMember".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
700
763
|
|
701
764
|
# query parameters
|
702
765
|
query_params = {}
|
703
766
|
|
704
767
|
# header parameters
|
705
768
|
header_params = {}
|
769
|
+
|
706
770
|
# HTTP header 'Accept' (if needed)
|
707
|
-
|
771
|
+
local_header_accept = ['application/json']
|
772
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
773
|
+
|
708
774
|
# HTTP header 'Content-Type'
|
709
|
-
|
775
|
+
local_header_content_type = ['application/json']
|
776
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
710
777
|
|
711
778
|
# form parameters
|
712
779
|
form_params = {}
|
@@ -751,23 +818,17 @@ module Teleswagger
|
|
751
818
|
@api_client.config.logger.debug "Calling API: ChatsApi.send_chat_action ..."
|
752
819
|
end
|
753
820
|
# verify the required parameter 'token' is set
|
754
|
-
|
755
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.send_chat_action"
|
756
|
-
end
|
821
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.send_chat_action" if token.nil?
|
757
822
|
# verify the required parameter 'chat_id' is set
|
758
|
-
|
759
|
-
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.send_chat_action"
|
760
|
-
end
|
823
|
+
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.send_chat_action" if chat_id.nil?
|
761
824
|
# verify the required parameter 'action' is set
|
762
|
-
|
763
|
-
fail ArgumentError, "Missing the required parameter 'action' when calling ChatsApi.send_chat_action"
|
764
|
-
end
|
825
|
+
fail ArgumentError, "Missing the required parameter 'action' when calling ChatsApi.send_chat_action" if action.nil?
|
765
826
|
# verify enum value
|
766
|
-
|
827
|
+
unless ['typing', 'upload_photo', 'record_video', 'upload_video', 'record_audio', 'upload_audio', 'upload_document', 'find_location', 'record_video_note', 'upload_video_note'].include?(action)
|
767
828
|
fail ArgumentError, "invalid value for 'action', must be one of typing, upload_photo, record_video, upload_video, record_audio, upload_audio, upload_document, find_location, record_video_note, upload_video_note"
|
768
829
|
end
|
769
830
|
# resource path
|
770
|
-
local_var_path = "/bot{token}/sendChatAction".sub('{' + 'token' + '}', token.to_s)
|
831
|
+
local_var_path = "/bot{token}/sendChatAction".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
771
832
|
|
772
833
|
# query parameters
|
773
834
|
query_params = {}
|
@@ -776,10 +837,14 @@ module Teleswagger
|
|
776
837
|
|
777
838
|
# header parameters
|
778
839
|
header_params = {}
|
840
|
+
|
779
841
|
# HTTP header 'Accept' (if needed)
|
780
|
-
|
842
|
+
local_header_accept = ['application/json']
|
843
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
844
|
+
|
781
845
|
# HTTP header 'Content-Type'
|
782
|
-
|
846
|
+
local_header_content_type = ['application/json']
|
847
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
783
848
|
|
784
849
|
# form parameters
|
785
850
|
form_params = {}
|
@@ -824,19 +889,13 @@ module Teleswagger
|
|
824
889
|
@api_client.config.logger.debug "Calling API: ChatsApi.set_chat_description ..."
|
825
890
|
end
|
826
891
|
# verify the required parameter 'token' is set
|
827
|
-
|
828
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.set_chat_description"
|
829
|
-
end
|
892
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.set_chat_description" if token.nil?
|
830
893
|
# verify the required parameter 'chat_id' is set
|
831
|
-
|
832
|
-
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.set_chat_description"
|
833
|
-
end
|
894
|
+
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.set_chat_description" if chat_id.nil?
|
834
895
|
# verify the required parameter 'description' is set
|
835
|
-
|
836
|
-
fail ArgumentError, "Missing the required parameter 'description' when calling ChatsApi.set_chat_description"
|
837
|
-
end
|
896
|
+
fail ArgumentError, "Missing the required parameter 'description' when calling ChatsApi.set_chat_description" if description.nil?
|
838
897
|
# resource path
|
839
|
-
local_var_path = "/bot{token}/setChatDescription".sub('{' + 'token' + '}', token.to_s)
|
898
|
+
local_var_path = "/bot{token}/setChatDescription".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
840
899
|
|
841
900
|
# query parameters
|
842
901
|
query_params = {}
|
@@ -845,10 +904,14 @@ module Teleswagger
|
|
845
904
|
|
846
905
|
# header parameters
|
847
906
|
header_params = {}
|
907
|
+
|
848
908
|
# HTTP header 'Accept' (if needed)
|
849
|
-
|
909
|
+
local_header_accept = ['application/json']
|
910
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
911
|
+
|
850
912
|
# HTTP header 'Content-Type'
|
851
|
-
|
913
|
+
local_header_content_type = ['application/json']
|
914
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
852
915
|
|
853
916
|
# form parameters
|
854
917
|
form_params = {}
|
@@ -893,29 +956,27 @@ module Teleswagger
|
|
893
956
|
@api_client.config.logger.debug "Calling API: ChatsApi.set_chat_photo ..."
|
894
957
|
end
|
895
958
|
# verify the required parameter 'token' is set
|
896
|
-
|
897
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.set_chat_photo"
|
898
|
-
end
|
959
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.set_chat_photo" if token.nil?
|
899
960
|
# verify the required parameter 'chat_id' is set
|
900
|
-
|
901
|
-
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.set_chat_photo"
|
902
|
-
end
|
961
|
+
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.set_chat_photo" if chat_id.nil?
|
903
962
|
# verify the required parameter 'photo' is set
|
904
|
-
|
905
|
-
fail ArgumentError, "Missing the required parameter 'photo' when calling ChatsApi.set_chat_photo"
|
906
|
-
end
|
963
|
+
fail ArgumentError, "Missing the required parameter 'photo' when calling ChatsApi.set_chat_photo" if photo.nil?
|
907
964
|
# resource path
|
908
|
-
local_var_path = "/bot{token}/setChatPhoto".sub('{' + 'token' + '}', token.to_s)
|
965
|
+
local_var_path = "/bot{token}/setChatPhoto".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
909
966
|
|
910
967
|
# query parameters
|
911
968
|
query_params = {}
|
912
969
|
|
913
970
|
# header parameters
|
914
971
|
header_params = {}
|
972
|
+
|
915
973
|
# HTTP header 'Accept' (if needed)
|
916
|
-
|
974
|
+
local_header_accept = ['application/json']
|
975
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
976
|
+
|
917
977
|
# HTTP header 'Content-Type'
|
918
|
-
|
978
|
+
local_header_content_type = ['multipart/form-data']
|
979
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
919
980
|
|
920
981
|
# form parameters
|
921
982
|
form_params = {}
|
@@ -938,6 +999,73 @@ module Teleswagger
|
|
938
999
|
return data, status_code, headers
|
939
1000
|
end
|
940
1001
|
|
1002
|
+
#
|
1003
|
+
#
|
1004
|
+
# @param token bot's token to authorize the request
|
1005
|
+
# @param chat_id
|
1006
|
+
# @param sticker_set_name
|
1007
|
+
# @param [Hash] opts the optional parameters
|
1008
|
+
# @return [ResponseBool]
|
1009
|
+
def set_chat_sticker_set(token, chat_id, sticker_set_name, opts = {})
|
1010
|
+
data, _status_code, _headers = set_chat_sticker_set_with_http_info(token, chat_id, sticker_set_name, opts)
|
1011
|
+
return data
|
1012
|
+
end
|
1013
|
+
|
1014
|
+
#
|
1015
|
+
#
|
1016
|
+
# @param token bot's token to authorize the request
|
1017
|
+
# @param chat_id
|
1018
|
+
# @param sticker_set_name
|
1019
|
+
# @param [Hash] opts the optional parameters
|
1020
|
+
# @return [Array<(ResponseBool, Fixnum, Hash)>] ResponseBool data, response status code and response headers
|
1021
|
+
def set_chat_sticker_set_with_http_info(token, chat_id, sticker_set_name, opts = {})
|
1022
|
+
if @api_client.config.debugging
|
1023
|
+
@api_client.config.logger.debug "Calling API: ChatsApi.set_chat_sticker_set ..."
|
1024
|
+
end
|
1025
|
+
# verify the required parameter 'token' is set
|
1026
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.set_chat_sticker_set" if token.nil?
|
1027
|
+
# verify the required parameter 'chat_id' is set
|
1028
|
+
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.set_chat_sticker_set" if chat_id.nil?
|
1029
|
+
# verify the required parameter 'sticker_set_name' is set
|
1030
|
+
fail ArgumentError, "Missing the required parameter 'sticker_set_name' when calling ChatsApi.set_chat_sticker_set" if sticker_set_name.nil?
|
1031
|
+
# resource path
|
1032
|
+
local_var_path = "/bot{token}/setChatStickerSet".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
1033
|
+
|
1034
|
+
# query parameters
|
1035
|
+
query_params = {}
|
1036
|
+
query_params[:'chat_id'] = chat_id
|
1037
|
+
query_params[:'sticker_set_name'] = sticker_set_name
|
1038
|
+
|
1039
|
+
# header parameters
|
1040
|
+
header_params = {}
|
1041
|
+
|
1042
|
+
# HTTP header 'Accept' (if needed)
|
1043
|
+
local_header_accept = ['application/json']
|
1044
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1045
|
+
|
1046
|
+
# HTTP header 'Content-Type'
|
1047
|
+
local_header_content_type = ['application/json']
|
1048
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1049
|
+
|
1050
|
+
# form parameters
|
1051
|
+
form_params = {}
|
1052
|
+
|
1053
|
+
# http body (model)
|
1054
|
+
post_body = nil
|
1055
|
+
auth_names = []
|
1056
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1057
|
+
:header_params => header_params,
|
1058
|
+
:query_params => query_params,
|
1059
|
+
:form_params => form_params,
|
1060
|
+
:body => post_body,
|
1061
|
+
:auth_names => auth_names,
|
1062
|
+
:return_type => 'ResponseBool')
|
1063
|
+
if @api_client.config.debugging
|
1064
|
+
@api_client.config.logger.debug "API called: ChatsApi#set_chat_sticker_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1065
|
+
end
|
1066
|
+
return data, status_code, headers
|
1067
|
+
end
|
1068
|
+
|
941
1069
|
#
|
942
1070
|
#
|
943
1071
|
# @param token bot's token to authorize the request
|
@@ -962,19 +1090,13 @@ module Teleswagger
|
|
962
1090
|
@api_client.config.logger.debug "Calling API: ChatsApi.set_chat_title ..."
|
963
1091
|
end
|
964
1092
|
# verify the required parameter 'token' is set
|
965
|
-
|
966
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.set_chat_title"
|
967
|
-
end
|
1093
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.set_chat_title" if token.nil?
|
968
1094
|
# verify the required parameter 'chat_id' is set
|
969
|
-
|
970
|
-
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.set_chat_title"
|
971
|
-
end
|
1095
|
+
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.set_chat_title" if chat_id.nil?
|
972
1096
|
# verify the required parameter 'title' is set
|
973
|
-
|
974
|
-
fail ArgumentError, "Missing the required parameter 'title' when calling ChatsApi.set_chat_title"
|
975
|
-
end
|
1097
|
+
fail ArgumentError, "Missing the required parameter 'title' when calling ChatsApi.set_chat_title" if title.nil?
|
976
1098
|
# resource path
|
977
|
-
local_var_path = "/bot{token}/setChatTitle".sub('{' + 'token' + '}', token.to_s)
|
1099
|
+
local_var_path = "/bot{token}/setChatTitle".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
978
1100
|
|
979
1101
|
# query parameters
|
980
1102
|
query_params = {}
|
@@ -983,10 +1105,14 @@ module Teleswagger
|
|
983
1105
|
|
984
1106
|
# header parameters
|
985
1107
|
header_params = {}
|
1108
|
+
|
986
1109
|
# HTTP header 'Accept' (if needed)
|
987
|
-
|
1110
|
+
local_header_accept = ['application/json']
|
1111
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1112
|
+
|
988
1113
|
# HTTP header 'Content-Type'
|
989
|
-
|
1114
|
+
local_header_content_type = ['application/json']
|
1115
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
990
1116
|
|
991
1117
|
# form parameters
|
992
1118
|
form_params = {}
|
@@ -1031,19 +1157,13 @@ module Teleswagger
|
|
1031
1157
|
@api_client.config.logger.debug "Calling API: ChatsApi.unban_chat_member ..."
|
1032
1158
|
end
|
1033
1159
|
# verify the required parameter 'token' is set
|
1034
|
-
|
1035
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.unban_chat_member"
|
1036
|
-
end
|
1160
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.unban_chat_member" if token.nil?
|
1037
1161
|
# verify the required parameter 'chat_id' is set
|
1038
|
-
|
1039
|
-
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.unban_chat_member"
|
1040
|
-
end
|
1162
|
+
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.unban_chat_member" if chat_id.nil?
|
1041
1163
|
# verify the required parameter 'user_id' is set
|
1042
|
-
|
1043
|
-
fail ArgumentError, "Missing the required parameter 'user_id' when calling ChatsApi.unban_chat_member"
|
1044
|
-
end
|
1164
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling ChatsApi.unban_chat_member" if user_id.nil?
|
1045
1165
|
# resource path
|
1046
|
-
local_var_path = "/bot{token}/unbanChatMember".sub('{' + 'token' + '}', token.to_s)
|
1166
|
+
local_var_path = "/bot{token}/unbanChatMember".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
1047
1167
|
|
1048
1168
|
# query parameters
|
1049
1169
|
query_params = {}
|
@@ -1052,10 +1172,14 @@ module Teleswagger
|
|
1052
1172
|
|
1053
1173
|
# header parameters
|
1054
1174
|
header_params = {}
|
1175
|
+
|
1055
1176
|
# HTTP header 'Accept' (if needed)
|
1056
|
-
|
1177
|
+
local_header_accept = ['application/json']
|
1178
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1179
|
+
|
1057
1180
|
# HTTP header 'Content-Type'
|
1058
|
-
|
1181
|
+
local_header_content_type = ['application/json']
|
1182
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1059
1183
|
|
1060
1184
|
# form parameters
|
1061
1185
|
form_params = {}
|
@@ -1098,15 +1222,11 @@ module Teleswagger
|
|
1098
1222
|
@api_client.config.logger.debug "Calling API: ChatsApi.unpin_chat_message ..."
|
1099
1223
|
end
|
1100
1224
|
# verify the required parameter 'token' is set
|
1101
|
-
|
1102
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.unpin_chat_message"
|
1103
|
-
end
|
1225
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.unpin_chat_message" if token.nil?
|
1104
1226
|
# verify the required parameter 'chat_id' is set
|
1105
|
-
|
1106
|
-
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.unpin_chat_message"
|
1107
|
-
end
|
1227
|
+
fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.unpin_chat_message" if chat_id.nil?
|
1108
1228
|
# resource path
|
1109
|
-
local_var_path = "/bot{token}/unpinChatMessage".sub('{' + 'token' + '}', token.to_s)
|
1229
|
+
local_var_path = "/bot{token}/unpinChatMessage".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
1110
1230
|
|
1111
1231
|
# query parameters
|
1112
1232
|
query_params = {}
|
@@ -1114,10 +1234,14 @@ module Teleswagger
|
|
1114
1234
|
|
1115
1235
|
# header parameters
|
1116
1236
|
header_params = {}
|
1237
|
+
|
1117
1238
|
# HTTP header 'Accept' (if needed)
|
1118
|
-
|
1239
|
+
local_header_accept = ['application/json']
|
1240
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1241
|
+
|
1119
1242
|
# HTTP header 'Content-Type'
|
1120
|
-
|
1243
|
+
local_header_content_type = ['application/json']
|
1244
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1121
1245
|
|
1122
1246
|
# form parameters
|
1123
1247
|
form_params = {}
|