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
data/docs/SendInvoiceBody.md
CHANGED
@@ -11,6 +11,7 @@ Name | Type | Description | Notes
|
|
11
11
|
**start_parameter** | **String** | |
|
12
12
|
**currency** | **String** | |
|
13
13
|
**prices** | [**Array<LabeledPrice>**](LabeledPrice.md) | |
|
14
|
+
**provider_data** | **String** | | [optional]
|
14
15
|
**photo_url** | **String** | | [optional]
|
15
16
|
**photo_size** | **Integer** | | [optional]
|
16
17
|
**photo_width** | **Integer** | | [optional]
|
data/docs/SendLocationBody.md
CHANGED
@@ -0,0 +1,11 @@
|
|
1
|
+
# Teleswagger::SendMediaGroupLinkBody
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**chat_id** | **Object** | |
|
7
|
+
**media** | **Array<Object>** | |
|
8
|
+
**disable_notification** | **BOOLEAN** | | [optional]
|
9
|
+
**reply_to_message_id** | **Integer** | | [optional]
|
10
|
+
|
11
|
+
|
data/docs/StickersApi.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Teleswagger::StickersApi
|
2
2
|
|
3
|
-
All URIs are relative to *https://api.telegram.org
|
3
|
+
All URIs are relative to *https://api.telegram.org/*
|
4
4
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
@@ -292,7 +292,7 @@ No authorization required
|
|
292
292
|
|
293
293
|
|
294
294
|
# **get_sticker_set**
|
295
|
-
>
|
295
|
+
> InlineResponse2008 get_sticker_set(token, name)
|
296
296
|
|
297
297
|
|
298
298
|
|
@@ -327,7 +327,7 @@ Name | Type | Description | Notes
|
|
327
327
|
|
328
328
|
### Return type
|
329
329
|
|
330
|
-
[**
|
330
|
+
[**InlineResponse2008**](InlineResponse2008.md)
|
331
331
|
|
332
332
|
### Authorization
|
333
333
|
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Teleswagger::StopMessageLiveLocationBody
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**chat_id** | **Object** | | [optional]
|
7
|
+
**message_id** | **Integer** | | [optional]
|
8
|
+
**inline_message_id** | **String** | | [optional]
|
9
|
+
**reply_markup** | **Object** | | [optional]
|
10
|
+
|
11
|
+
|
data/docs/UpdatesApi.md
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# Teleswagger::UpdatesApi
|
2
2
|
|
3
|
-
All URIs are relative to *https://api.telegram.org
|
3
|
+
All URIs are relative to *https://api.telegram.org/*
|
4
4
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
7
7
|
[**delete_webhook**](UpdatesApi.md#delete_webhook) | **GET** /bot{token}/deleteWebhook |
|
8
|
-
[**get_updates**](UpdatesApi.md#get_updates) | **
|
8
|
+
[**get_updates**](UpdatesApi.md#get_updates) | **POST** /bot{token}/getUpdates |
|
9
9
|
[**get_webhook_info**](UpdatesApi.md#get_webhook_info) | **GET** /bot{token}/getWebhookInfo |
|
10
10
|
[**set_webhook**](UpdatesApi.md#set_webhook) | **POST** /bot{token}/setWebhook |
|
11
11
|
|
@@ -68,9 +68,7 @@ token = "token_example" # String | bot's token to authorize the request
|
|
68
68
|
|
69
69
|
opts = {
|
70
70
|
offset: 56, # Integer |
|
71
|
-
|
72
|
-
timeout: 56, # Integer |
|
73
|
-
allowed_updates: ["allowed_updates_example"] # Array<String> |
|
71
|
+
body: Teleswagger::GetUpdatesBody.new # GetUpdatesBody |
|
74
72
|
}
|
75
73
|
|
76
74
|
begin
|
@@ -87,9 +85,7 @@ Name | Type | Description | Notes
|
|
87
85
|
------------- | ------------- | ------------- | -------------
|
88
86
|
**token** | **String**| bot's token to authorize the request |
|
89
87
|
**offset** | **Integer**| | [optional]
|
90
|
-
**
|
91
|
-
**timeout** | **Integer**| | [optional]
|
92
|
-
**allowed_updates** | [**Array<String>**](String.md)| | [optional]
|
88
|
+
**body** | [**GetUpdatesBody**](GetUpdatesBody.md)| | [optional]
|
93
89
|
|
94
90
|
### Return type
|
95
91
|
|
data/docs/UsersApi.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Teleswagger::UsersApi
|
2
2
|
|
3
|
-
All URIs are relative to *https://api.telegram.org
|
3
|
+
All URIs are relative to *https://api.telegram.org/*
|
4
4
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
@@ -9,7 +9,7 @@ Method | HTTP request | Description
|
|
9
9
|
|
10
10
|
|
11
11
|
# **get_me**
|
12
|
-
>
|
12
|
+
> InlineResponse2007 get_me(token, )
|
13
13
|
|
14
14
|
|
15
15
|
|
@@ -41,7 +41,7 @@ Name | Type | Description | Notes
|
|
41
41
|
|
42
42
|
### Return type
|
43
43
|
|
44
|
-
[**
|
44
|
+
[**InlineResponse2007**](InlineResponse2007.md)
|
45
45
|
|
46
46
|
### Authorization
|
47
47
|
|
@@ -55,7 +55,7 @@ No authorization required
|
|
55
55
|
|
56
56
|
|
57
57
|
# **get_user_profile_photos**
|
58
|
-
>
|
58
|
+
> InlineResponse2009 get_user_profile_photos(token, user_id, opts)
|
59
59
|
|
60
60
|
|
61
61
|
|
@@ -96,7 +96,7 @@ Name | Type | Description | Notes
|
|
96
96
|
|
97
97
|
### Return type
|
98
98
|
|
99
|
-
[**
|
99
|
+
[**InlineResponse2009**](InlineResponse2009.md)
|
100
100
|
|
101
101
|
### Authorization
|
102
102
|
|
data/git_push.sh
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
#
|
3
|
+
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
#
|
17
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
18
|
+
#
|
19
|
+
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
20
|
+
|
21
|
+
git_user_id=$1
|
22
|
+
git_repo_id=$2
|
23
|
+
release_note=$3
|
24
|
+
|
25
|
+
if [ "$git_user_id" = "" ]; then
|
26
|
+
git_user_id="GIT_USER_ID"
|
27
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
28
|
+
fi
|
29
|
+
|
30
|
+
if [ "$git_repo_id" = "" ]; then
|
31
|
+
git_repo_id="GIT_REPO_ID"
|
32
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
33
|
+
fi
|
34
|
+
|
35
|
+
if [ "$release_note" = "" ]; then
|
36
|
+
release_note="Minor update"
|
37
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
38
|
+
fi
|
39
|
+
|
40
|
+
# Initialize the local directory as a Git repository
|
41
|
+
git init
|
42
|
+
|
43
|
+
# Adds the files in the local repository and stages them for commit.
|
44
|
+
git add .
|
45
|
+
|
46
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
47
|
+
git commit -m "$release_note"
|
48
|
+
|
49
|
+
# Sets the new remote
|
50
|
+
git_remote=`git remote`
|
51
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
52
|
+
|
53
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
54
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
55
|
+
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
56
|
+
else
|
57
|
+
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
58
|
+
fi
|
59
|
+
|
60
|
+
fi
|
61
|
+
|
62
|
+
git pull origin master
|
63
|
+
|
64
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
65
|
+
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
66
|
+
git push origin master 2>&1 | grep -v 'To https'
|
67
|
+
|
data/lib/teleswagger.rb
CHANGED
@@ -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
|
|
@@ -20,6 +31,7 @@ require 'teleswagger/configuration'
|
|
20
31
|
require 'teleswagger/models/add_sticker_to_set_link_body'
|
21
32
|
require 'teleswagger/models/allowed_update'
|
22
33
|
require 'teleswagger/models/animation'
|
34
|
+
require 'teleswagger/models/answer_callback_query_body'
|
23
35
|
require 'teleswagger/models/answer_inline_query_body'
|
24
36
|
require 'teleswagger/models/answer_shipping_query_body'
|
25
37
|
require 'teleswagger/models/audio'
|
@@ -33,6 +45,7 @@ require 'teleswagger/models/contact'
|
|
33
45
|
require 'teleswagger/models/create_new_sticker_set_link_body'
|
34
46
|
require 'teleswagger/models/document'
|
35
47
|
require 'teleswagger/models/edit_message_caption_body'
|
48
|
+
require 'teleswagger/models/edit_message_live_location_body'
|
36
49
|
require 'teleswagger/models/edit_message_reply_markup_body'
|
37
50
|
require 'teleswagger/models/edit_message_text_body'
|
38
51
|
require 'teleswagger/models/error'
|
@@ -40,6 +53,7 @@ require 'teleswagger/models/file'
|
|
40
53
|
require 'teleswagger/models/force_reply'
|
41
54
|
require 'teleswagger/models/game'
|
42
55
|
require 'teleswagger/models/game_high_score'
|
56
|
+
require 'teleswagger/models/get_updates_body'
|
43
57
|
require 'teleswagger/models/inline_keyboard_button'
|
44
58
|
require 'teleswagger/models/inline_keyboard_markup'
|
45
59
|
require 'teleswagger/models/inline_query'
|
@@ -76,6 +90,8 @@ require 'teleswagger/models/inline_response_200_9'
|
|
76
90
|
require 'teleswagger/models/inline_type'
|
77
91
|
require 'teleswagger/models/input_contact_message_content'
|
78
92
|
require 'teleswagger/models/input_location_message_content'
|
93
|
+
require 'teleswagger/models/input_media_photo'
|
94
|
+
require 'teleswagger/models/input_media_video'
|
79
95
|
require 'teleswagger/models/input_text_message_content'
|
80
96
|
require 'teleswagger/models/input_venue_message_content'
|
81
97
|
require 'teleswagger/models/invoice'
|
@@ -103,6 +119,7 @@ require 'teleswagger/models/send_document_link_body'
|
|
103
119
|
require 'teleswagger/models/send_game_body'
|
104
120
|
require 'teleswagger/models/send_invoice_body'
|
105
121
|
require 'teleswagger/models/send_location_body'
|
122
|
+
require 'teleswagger/models/send_media_group_link_body'
|
106
123
|
require 'teleswagger/models/send_message_body'
|
107
124
|
require 'teleswagger/models/send_photo_link_body'
|
108
125
|
require 'teleswagger/models/send_sticker_link_body'
|
@@ -115,6 +132,7 @@ require 'teleswagger/models/shipping_option'
|
|
115
132
|
require 'teleswagger/models/shipping_query'
|
116
133
|
require 'teleswagger/models/sticker'
|
117
134
|
require 'teleswagger/models/sticker_set'
|
135
|
+
require 'teleswagger/models/stop_message_live_location_body'
|
118
136
|
require 'teleswagger/models/successful_payment'
|
119
137
|
require 'teleswagger/models/update'
|
120
138
|
require 'teleswagger/models/user'
|
@@ -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
|
|
@@ -20,12 +31,71 @@ module Teleswagger
|
|
20
31
|
@api_client = api_client
|
21
32
|
end
|
22
33
|
|
34
|
+
#
|
35
|
+
#
|
36
|
+
# @param token bot's token to authorize the request
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @option opts [EditMessageLiveLocationBody] :body
|
39
|
+
# @return [ResponseMessage]
|
40
|
+
def edit_message_live_location(token, opts = {})
|
41
|
+
data, _status_code, _headers = edit_message_live_location_with_http_info(token, opts)
|
42
|
+
return data
|
43
|
+
end
|
44
|
+
|
45
|
+
#
|
46
|
+
#
|
47
|
+
# @param token bot's token to authorize the request
|
48
|
+
# @param [Hash] opts the optional parameters
|
49
|
+
# @option opts [EditMessageLiveLocationBody] :body
|
50
|
+
# @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
|
51
|
+
def edit_message_live_location_with_http_info(token, opts = {})
|
52
|
+
if @api_client.config.debugging
|
53
|
+
@api_client.config.logger.debug "Calling API: AttachmentsApi.edit_message_live_location ..."
|
54
|
+
end
|
55
|
+
# verify the required parameter 'token' is set
|
56
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.edit_message_live_location" if token.nil?
|
57
|
+
# resource path
|
58
|
+
local_var_path = "/bot{token}/editMessageLiveLocation".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
59
|
+
|
60
|
+
# query parameters
|
61
|
+
query_params = {}
|
62
|
+
|
63
|
+
# header parameters
|
64
|
+
header_params = {}
|
65
|
+
|
66
|
+
# HTTP header 'Accept' (if needed)
|
67
|
+
local_header_accept = ['application/json']
|
68
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
69
|
+
|
70
|
+
# HTTP header 'Content-Type'
|
71
|
+
local_header_content_type = ['application/json']
|
72
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
73
|
+
|
74
|
+
# form parameters
|
75
|
+
form_params = {}
|
76
|
+
|
77
|
+
# http body (model)
|
78
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
79
|
+
auth_names = []
|
80
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
81
|
+
:header_params => header_params,
|
82
|
+
:query_params => query_params,
|
83
|
+
:form_params => form_params,
|
84
|
+
:body => post_body,
|
85
|
+
:auth_names => auth_names,
|
86
|
+
:return_type => 'ResponseMessage')
|
87
|
+
if @api_client.config.debugging
|
88
|
+
@api_client.config.logger.debug "API called: AttachmentsApi#edit_message_live_location\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
89
|
+
end
|
90
|
+
return data, status_code, headers
|
91
|
+
end
|
92
|
+
|
23
93
|
#
|
24
94
|
#
|
25
95
|
# @param token bot's token to authorize the request
|
26
96
|
# @param file_id
|
27
97
|
# @param [Hash] opts the optional parameters
|
28
|
-
# @return [
|
98
|
+
# @return [InlineResponse2005]
|
29
99
|
def get_file(token, file_id, opts = {})
|
30
100
|
data, _status_code, _headers = get_file_with_http_info(token, file_id, opts)
|
31
101
|
return data
|
@@ -36,21 +106,17 @@ module Teleswagger
|
|
36
106
|
# @param token bot's token to authorize the request
|
37
107
|
# @param file_id
|
38
108
|
# @param [Hash] opts the optional parameters
|
39
|
-
# @return [Array<(
|
109
|
+
# @return [Array<(InlineResponse2005, Fixnum, Hash)>] InlineResponse2005 data, response status code and response headers
|
40
110
|
def get_file_with_http_info(token, file_id, opts = {})
|
41
111
|
if @api_client.config.debugging
|
42
112
|
@api_client.config.logger.debug "Calling API: AttachmentsApi.get_file ..."
|
43
113
|
end
|
44
114
|
# verify the required parameter 'token' is set
|
45
|
-
|
46
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.get_file"
|
47
|
-
end
|
115
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.get_file" if token.nil?
|
48
116
|
# verify the required parameter 'file_id' is set
|
49
|
-
|
50
|
-
fail ArgumentError, "Missing the required parameter 'file_id' when calling AttachmentsApi.get_file"
|
51
|
-
end
|
117
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling AttachmentsApi.get_file" if file_id.nil?
|
52
118
|
# resource path
|
53
|
-
local_var_path = "/bot{token}/getFile".sub('{' + 'token' + '}', token.to_s)
|
119
|
+
local_var_path = "/bot{token}/getFile".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
54
120
|
|
55
121
|
# query parameters
|
56
122
|
query_params = {}
|
@@ -58,10 +124,14 @@ module Teleswagger
|
|
58
124
|
|
59
125
|
# header parameters
|
60
126
|
header_params = {}
|
127
|
+
|
61
128
|
# HTTP header 'Accept' (if needed)
|
62
|
-
|
129
|
+
local_header_accept = ['application/json']
|
130
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
131
|
+
|
63
132
|
# HTTP header 'Content-Type'
|
64
|
-
|
133
|
+
local_header_content_type = ['application/json']
|
134
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
65
135
|
|
66
136
|
# form parameters
|
67
137
|
form_params = {}
|
@@ -75,7 +145,7 @@ module Teleswagger
|
|
75
145
|
:form_params => form_params,
|
76
146
|
:body => post_body,
|
77
147
|
:auth_names => auth_names,
|
78
|
-
:return_type => '
|
148
|
+
:return_type => 'InlineResponse2005')
|
79
149
|
if @api_client.config.debugging
|
80
150
|
@api_client.config.logger.debug "API called: AttachmentsApi#get_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
81
151
|
end
|
@@ -89,6 +159,7 @@ module Teleswagger
|
|
89
159
|
# @param audio
|
90
160
|
# @param [Hash] opts the optional parameters
|
91
161
|
# @option opts [String] :caption
|
162
|
+
# @option opts [String] :parse_mode
|
92
163
|
# @option opts [Integer] :duration
|
93
164
|
# @option opts [String] :performer
|
94
165
|
# @option opts [String] :title
|
@@ -108,6 +179,7 @@ module Teleswagger
|
|
108
179
|
# @param audio
|
109
180
|
# @param [Hash] opts the optional parameters
|
110
181
|
# @option opts [String] :caption
|
182
|
+
# @option opts [String] :parse_mode
|
111
183
|
# @option opts [Integer] :duration
|
112
184
|
# @option opts [String] :performer
|
113
185
|
# @option opts [String] :title
|
@@ -120,35 +192,34 @@ module Teleswagger
|
|
120
192
|
@api_client.config.logger.debug "Calling API: AttachmentsApi.send_audio ..."
|
121
193
|
end
|
122
194
|
# verify the required parameter 'token' is set
|
123
|
-
|
124
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_audio"
|
125
|
-
end
|
195
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_audio" if token.nil?
|
126
196
|
# verify the required parameter 'chat_id' is set
|
127
|
-
|
128
|
-
fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_audio"
|
129
|
-
end
|
197
|
+
fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_audio" if chat_id.nil?
|
130
198
|
# verify the required parameter 'audio' is set
|
131
|
-
|
132
|
-
fail ArgumentError, "Missing the required parameter 'audio' when calling AttachmentsApi.send_audio"
|
133
|
-
end
|
199
|
+
fail ArgumentError, "Missing the required parameter 'audio' when calling AttachmentsApi.send_audio" if audio.nil?
|
134
200
|
# resource path
|
135
|
-
local_var_path = "/bot{token}/sendAudio".sub('{' + 'token' + '}', token.to_s)
|
201
|
+
local_var_path = "/bot{token}/sendAudio".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
136
202
|
|
137
203
|
# query parameters
|
138
204
|
query_params = {}
|
139
205
|
|
140
206
|
# header parameters
|
141
207
|
header_params = {}
|
208
|
+
|
142
209
|
# HTTP header 'Accept' (if needed)
|
143
|
-
|
210
|
+
local_header_accept = ['application/json']
|
211
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
212
|
+
|
144
213
|
# HTTP header 'Content-Type'
|
145
|
-
|
214
|
+
local_header_content_type = ['multipart/form-data']
|
215
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
146
216
|
|
147
217
|
# form parameters
|
148
218
|
form_params = {}
|
149
219
|
form_params["chat_id"] = chat_id
|
150
220
|
form_params["audio"] = audio
|
151
221
|
form_params["caption"] = opts[:'caption'] if !opts[:'caption'].nil?
|
222
|
+
form_params["parse_mode"] = opts[:'parse_mode'] if !opts[:'parse_mode'].nil?
|
152
223
|
form_params["duration"] = opts[:'duration'] if !opts[:'duration'].nil?
|
153
224
|
form_params["performer"] = opts[:'performer'] if !opts[:'performer'].nil?
|
154
225
|
form_params["title"] = opts[:'title'] if !opts[:'title'].nil?
|
@@ -194,21 +265,23 @@ module Teleswagger
|
|
194
265
|
@api_client.config.logger.debug "Calling API: AttachmentsApi.send_audio_link ..."
|
195
266
|
end
|
196
267
|
# verify the required parameter 'token' is set
|
197
|
-
|
198
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_audio_link"
|
199
|
-
end
|
268
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_audio_link" if token.nil?
|
200
269
|
# resource path
|
201
|
-
local_var_path = "/bot{token}/sendAudio#link".sub('{' + 'token' + '}', token.to_s)
|
270
|
+
local_var_path = "/bot{token}/sendAudio#link".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
202
271
|
|
203
272
|
# query parameters
|
204
273
|
query_params = {}
|
205
274
|
|
206
275
|
# header parameters
|
207
276
|
header_params = {}
|
277
|
+
|
208
278
|
# HTTP header 'Accept' (if needed)
|
209
|
-
|
279
|
+
local_header_accept = ['application/json']
|
280
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
281
|
+
|
210
282
|
# HTTP header 'Content-Type'
|
211
|
-
|
283
|
+
local_header_content_type = ['application/json']
|
284
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
212
285
|
|
213
286
|
# form parameters
|
214
287
|
form_params = {}
|
@@ -251,21 +324,23 @@ module Teleswagger
|
|
251
324
|
@api_client.config.logger.debug "Calling API: AttachmentsApi.send_contact ..."
|
252
325
|
end
|
253
326
|
# verify the required parameter 'token' is set
|
254
|
-
|
255
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_contact"
|
256
|
-
end
|
327
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_contact" if token.nil?
|
257
328
|
# resource path
|
258
|
-
local_var_path = "/bot{token}/sendContact".sub('{' + 'token' + '}', token.to_s)
|
329
|
+
local_var_path = "/bot{token}/sendContact".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
259
330
|
|
260
331
|
# query parameters
|
261
332
|
query_params = {}
|
262
333
|
|
263
334
|
# header parameters
|
264
335
|
header_params = {}
|
336
|
+
|
265
337
|
# HTTP header 'Accept' (if needed)
|
266
|
-
|
338
|
+
local_header_accept = ['application/json']
|
339
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
340
|
+
|
267
341
|
# HTTP header 'Content-Type'
|
268
|
-
|
342
|
+
local_header_content_type = ['application/json']
|
343
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
269
344
|
|
270
345
|
# form parameters
|
271
346
|
form_params = {}
|
@@ -293,6 +368,7 @@ module Teleswagger
|
|
293
368
|
# @param document
|
294
369
|
# @param [Hash] opts the optional parameters
|
295
370
|
# @option opts [String] :caption
|
371
|
+
# @option opts [String] :parse_mode
|
296
372
|
# @option opts [BOOLEAN] :disable_notification
|
297
373
|
# @option opts [Integer] :reply_to_message_id
|
298
374
|
# @option opts [String] :reply_markup json string of reply_markup object
|
@@ -309,6 +385,7 @@ module Teleswagger
|
|
309
385
|
# @param document
|
310
386
|
# @param [Hash] opts the optional parameters
|
311
387
|
# @option opts [String] :caption
|
388
|
+
# @option opts [String] :parse_mode
|
312
389
|
# @option opts [BOOLEAN] :disable_notification
|
313
390
|
# @option opts [Integer] :reply_to_message_id
|
314
391
|
# @option opts [String] :reply_markup json string of reply_markup object
|
@@ -318,35 +395,34 @@ module Teleswagger
|
|
318
395
|
@api_client.config.logger.debug "Calling API: AttachmentsApi.send_document ..."
|
319
396
|
end
|
320
397
|
# verify the required parameter 'token' is set
|
321
|
-
|
322
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_document"
|
323
|
-
end
|
398
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_document" if token.nil?
|
324
399
|
# verify the required parameter 'chat_id' is set
|
325
|
-
|
326
|
-
fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_document"
|
327
|
-
end
|
400
|
+
fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_document" if chat_id.nil?
|
328
401
|
# verify the required parameter 'document' is set
|
329
|
-
|
330
|
-
fail ArgumentError, "Missing the required parameter 'document' when calling AttachmentsApi.send_document"
|
331
|
-
end
|
402
|
+
fail ArgumentError, "Missing the required parameter 'document' when calling AttachmentsApi.send_document" if document.nil?
|
332
403
|
# resource path
|
333
|
-
local_var_path = "/bot{token}/sendDocument".sub('{' + 'token' + '}', token.to_s)
|
404
|
+
local_var_path = "/bot{token}/sendDocument".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
334
405
|
|
335
406
|
# query parameters
|
336
407
|
query_params = {}
|
337
408
|
|
338
409
|
# header parameters
|
339
410
|
header_params = {}
|
411
|
+
|
340
412
|
# HTTP header 'Accept' (if needed)
|
341
|
-
|
413
|
+
local_header_accept = ['application/json']
|
414
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
415
|
+
|
342
416
|
# HTTP header 'Content-Type'
|
343
|
-
|
417
|
+
local_header_content_type = ['multipart/form-data']
|
418
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
344
419
|
|
345
420
|
# form parameters
|
346
421
|
form_params = {}
|
347
422
|
form_params["chat_id"] = chat_id
|
348
423
|
form_params["document"] = document
|
349
424
|
form_params["caption"] = opts[:'caption'] if !opts[:'caption'].nil?
|
425
|
+
form_params["parse_mode"] = opts[:'parse_mode'] if !opts[:'parse_mode'].nil?
|
350
426
|
form_params["disable_notification"] = opts[:'disable_notification'] if !opts[:'disable_notification'].nil?
|
351
427
|
form_params["reply_to_message_id"] = opts[:'reply_to_message_id'] if !opts[:'reply_to_message_id'].nil?
|
352
428
|
form_params["reply_markup"] = opts[:'reply_markup'] if !opts[:'reply_markup'].nil?
|
@@ -389,21 +465,23 @@ module Teleswagger
|
|
389
465
|
@api_client.config.logger.debug "Calling API: AttachmentsApi.send_document_link ..."
|
390
466
|
end
|
391
467
|
# verify the required parameter 'token' is set
|
392
|
-
|
393
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_document_link"
|
394
|
-
end
|
468
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_document_link" if token.nil?
|
395
469
|
# resource path
|
396
|
-
local_var_path = "/bot{token}/sendDocument#link".sub('{' + 'token' + '}', token.to_s)
|
470
|
+
local_var_path = "/bot{token}/sendDocument#link".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
397
471
|
|
398
472
|
# query parameters
|
399
473
|
query_params = {}
|
400
474
|
|
401
475
|
# header parameters
|
402
476
|
header_params = {}
|
477
|
+
|
403
478
|
# HTTP header 'Accept' (if needed)
|
404
|
-
|
479
|
+
local_header_accept = ['application/json']
|
480
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
481
|
+
|
405
482
|
# HTTP header 'Content-Type'
|
406
|
-
|
483
|
+
local_header_content_type = ['application/json']
|
484
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
407
485
|
|
408
486
|
# form parameters
|
409
487
|
form_params = {}
|
@@ -446,21 +524,23 @@ module Teleswagger
|
|
446
524
|
@api_client.config.logger.debug "Calling API: AttachmentsApi.send_location ..."
|
447
525
|
end
|
448
526
|
# verify the required parameter 'token' is set
|
449
|
-
|
450
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_location"
|
451
|
-
end
|
527
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_location" if token.nil?
|
452
528
|
# resource path
|
453
|
-
local_var_path = "/bot{token}/sendLocation".sub('{' + 'token' + '}', token.to_s)
|
529
|
+
local_var_path = "/bot{token}/sendLocation".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
454
530
|
|
455
531
|
# query parameters
|
456
532
|
query_params = {}
|
457
533
|
|
458
534
|
# header parameters
|
459
535
|
header_params = {}
|
536
|
+
|
460
537
|
# HTTP header 'Accept' (if needed)
|
461
|
-
|
538
|
+
local_header_accept = ['application/json']
|
539
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
540
|
+
|
462
541
|
# HTTP header 'Content-Type'
|
463
|
-
|
542
|
+
local_header_content_type = ['application/json']
|
543
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
464
544
|
|
465
545
|
# form parameters
|
466
546
|
form_params = {}
|
@@ -481,6 +561,65 @@ module Teleswagger
|
|
481
561
|
return data, status_code, headers
|
482
562
|
end
|
483
563
|
|
564
|
+
#
|
565
|
+
#
|
566
|
+
# @param token bot's token to authorize the request
|
567
|
+
# @param [Hash] opts the optional parameters
|
568
|
+
# @option opts [SendMediaGroupLinkBody] :body
|
569
|
+
# @return [ResponseMessage]
|
570
|
+
def send_media_group_link(token, opts = {})
|
571
|
+
data, _status_code, _headers = send_media_group_link_with_http_info(token, opts)
|
572
|
+
return data
|
573
|
+
end
|
574
|
+
|
575
|
+
#
|
576
|
+
#
|
577
|
+
# @param token bot's token to authorize the request
|
578
|
+
# @param [Hash] opts the optional parameters
|
579
|
+
# @option opts [SendMediaGroupLinkBody] :body
|
580
|
+
# @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
|
581
|
+
def send_media_group_link_with_http_info(token, opts = {})
|
582
|
+
if @api_client.config.debugging
|
583
|
+
@api_client.config.logger.debug "Calling API: AttachmentsApi.send_media_group_link ..."
|
584
|
+
end
|
585
|
+
# verify the required parameter 'token' is set
|
586
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_media_group_link" if token.nil?
|
587
|
+
# resource path
|
588
|
+
local_var_path = "/bot{token}/sendMediaGroup#link".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
589
|
+
|
590
|
+
# query parameters
|
591
|
+
query_params = {}
|
592
|
+
|
593
|
+
# header parameters
|
594
|
+
header_params = {}
|
595
|
+
|
596
|
+
# HTTP header 'Accept' (if needed)
|
597
|
+
local_header_accept = ['application/json']
|
598
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
599
|
+
|
600
|
+
# HTTP header 'Content-Type'
|
601
|
+
local_header_content_type = ['application/json']
|
602
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
603
|
+
|
604
|
+
# form parameters
|
605
|
+
form_params = {}
|
606
|
+
|
607
|
+
# http body (model)
|
608
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
609
|
+
auth_names = []
|
610
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
611
|
+
:header_params => header_params,
|
612
|
+
:query_params => query_params,
|
613
|
+
:form_params => form_params,
|
614
|
+
:body => post_body,
|
615
|
+
:auth_names => auth_names,
|
616
|
+
:return_type => 'ResponseMessage')
|
617
|
+
if @api_client.config.debugging
|
618
|
+
@api_client.config.logger.debug "API called: AttachmentsApi#send_media_group_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
619
|
+
end
|
620
|
+
return data, status_code, headers
|
621
|
+
end
|
622
|
+
|
484
623
|
#
|
485
624
|
#
|
486
625
|
# @param token bot's token to authorize the request
|
@@ -488,6 +627,7 @@ module Teleswagger
|
|
488
627
|
# @param photo
|
489
628
|
# @param [Hash] opts the optional parameters
|
490
629
|
# @option opts [String] :caption
|
630
|
+
# @option opts [String] :parse_mode
|
491
631
|
# @option opts [BOOLEAN] :disable_notification
|
492
632
|
# @option opts [Integer] :reply_to_message_id
|
493
633
|
# @option opts [String] :reply_markup json string of reply_markup object
|
@@ -504,6 +644,7 @@ module Teleswagger
|
|
504
644
|
# @param photo
|
505
645
|
# @param [Hash] opts the optional parameters
|
506
646
|
# @option opts [String] :caption
|
647
|
+
# @option opts [String] :parse_mode
|
507
648
|
# @option opts [BOOLEAN] :disable_notification
|
508
649
|
# @option opts [Integer] :reply_to_message_id
|
509
650
|
# @option opts [String] :reply_markup json string of reply_markup object
|
@@ -513,35 +654,34 @@ module Teleswagger
|
|
513
654
|
@api_client.config.logger.debug "Calling API: AttachmentsApi.send_photo ..."
|
514
655
|
end
|
515
656
|
# verify the required parameter 'token' is set
|
516
|
-
|
517
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_photo"
|
518
|
-
end
|
657
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_photo" if token.nil?
|
519
658
|
# verify the required parameter 'chat_id' is set
|
520
|
-
|
521
|
-
fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_photo"
|
522
|
-
end
|
659
|
+
fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_photo" if chat_id.nil?
|
523
660
|
# verify the required parameter 'photo' is set
|
524
|
-
|
525
|
-
fail ArgumentError, "Missing the required parameter 'photo' when calling AttachmentsApi.send_photo"
|
526
|
-
end
|
661
|
+
fail ArgumentError, "Missing the required parameter 'photo' when calling AttachmentsApi.send_photo" if photo.nil?
|
527
662
|
# resource path
|
528
|
-
local_var_path = "/bot{token}/sendPhoto".sub('{' + 'token' + '}', token.to_s)
|
663
|
+
local_var_path = "/bot{token}/sendPhoto".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
529
664
|
|
530
665
|
# query parameters
|
531
666
|
query_params = {}
|
532
667
|
|
533
668
|
# header parameters
|
534
669
|
header_params = {}
|
670
|
+
|
535
671
|
# HTTP header 'Accept' (if needed)
|
536
|
-
|
672
|
+
local_header_accept = ['application/json']
|
673
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
674
|
+
|
537
675
|
# HTTP header 'Content-Type'
|
538
|
-
|
676
|
+
local_header_content_type = ['multipart/form-data']
|
677
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
539
678
|
|
540
679
|
# form parameters
|
541
680
|
form_params = {}
|
542
681
|
form_params["chat_id"] = chat_id
|
543
682
|
form_params["photo"] = photo
|
544
683
|
form_params["caption"] = opts[:'caption'] if !opts[:'caption'].nil?
|
684
|
+
form_params["parse_mode"] = opts[:'parse_mode'] if !opts[:'parse_mode'].nil?
|
545
685
|
form_params["disable_notification"] = opts[:'disable_notification'] if !opts[:'disable_notification'].nil?
|
546
686
|
form_params["reply_to_message_id"] = opts[:'reply_to_message_id'] if !opts[:'reply_to_message_id'].nil?
|
547
687
|
form_params["reply_markup"] = opts[:'reply_markup'] if !opts[:'reply_markup'].nil?
|
@@ -584,21 +724,23 @@ module Teleswagger
|
|
584
724
|
@api_client.config.logger.debug "Calling API: AttachmentsApi.send_photo_link ..."
|
585
725
|
end
|
586
726
|
# verify the required parameter 'token' is set
|
587
|
-
|
588
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_photo_link"
|
589
|
-
end
|
727
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_photo_link" if token.nil?
|
590
728
|
# resource path
|
591
|
-
local_var_path = "/bot{token}/sendPhoto#link".sub('{' + 'token' + '}', token.to_s)
|
729
|
+
local_var_path = "/bot{token}/sendPhoto#link".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
592
730
|
|
593
731
|
# query parameters
|
594
732
|
query_params = {}
|
595
733
|
|
596
734
|
# header parameters
|
597
735
|
header_params = {}
|
736
|
+
|
598
737
|
# HTTP header 'Accept' (if needed)
|
599
|
-
|
738
|
+
local_header_accept = ['application/json']
|
739
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
740
|
+
|
600
741
|
# HTTP header 'Content-Type'
|
601
|
-
|
742
|
+
local_header_content_type = ['application/json']
|
743
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
602
744
|
|
603
745
|
# form parameters
|
604
746
|
form_params = {}
|
@@ -649,29 +791,27 @@ module Teleswagger
|
|
649
791
|
@api_client.config.logger.debug "Calling API: AttachmentsApi.send_sticker ..."
|
650
792
|
end
|
651
793
|
# verify the required parameter 'token' is set
|
652
|
-
|
653
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_sticker"
|
654
|
-
end
|
794
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_sticker" if token.nil?
|
655
795
|
# verify the required parameter 'chat_id' is set
|
656
|
-
|
657
|
-
fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_sticker"
|
658
|
-
end
|
796
|
+
fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_sticker" if chat_id.nil?
|
659
797
|
# verify the required parameter 'sticker' is set
|
660
|
-
|
661
|
-
fail ArgumentError, "Missing the required parameter 'sticker' when calling AttachmentsApi.send_sticker"
|
662
|
-
end
|
798
|
+
fail ArgumentError, "Missing the required parameter 'sticker' when calling AttachmentsApi.send_sticker" if sticker.nil?
|
663
799
|
# resource path
|
664
|
-
local_var_path = "/bot{token}/sendSticker".sub('{' + 'token' + '}', token.to_s)
|
800
|
+
local_var_path = "/bot{token}/sendSticker".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
665
801
|
|
666
802
|
# query parameters
|
667
803
|
query_params = {}
|
668
804
|
|
669
805
|
# header parameters
|
670
806
|
header_params = {}
|
807
|
+
|
671
808
|
# HTTP header 'Accept' (if needed)
|
672
|
-
|
809
|
+
local_header_accept = ['application/json']
|
810
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
811
|
+
|
673
812
|
# HTTP header 'Content-Type'
|
674
|
-
|
813
|
+
local_header_content_type = ['multipart/form-data']
|
814
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
675
815
|
|
676
816
|
# form parameters
|
677
817
|
form_params = {}
|
@@ -719,21 +859,23 @@ module Teleswagger
|
|
719
859
|
@api_client.config.logger.debug "Calling API: AttachmentsApi.send_sticker_link ..."
|
720
860
|
end
|
721
861
|
# verify the required parameter 'token' is set
|
722
|
-
|
723
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_sticker_link"
|
724
|
-
end
|
862
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_sticker_link" if token.nil?
|
725
863
|
# resource path
|
726
|
-
local_var_path = "/bot{token}/sendSticker#link".sub('{' + 'token' + '}', token.to_s)
|
864
|
+
local_var_path = "/bot{token}/sendSticker#link".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
727
865
|
|
728
866
|
# query parameters
|
729
867
|
query_params = {}
|
730
868
|
|
731
869
|
# header parameters
|
732
870
|
header_params = {}
|
871
|
+
|
733
872
|
# HTTP header 'Accept' (if needed)
|
734
|
-
|
873
|
+
local_header_accept = ['application/json']
|
874
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
875
|
+
|
735
876
|
# HTTP header 'Content-Type'
|
736
|
-
|
877
|
+
local_header_content_type = ['application/json']
|
878
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
737
879
|
|
738
880
|
# form parameters
|
739
881
|
form_params = {}
|
@@ -776,21 +918,23 @@ module Teleswagger
|
|
776
918
|
@api_client.config.logger.debug "Calling API: AttachmentsApi.send_venue ..."
|
777
919
|
end
|
778
920
|
# verify the required parameter 'token' is set
|
779
|
-
|
780
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_venue"
|
781
|
-
end
|
921
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_venue" if token.nil?
|
782
922
|
# resource path
|
783
|
-
local_var_path = "/bot{token}/sendVenue".sub('{' + 'token' + '}', token.to_s)
|
923
|
+
local_var_path = "/bot{token}/sendVenue".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
784
924
|
|
785
925
|
# query parameters
|
786
926
|
query_params = {}
|
787
927
|
|
788
928
|
# header parameters
|
789
929
|
header_params = {}
|
930
|
+
|
790
931
|
# HTTP header 'Accept' (if needed)
|
791
|
-
|
932
|
+
local_header_accept = ['application/json']
|
933
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
934
|
+
|
792
935
|
# HTTP header 'Content-Type'
|
793
|
-
|
936
|
+
local_header_content_type = ['application/json']
|
937
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
794
938
|
|
795
939
|
# form parameters
|
796
940
|
form_params = {}
|
@@ -821,6 +965,7 @@ module Teleswagger
|
|
821
965
|
# @option opts [Integer] :width
|
822
966
|
# @option opts [Integer] :height
|
823
967
|
# @option opts [String] :caption
|
968
|
+
# @option opts [String] :parse_mode
|
824
969
|
# @option opts [BOOLEAN] :disable_notification
|
825
970
|
# @option opts [Integer] :reply_to_message_id
|
826
971
|
# @option opts [String] :reply_markup json string of reply_markup object
|
@@ -840,6 +985,7 @@ module Teleswagger
|
|
840
985
|
# @option opts [Integer] :width
|
841
986
|
# @option opts [Integer] :height
|
842
987
|
# @option opts [String] :caption
|
988
|
+
# @option opts [String] :parse_mode
|
843
989
|
# @option opts [BOOLEAN] :disable_notification
|
844
990
|
# @option opts [Integer] :reply_to_message_id
|
845
991
|
# @option opts [String] :reply_markup json string of reply_markup object
|
@@ -849,29 +995,27 @@ module Teleswagger
|
|
849
995
|
@api_client.config.logger.debug "Calling API: AttachmentsApi.send_video ..."
|
850
996
|
end
|
851
997
|
# verify the required parameter 'token' is set
|
852
|
-
|
853
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_video"
|
854
|
-
end
|
998
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_video" if token.nil?
|
855
999
|
# verify the required parameter 'chat_id' is set
|
856
|
-
|
857
|
-
fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_video"
|
858
|
-
end
|
1000
|
+
fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_video" if chat_id.nil?
|
859
1001
|
# verify the required parameter 'video' is set
|
860
|
-
|
861
|
-
fail ArgumentError, "Missing the required parameter 'video' when calling AttachmentsApi.send_video"
|
862
|
-
end
|
1002
|
+
fail ArgumentError, "Missing the required parameter 'video' when calling AttachmentsApi.send_video" if video.nil?
|
863
1003
|
# resource path
|
864
|
-
local_var_path = "/bot{token}/sendVideo".sub('{' + 'token' + '}', token.to_s)
|
1004
|
+
local_var_path = "/bot{token}/sendVideo".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
865
1005
|
|
866
1006
|
# query parameters
|
867
1007
|
query_params = {}
|
868
1008
|
|
869
1009
|
# header parameters
|
870
1010
|
header_params = {}
|
1011
|
+
|
871
1012
|
# HTTP header 'Accept' (if needed)
|
872
|
-
|
1013
|
+
local_header_accept = ['application/json']
|
1014
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1015
|
+
|
873
1016
|
# HTTP header 'Content-Type'
|
874
|
-
|
1017
|
+
local_header_content_type = ['multipart/form-data']
|
1018
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
875
1019
|
|
876
1020
|
# form parameters
|
877
1021
|
form_params = {}
|
@@ -881,6 +1025,7 @@ module Teleswagger
|
|
881
1025
|
form_params["width"] = opts[:'width'] if !opts[:'width'].nil?
|
882
1026
|
form_params["height"] = opts[:'height'] if !opts[:'height'].nil?
|
883
1027
|
form_params["caption"] = opts[:'caption'] if !opts[:'caption'].nil?
|
1028
|
+
form_params["parse_mode"] = opts[:'parse_mode'] if !opts[:'parse_mode'].nil?
|
884
1029
|
form_params["disable_notification"] = opts[:'disable_notification'] if !opts[:'disable_notification'].nil?
|
885
1030
|
form_params["reply_to_message_id"] = opts[:'reply_to_message_id'] if !opts[:'reply_to_message_id'].nil?
|
886
1031
|
form_params["reply_markup"] = opts[:'reply_markup'] if !opts[:'reply_markup'].nil?
|
@@ -923,21 +1068,23 @@ module Teleswagger
|
|
923
1068
|
@api_client.config.logger.debug "Calling API: AttachmentsApi.send_video_link ..."
|
924
1069
|
end
|
925
1070
|
# verify the required parameter 'token' is set
|
926
|
-
|
927
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_video_link"
|
928
|
-
end
|
1071
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_video_link" if token.nil?
|
929
1072
|
# resource path
|
930
|
-
local_var_path = "/bot{token}/sendVideo#link".sub('{' + 'token' + '}', token.to_s)
|
1073
|
+
local_var_path = "/bot{token}/sendVideo#link".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
931
1074
|
|
932
1075
|
# query parameters
|
933
1076
|
query_params = {}
|
934
1077
|
|
935
1078
|
# header parameters
|
936
1079
|
header_params = {}
|
1080
|
+
|
937
1081
|
# HTTP header 'Accept' (if needed)
|
938
|
-
|
1082
|
+
local_header_accept = ['application/json']
|
1083
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1084
|
+
|
939
1085
|
# HTTP header 'Content-Type'
|
940
|
-
|
1086
|
+
local_header_content_type = ['application/json']
|
1087
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
941
1088
|
|
942
1089
|
# form parameters
|
943
1090
|
form_params = {}
|
@@ -992,29 +1139,27 @@ module Teleswagger
|
|
992
1139
|
@api_client.config.logger.debug "Calling API: AttachmentsApi.send_video_note ..."
|
993
1140
|
end
|
994
1141
|
# verify the required parameter 'token' is set
|
995
|
-
|
996
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_video_note"
|
997
|
-
end
|
1142
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_video_note" if token.nil?
|
998
1143
|
# verify the required parameter 'chat_id' is set
|
999
|
-
|
1000
|
-
fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_video_note"
|
1001
|
-
end
|
1144
|
+
fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_video_note" if chat_id.nil?
|
1002
1145
|
# verify the required parameter 'video_note' is set
|
1003
|
-
|
1004
|
-
fail ArgumentError, "Missing the required parameter 'video_note' when calling AttachmentsApi.send_video_note"
|
1005
|
-
end
|
1146
|
+
fail ArgumentError, "Missing the required parameter 'video_note' when calling AttachmentsApi.send_video_note" if video_note.nil?
|
1006
1147
|
# resource path
|
1007
|
-
local_var_path = "/bot{token}/sendVideoNote".sub('{' + 'token' + '}', token.to_s)
|
1148
|
+
local_var_path = "/bot{token}/sendVideoNote".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
1008
1149
|
|
1009
1150
|
# query parameters
|
1010
1151
|
query_params = {}
|
1011
1152
|
|
1012
1153
|
# header parameters
|
1013
1154
|
header_params = {}
|
1155
|
+
|
1014
1156
|
# HTTP header 'Accept' (if needed)
|
1015
|
-
|
1157
|
+
local_header_accept = ['application/json']
|
1158
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1159
|
+
|
1016
1160
|
# HTTP header 'Content-Type'
|
1017
|
-
|
1161
|
+
local_header_content_type = ['multipart/form-data']
|
1162
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1018
1163
|
|
1019
1164
|
# form parameters
|
1020
1165
|
form_params = {}
|
@@ -1064,21 +1209,23 @@ module Teleswagger
|
|
1064
1209
|
@api_client.config.logger.debug "Calling API: AttachmentsApi.send_video_note_link ..."
|
1065
1210
|
end
|
1066
1211
|
# verify the required parameter 'token' is set
|
1067
|
-
|
1068
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_video_note_link"
|
1069
|
-
end
|
1212
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_video_note_link" if token.nil?
|
1070
1213
|
# resource path
|
1071
|
-
local_var_path = "/bot{token}/sendVideoNote#link".sub('{' + 'token' + '}', token.to_s)
|
1214
|
+
local_var_path = "/bot{token}/sendVideoNote#link".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
1072
1215
|
|
1073
1216
|
# query parameters
|
1074
1217
|
query_params = {}
|
1075
1218
|
|
1076
1219
|
# header parameters
|
1077
1220
|
header_params = {}
|
1221
|
+
|
1078
1222
|
# HTTP header 'Accept' (if needed)
|
1079
|
-
|
1223
|
+
local_header_accept = ['application/json']
|
1224
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1225
|
+
|
1080
1226
|
# HTTP header 'Content-Type'
|
1081
|
-
|
1227
|
+
local_header_content_type = ['application/json']
|
1228
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1082
1229
|
|
1083
1230
|
# form parameters
|
1084
1231
|
form_params = {}
|
@@ -1106,6 +1253,7 @@ module Teleswagger
|
|
1106
1253
|
# @param voice
|
1107
1254
|
# @param [Hash] opts the optional parameters
|
1108
1255
|
# @option opts [String] :caption
|
1256
|
+
# @option opts [String] :parse_mode
|
1109
1257
|
# @option opts [Integer] :duration
|
1110
1258
|
# @option opts [BOOLEAN] :disable_notification
|
1111
1259
|
# @option opts [Integer] :reply_to_message_id
|
@@ -1123,6 +1271,7 @@ module Teleswagger
|
|
1123
1271
|
# @param voice
|
1124
1272
|
# @param [Hash] opts the optional parameters
|
1125
1273
|
# @option opts [String] :caption
|
1274
|
+
# @option opts [String] :parse_mode
|
1126
1275
|
# @option opts [Integer] :duration
|
1127
1276
|
# @option opts [BOOLEAN] :disable_notification
|
1128
1277
|
# @option opts [Integer] :reply_to_message_id
|
@@ -1133,35 +1282,34 @@ module Teleswagger
|
|
1133
1282
|
@api_client.config.logger.debug "Calling API: AttachmentsApi.send_voice ..."
|
1134
1283
|
end
|
1135
1284
|
# verify the required parameter 'token' is set
|
1136
|
-
|
1137
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_voice"
|
1138
|
-
end
|
1285
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_voice" if token.nil?
|
1139
1286
|
# verify the required parameter 'chat_id' is set
|
1140
|
-
|
1141
|
-
fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_voice"
|
1142
|
-
end
|
1287
|
+
fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_voice" if chat_id.nil?
|
1143
1288
|
# verify the required parameter 'voice' is set
|
1144
|
-
|
1145
|
-
fail ArgumentError, "Missing the required parameter 'voice' when calling AttachmentsApi.send_voice"
|
1146
|
-
end
|
1289
|
+
fail ArgumentError, "Missing the required parameter 'voice' when calling AttachmentsApi.send_voice" if voice.nil?
|
1147
1290
|
# resource path
|
1148
|
-
local_var_path = "/bot{token}/sendVoice".sub('{' + 'token' + '}', token.to_s)
|
1291
|
+
local_var_path = "/bot{token}/sendVoice".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
1149
1292
|
|
1150
1293
|
# query parameters
|
1151
1294
|
query_params = {}
|
1152
1295
|
|
1153
1296
|
# header parameters
|
1154
1297
|
header_params = {}
|
1298
|
+
|
1155
1299
|
# HTTP header 'Accept' (if needed)
|
1156
|
-
|
1300
|
+
local_header_accept = ['application/json']
|
1301
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1302
|
+
|
1157
1303
|
# HTTP header 'Content-Type'
|
1158
|
-
|
1304
|
+
local_header_content_type = ['multipart/form-data']
|
1305
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1159
1306
|
|
1160
1307
|
# form parameters
|
1161
1308
|
form_params = {}
|
1162
1309
|
form_params["chat_id"] = chat_id
|
1163
1310
|
form_params["voice"] = voice
|
1164
1311
|
form_params["caption"] = opts[:'caption'] if !opts[:'caption'].nil?
|
1312
|
+
form_params["parse_mode"] = opts[:'parse_mode'] if !opts[:'parse_mode'].nil?
|
1165
1313
|
form_params["duration"] = opts[:'duration'] if !opts[:'duration'].nil?
|
1166
1314
|
form_params["disable_notification"] = opts[:'disable_notification'] if !opts[:'disable_notification'].nil?
|
1167
1315
|
form_params["reply_to_message_id"] = opts[:'reply_to_message_id'] if !opts[:'reply_to_message_id'].nil?
|
@@ -1205,21 +1353,23 @@ module Teleswagger
|
|
1205
1353
|
@api_client.config.logger.debug "Calling API: AttachmentsApi.send_voice_link ..."
|
1206
1354
|
end
|
1207
1355
|
# verify the required parameter 'token' is set
|
1208
|
-
|
1209
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_voice_link"
|
1210
|
-
end
|
1356
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_voice_link" if token.nil?
|
1211
1357
|
# resource path
|
1212
|
-
local_var_path = "/bot{token}/sendVoice#link".sub('{' + 'token' + '}', token.to_s)
|
1358
|
+
local_var_path = "/bot{token}/sendVoice#link".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
1213
1359
|
|
1214
1360
|
# query parameters
|
1215
1361
|
query_params = {}
|
1216
1362
|
|
1217
1363
|
# header parameters
|
1218
1364
|
header_params = {}
|
1365
|
+
|
1219
1366
|
# HTTP header 'Accept' (if needed)
|
1220
|
-
|
1367
|
+
local_header_accept = ['application/json']
|
1368
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1369
|
+
|
1221
1370
|
# HTTP header 'Content-Type'
|
1222
|
-
|
1371
|
+
local_header_content_type = ['application/json']
|
1372
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1223
1373
|
|
1224
1374
|
# form parameters
|
1225
1375
|
form_params = {}
|
@@ -1239,5 +1389,64 @@ module Teleswagger
|
|
1239
1389
|
end
|
1240
1390
|
return data, status_code, headers
|
1241
1391
|
end
|
1392
|
+
|
1393
|
+
#
|
1394
|
+
#
|
1395
|
+
# @param token bot's token to authorize the request
|
1396
|
+
# @param [Hash] opts the optional parameters
|
1397
|
+
# @option opts [StopMessageLiveLocationBody] :body
|
1398
|
+
# @return [ResponseMessage]
|
1399
|
+
def stop_message_live_location(token, opts = {})
|
1400
|
+
data, _status_code, _headers = stop_message_live_location_with_http_info(token, opts)
|
1401
|
+
return data
|
1402
|
+
end
|
1403
|
+
|
1404
|
+
#
|
1405
|
+
#
|
1406
|
+
# @param token bot's token to authorize the request
|
1407
|
+
# @param [Hash] opts the optional parameters
|
1408
|
+
# @option opts [StopMessageLiveLocationBody] :body
|
1409
|
+
# @return [Array<(ResponseMessage, Fixnum, Hash)>] ResponseMessage data, response status code and response headers
|
1410
|
+
def stop_message_live_location_with_http_info(token, opts = {})
|
1411
|
+
if @api_client.config.debugging
|
1412
|
+
@api_client.config.logger.debug "Calling API: AttachmentsApi.stop_message_live_location ..."
|
1413
|
+
end
|
1414
|
+
# verify the required parameter 'token' is set
|
1415
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.stop_message_live_location" if token.nil?
|
1416
|
+
# resource path
|
1417
|
+
local_var_path = "/bot{token}/stopMessageLiveLocation".sub('{format}','json').sub('{' + 'token' + '}', token.to_s)
|
1418
|
+
|
1419
|
+
# query parameters
|
1420
|
+
query_params = {}
|
1421
|
+
|
1422
|
+
# header parameters
|
1423
|
+
header_params = {}
|
1424
|
+
|
1425
|
+
# HTTP header 'Accept' (if needed)
|
1426
|
+
local_header_accept = ['application/json']
|
1427
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1428
|
+
|
1429
|
+
# HTTP header 'Content-Type'
|
1430
|
+
local_header_content_type = ['application/json']
|
1431
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1432
|
+
|
1433
|
+
# form parameters
|
1434
|
+
form_params = {}
|
1435
|
+
|
1436
|
+
# http body (model)
|
1437
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
1438
|
+
auth_names = []
|
1439
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1440
|
+
:header_params => header_params,
|
1441
|
+
:query_params => query_params,
|
1442
|
+
:form_params => form_params,
|
1443
|
+
:body => post_body,
|
1444
|
+
:auth_names => auth_names,
|
1445
|
+
:return_type => 'ResponseMessage')
|
1446
|
+
if @api_client.config.debugging
|
1447
|
+
@api_client.config.logger.debug "API called: AttachmentsApi#stop_message_live_location\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1448
|
+
end
|
1449
|
+
return data, status_code, headers
|
1450
|
+
end
|
1242
1451
|
end
|
1243
1452
|
end
|