Class: Teleswagger::AttachmentsApi
- Inherits:
-
Object
- Object
- Teleswagger::AttachmentsApi
- Defined in:
- lib/teleswagger/api/attachments_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
- #edit_message_live_location(token, opts = {}) ⇒ ResponseMessage
-
#edit_message_live_location_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
ResponseMessage data, response status code and response headers.
- #get_file(token, file_id, opts = {}) ⇒ InlineResponse2005
-
#get_file_with_http_info(token, file_id, opts = {}) ⇒ Array<(InlineResponse2005, Fixnum, Hash)>
InlineResponse2005 data, response status code and response headers.
-
#initialize(api_client = ApiClient.default) ⇒ AttachmentsApi
constructor
A new instance of AttachmentsApi.
- #send_audio(token, chat_id, audio, opts = {}) ⇒ ResponseMessage
- #send_audio_link(token, opts = {}) ⇒ ResponseMessage
-
#send_audio_link_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
ResponseMessage data, response status code and response headers.
-
#send_audio_with_http_info(token, chat_id, audio, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
ResponseMessage data, response status code and response headers.
- #send_contact(token, opts = {}) ⇒ ResponseMessage
-
#send_contact_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
ResponseMessage data, response status code and response headers.
- #send_document(token, chat_id, document, opts = {}) ⇒ ResponseMessage
- #send_document_link(token, opts = {}) ⇒ ResponseMessage
-
#send_document_link_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
ResponseMessage data, response status code and response headers.
-
#send_document_with_http_info(token, chat_id, document, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
ResponseMessage data, response status code and response headers.
- #send_location(token, opts = {}) ⇒ ResponseMessage
-
#send_location_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
ResponseMessage data, response status code and response headers.
- #send_media_group_link(token, opts = {}) ⇒ ResponseMessage
-
#send_media_group_link_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
ResponseMessage data, response status code and response headers.
- #send_photo(token, chat_id, photo, opts = {}) ⇒ ResponseMessage
- #send_photo_link(token, opts = {}) ⇒ ResponseMessage
-
#send_photo_link_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
ResponseMessage data, response status code and response headers.
-
#send_photo_with_http_info(token, chat_id, photo, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
ResponseMessage data, response status code and response headers.
- #send_sticker(token, chat_id, sticker, opts = {}) ⇒ ResponseMessage
- #send_sticker_link(token, opts = {}) ⇒ ResponseMessage
-
#send_sticker_link_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
ResponseMessage data, response status code and response headers.
-
#send_sticker_with_http_info(token, chat_id, sticker, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
ResponseMessage data, response status code and response headers.
- #send_venue(token, opts = {}) ⇒ ResponseMessage
-
#send_venue_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
ResponseMessage data, response status code and response headers.
- #send_video(token, chat_id, video, opts = {}) ⇒ ResponseMessage
- #send_video_link(token, opts = {}) ⇒ ResponseMessage
-
#send_video_link_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
ResponseMessage data, response status code and response headers.
- #send_video_note(token, chat_id, video_note, opts = {}) ⇒ ResponseMessage
- #send_video_note_link(token, opts = {}) ⇒ ResponseMessage
-
#send_video_note_link_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
ResponseMessage data, response status code and response headers.
-
#send_video_note_with_http_info(token, chat_id, video_note, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
ResponseMessage data, response status code and response headers.
-
#send_video_with_http_info(token, chat_id, video, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
ResponseMessage data, response status code and response headers.
- #send_voice(token, chat_id, voice, opts = {}) ⇒ ResponseMessage
- #send_voice_link(token, opts = {}) ⇒ ResponseMessage
-
#send_voice_link_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
ResponseMessage data, response status code and response headers.
-
#send_voice_with_http_info(token, chat_id, voice, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
ResponseMessage data, response status code and response headers.
- #stop_message_live_location(token, opts = {}) ⇒ ResponseMessage
-
#stop_message_live_location_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
ResponseMessage data, response status code and response headers.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ AttachmentsApi
Returns a new instance of AttachmentsApi.
30 31 32 |
# File 'lib/teleswagger/api/attachments_api.rb', line 30 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
28 29 30 |
# File 'lib/teleswagger/api/attachments_api.rb', line 28 def api_client @api_client end |
Instance Method Details
#edit_message_live_location(token, opts = {}) ⇒ ResponseMessage
40 41 42 43 |
# File 'lib/teleswagger/api/attachments_api.rb', line 40 def (token, opts = {}) data, _status_code, _headers = (token, opts) return data end |
#edit_message_live_location_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
Returns ResponseMessage data, response status code and response headers.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/teleswagger/api/attachments_api.rb', line 51 def (token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AttachmentsApi.edit_message_live_location ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.edit_message_live_location" if token.nil? # resource path local_var_path = "/bot{token}/editMessageLiveLocation".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseMessage') if @api_client.config.debugging @api_client.config.logger.debug "API called: AttachmentsApi#edit_message_live_location\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_file(token, file_id, opts = {}) ⇒ InlineResponse2005
99 100 101 102 |
# File 'lib/teleswagger/api/attachments_api.rb', line 99 def get_file(token, file_id, opts = {}) data, _status_code, _headers = get_file_with_http_info(token, file_id, opts) return data end |
#get_file_with_http_info(token, file_id, opts = {}) ⇒ Array<(InlineResponse2005, Fixnum, Hash)>
Returns InlineResponse2005 data, response status code and response headers.
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/teleswagger/api/attachments_api.rb', line 110 def get_file_with_http_info(token, file_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AttachmentsApi.get_file ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.get_file" if token.nil? # verify the required parameter 'file_id' is set fail ArgumentError, "Missing the required parameter 'file_id' when calling AttachmentsApi.get_file" if file_id.nil? # resource path local_var_path = "/bot{token}/getFile".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} query_params[:'file_id'] = file_id # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InlineResponse2005') if @api_client.config.debugging @api_client.config.logger.debug "API called: AttachmentsApi#get_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_audio(token, chat_id, audio, opts = {}) ⇒ ResponseMessage
170 171 172 173 |
# File 'lib/teleswagger/api/attachments_api.rb', line 170 def send_audio(token, chat_id, audio, opts = {}) data, _status_code, _headers = send_audio_with_http_info(token, chat_id, audio, opts) return data end |
#send_audio_link(token, opts = {}) ⇒ ResponseMessage
252 253 254 255 |
# File 'lib/teleswagger/api/attachments_api.rb', line 252 def send_audio_link(token, opts = {}) data, _status_code, _headers = send_audio_link_with_http_info(token, opts) return data end |
#send_audio_link_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
Returns ResponseMessage data, response status code and response headers.
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 |
# File 'lib/teleswagger/api/attachments_api.rb', line 263 def send_audio_link_with_http_info(token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AttachmentsApi.send_audio_link ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_audio_link" if token.nil? # resource path local_var_path = "/bot{token}/sendAudio#link".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseMessage') if @api_client.config.debugging @api_client.config.logger.debug "API called: AttachmentsApi#send_audio_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_audio_with_http_info(token, chat_id, audio, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
Returns ResponseMessage data, response status code and response headers.
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/teleswagger/api/attachments_api.rb', line 190 def send_audio_with_http_info(token, chat_id, audio, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AttachmentsApi.send_audio ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_audio" if token.nil? # verify the required parameter 'chat_id' is set fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_audio" if chat_id.nil? # verify the required parameter 'audio' is set fail ArgumentError, "Missing the required parameter 'audio' when calling AttachmentsApi.send_audio" if audio.nil? # resource path local_var_path = "/bot{token}/sendAudio".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['multipart/form-data'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} form_params["chat_id"] = chat_id form_params["audio"] = audio form_params["caption"] = opts[:'caption'] if !opts[:'caption'].nil? form_params["parse_mode"] = opts[:'parse_mode'] if !opts[:'parse_mode'].nil? form_params["duration"] = opts[:'duration'] if !opts[:'duration'].nil? form_params["performer"] = opts[:'performer'] if !opts[:'performer'].nil? form_params["title"] = opts[:'title'] if !opts[:'title'].nil? form_params["disable_notification"] = opts[:'disable_notification'] if !opts[:'disable_notification'].nil? form_params["reply_to_message_id"] = opts[:'reply_to_message_id'] if !opts[:'reply_to_message_id'].nil? form_params["reply_markup"] = opts[:'reply_markup'] if !opts[:'reply_markup'].nil? # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseMessage') if @api_client.config.debugging @api_client.config.logger.debug "API called: AttachmentsApi#send_audio\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_contact(token, opts = {}) ⇒ ResponseMessage
311 312 313 314 |
# File 'lib/teleswagger/api/attachments_api.rb', line 311 def send_contact(token, opts = {}) data, _status_code, _headers = send_contact_with_http_info(token, opts) return data end |
#send_contact_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
Returns ResponseMessage data, response status code and response headers.
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 |
# File 'lib/teleswagger/api/attachments_api.rb', line 322 def send_contact_with_http_info(token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AttachmentsApi.send_contact ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_contact" if token.nil? # resource path local_var_path = "/bot{token}/sendContact".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseMessage') if @api_client.config.debugging @api_client.config.logger.debug "API called: AttachmentsApi#send_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_document(token, chat_id, document, opts = {}) ⇒ ResponseMessage
376 377 378 379 |
# File 'lib/teleswagger/api/attachments_api.rb', line 376 def send_document(token, chat_id, document, opts = {}) data, _status_code, _headers = send_document_with_http_info(token, chat_id, document, opts) return data end |
#send_document_link(token, opts = {}) ⇒ ResponseMessage
452 453 454 455 |
# File 'lib/teleswagger/api/attachments_api.rb', line 452 def send_document_link(token, opts = {}) data, _status_code, _headers = send_document_link_with_http_info(token, opts) return data end |
#send_document_link_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
Returns ResponseMessage data, response status code and response headers.
463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 |
# File 'lib/teleswagger/api/attachments_api.rb', line 463 def send_document_link_with_http_info(token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AttachmentsApi.send_document_link ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_document_link" if token.nil? # resource path local_var_path = "/bot{token}/sendDocument#link".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseMessage') if @api_client.config.debugging @api_client.config.logger.debug "API called: AttachmentsApi#send_document_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_document_with_http_info(token, chat_id, document, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
Returns ResponseMessage data, response status code and response headers.
393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 |
# File 'lib/teleswagger/api/attachments_api.rb', line 393 def send_document_with_http_info(token, chat_id, document, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AttachmentsApi.send_document ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_document" if token.nil? # verify the required parameter 'chat_id' is set fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_document" if chat_id.nil? # verify the required parameter 'document' is set fail ArgumentError, "Missing the required parameter 'document' when calling AttachmentsApi.send_document" if document.nil? # resource path local_var_path = "/bot{token}/sendDocument".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['multipart/form-data'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} form_params["chat_id"] = chat_id form_params["document"] = document form_params["caption"] = opts[:'caption'] if !opts[:'caption'].nil? form_params["parse_mode"] = opts[:'parse_mode'] if !opts[:'parse_mode'].nil? form_params["disable_notification"] = opts[:'disable_notification'] if !opts[:'disable_notification'].nil? form_params["reply_to_message_id"] = opts[:'reply_to_message_id'] if !opts[:'reply_to_message_id'].nil? form_params["reply_markup"] = opts[:'reply_markup'] if !opts[:'reply_markup'].nil? # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseMessage') if @api_client.config.debugging @api_client.config.logger.debug "API called: AttachmentsApi#send_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_location(token, opts = {}) ⇒ ResponseMessage
511 512 513 514 |
# File 'lib/teleswagger/api/attachments_api.rb', line 511 def send_location(token, opts = {}) data, _status_code, _headers = send_location_with_http_info(token, opts) return data end |
#send_location_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
Returns ResponseMessage data, response status code and response headers.
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 |
# File 'lib/teleswagger/api/attachments_api.rb', line 522 def send_location_with_http_info(token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AttachmentsApi.send_location ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_location" if token.nil? # resource path local_var_path = "/bot{token}/sendLocation".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseMessage') if @api_client.config.debugging @api_client.config.logger.debug "API called: AttachmentsApi#send_location\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_media_group_link(token, opts = {}) ⇒ ResponseMessage
570 571 572 573 |
# File 'lib/teleswagger/api/attachments_api.rb', line 570 def send_media_group_link(token, opts = {}) data, _status_code, _headers = send_media_group_link_with_http_info(token, opts) return data end |
#send_media_group_link_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
Returns ResponseMessage data, response status code and response headers.
581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 |
# File 'lib/teleswagger/api/attachments_api.rb', line 581 def send_media_group_link_with_http_info(token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AttachmentsApi.send_media_group_link ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_media_group_link" if token.nil? # resource path local_var_path = "/bot{token}/sendMediaGroup#link".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseMessage') if @api_client.config.debugging @api_client.config.logger.debug "API called: AttachmentsApi#send_media_group_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_photo(token, chat_id, photo, opts = {}) ⇒ ResponseMessage
635 636 637 638 |
# File 'lib/teleswagger/api/attachments_api.rb', line 635 def send_photo(token, chat_id, photo, opts = {}) data, _status_code, _headers = send_photo_with_http_info(token, chat_id, photo, opts) return data end |
#send_photo_link(token, opts = {}) ⇒ ResponseMessage
711 712 713 714 |
# File 'lib/teleswagger/api/attachments_api.rb', line 711 def send_photo_link(token, opts = {}) data, _status_code, _headers = send_photo_link_with_http_info(token, opts) return data end |
#send_photo_link_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
Returns ResponseMessage data, response status code and response headers.
722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 |
# File 'lib/teleswagger/api/attachments_api.rb', line 722 def send_photo_link_with_http_info(token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AttachmentsApi.send_photo_link ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_photo_link" if token.nil? # resource path local_var_path = "/bot{token}/sendPhoto#link".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseMessage') if @api_client.config.debugging @api_client.config.logger.debug "API called: AttachmentsApi#send_photo_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_photo_with_http_info(token, chat_id, photo, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
Returns ResponseMessage data, response status code and response headers.
652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 |
# File 'lib/teleswagger/api/attachments_api.rb', line 652 def send_photo_with_http_info(token, chat_id, photo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AttachmentsApi.send_photo ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_photo" if token.nil? # verify the required parameter 'chat_id' is set fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_photo" if chat_id.nil? # verify the required parameter 'photo' is set fail ArgumentError, "Missing the required parameter 'photo' when calling AttachmentsApi.send_photo" if photo.nil? # resource path local_var_path = "/bot{token}/sendPhoto".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['multipart/form-data'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} form_params["chat_id"] = chat_id form_params["photo"] = photo form_params["caption"] = opts[:'caption'] if !opts[:'caption'].nil? form_params["parse_mode"] = opts[:'parse_mode'] if !opts[:'parse_mode'].nil? form_params["disable_notification"] = opts[:'disable_notification'] if !opts[:'disable_notification'].nil? form_params["reply_to_message_id"] = opts[:'reply_to_message_id'] if !opts[:'reply_to_message_id'].nil? form_params["reply_markup"] = opts[:'reply_markup'] if !opts[:'reply_markup'].nil? # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseMessage') if @api_client.config.debugging @api_client.config.logger.debug "API called: AttachmentsApi#send_photo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_sticker(token, chat_id, sticker, opts = {}) ⇒ ResponseMessage
774 775 776 777 |
# File 'lib/teleswagger/api/attachments_api.rb', line 774 def send_sticker(token, chat_id, sticker, opts = {}) data, _status_code, _headers = send_sticker_with_http_info(token, chat_id, sticker, opts) return data end |
#send_sticker_link(token, opts = {}) ⇒ ResponseMessage
846 847 848 849 |
# File 'lib/teleswagger/api/attachments_api.rb', line 846 def send_sticker_link(token, opts = {}) data, _status_code, _headers = send_sticker_link_with_http_info(token, opts) return data end |
#send_sticker_link_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
Returns ResponseMessage data, response status code and response headers.
857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 |
# File 'lib/teleswagger/api/attachments_api.rb', line 857 def send_sticker_link_with_http_info(token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AttachmentsApi.send_sticker_link ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_sticker_link" if token.nil? # resource path local_var_path = "/bot{token}/sendSticker#link".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseMessage') if @api_client.config.debugging @api_client.config.logger.debug "API called: AttachmentsApi#send_sticker_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_sticker_with_http_info(token, chat_id, sticker, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
Returns ResponseMessage data, response status code and response headers.
789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 |
# File 'lib/teleswagger/api/attachments_api.rb', line 789 def send_sticker_with_http_info(token, chat_id, sticker, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AttachmentsApi.send_sticker ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_sticker" if token.nil? # verify the required parameter 'chat_id' is set fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_sticker" if chat_id.nil? # verify the required parameter 'sticker' is set fail ArgumentError, "Missing the required parameter 'sticker' when calling AttachmentsApi.send_sticker" if sticker.nil? # resource path local_var_path = "/bot{token}/sendSticker".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['multipart/form-data'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} form_params["chat_id"] = chat_id form_params["sticker"] = sticker form_params["disable_notification"] = opts[:'disable_notification'] if !opts[:'disable_notification'].nil? form_params["reply_to_message_id"] = opts[:'reply_to_message_id'] if !opts[:'reply_to_message_id'].nil? form_params["reply_markup"] = opts[:'reply_markup'] if !opts[:'reply_markup'].nil? # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseMessage') if @api_client.config.debugging @api_client.config.logger.debug "API called: AttachmentsApi#send_sticker\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_venue(token, opts = {}) ⇒ ResponseMessage
905 906 907 908 |
# File 'lib/teleswagger/api/attachments_api.rb', line 905 def send_venue(token, opts = {}) data, _status_code, _headers = send_venue_with_http_info(token, opts) return data end |
#send_venue_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
Returns ResponseMessage data, response status code and response headers.
916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 |
# File 'lib/teleswagger/api/attachments_api.rb', line 916 def send_venue_with_http_info(token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AttachmentsApi.send_venue ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_venue" if token.nil? # resource path local_var_path = "/bot{token}/sendVenue".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseMessage') if @api_client.config.debugging @api_client.config.logger.debug "API called: AttachmentsApi#send_venue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_video(token, chat_id, video, opts = {}) ⇒ ResponseMessage
973 974 975 976 |
# File 'lib/teleswagger/api/attachments_api.rb', line 973 def send_video(token, chat_id, video, opts = {}) data, _status_code, _headers = send_video_with_http_info(token, chat_id, video, opts) return data end |
#send_video_link(token, opts = {}) ⇒ ResponseMessage
1055 1056 1057 1058 |
# File 'lib/teleswagger/api/attachments_api.rb', line 1055 def send_video_link(token, opts = {}) data, _status_code, _headers = send_video_link_with_http_info(token, opts) return data end |
#send_video_link_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
Returns ResponseMessage data, response status code and response headers.
1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 |
# File 'lib/teleswagger/api/attachments_api.rb', line 1066 def send_video_link_with_http_info(token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AttachmentsApi.send_video_link ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_video_link" if token.nil? # resource path local_var_path = "/bot{token}/sendVideo#link".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseMessage') if @api_client.config.debugging @api_client.config.logger.debug "API called: AttachmentsApi#send_video_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_video_note(token, chat_id, video_note, opts = {}) ⇒ ResponseMessage
1120 1121 1122 1123 |
# File 'lib/teleswagger/api/attachments_api.rb', line 1120 def send_video_note(token, chat_id, video_note, opts = {}) data, _status_code, _headers = send_video_note_with_http_info(token, chat_id, video_note, opts) return data end |
#send_video_note_link(token, opts = {}) ⇒ ResponseMessage
1196 1197 1198 1199 |
# File 'lib/teleswagger/api/attachments_api.rb', line 1196 def send_video_note_link(token, opts = {}) data, _status_code, _headers = send_video_note_link_with_http_info(token, opts) return data end |
#send_video_note_link_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
Returns ResponseMessage data, response status code and response headers.
1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 |
# File 'lib/teleswagger/api/attachments_api.rb', line 1207 def send_video_note_link_with_http_info(token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AttachmentsApi.send_video_note_link ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_video_note_link" if token.nil? # resource path local_var_path = "/bot{token}/sendVideoNote#link".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseMessage') if @api_client.config.debugging @api_client.config.logger.debug "API called: AttachmentsApi#send_video_note_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_video_note_with_http_info(token, chat_id, video_note, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
Returns ResponseMessage data, response status code and response headers.
1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 |
# File 'lib/teleswagger/api/attachments_api.rb', line 1137 def send_video_note_with_http_info(token, chat_id, video_note, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AttachmentsApi.send_video_note ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_video_note" if token.nil? # verify the required parameter 'chat_id' is set fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_video_note" if chat_id.nil? # verify the required parameter 'video_note' is set fail ArgumentError, "Missing the required parameter 'video_note' when calling AttachmentsApi.send_video_note" if video_note.nil? # resource path local_var_path = "/bot{token}/sendVideoNote".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['multipart/form-data'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} form_params["chat_id"] = chat_id form_params["video_note"] = video_note form_params["duration"] = opts[:'duration'] if !opts[:'duration'].nil? form_params["length"] = opts[:'length'] if !opts[:'length'].nil? form_params["disable_notification"] = opts[:'disable_notification'] if !opts[:'disable_notification'].nil? form_params["reply_to_message_id"] = opts[:'reply_to_message_id'] if !opts[:'reply_to_message_id'].nil? form_params["reply_markup"] = opts[:'reply_markup'] if !opts[:'reply_markup'].nil? # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseMessage') if @api_client.config.debugging @api_client.config.logger.debug "API called: AttachmentsApi#send_video_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_video_with_http_info(token, chat_id, video, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
Returns ResponseMessage data, response status code and response headers.
993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 |
# File 'lib/teleswagger/api/attachments_api.rb', line 993 def send_video_with_http_info(token, chat_id, video, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AttachmentsApi.send_video ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_video" if token.nil? # verify the required parameter 'chat_id' is set fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_video" if chat_id.nil? # verify the required parameter 'video' is set fail ArgumentError, "Missing the required parameter 'video' when calling AttachmentsApi.send_video" if video.nil? # resource path local_var_path = "/bot{token}/sendVideo".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['multipart/form-data'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} form_params["chat_id"] = chat_id form_params["video"] = video form_params["duration"] = opts[:'duration'] if !opts[:'duration'].nil? form_params["width"] = opts[:'width'] if !opts[:'width'].nil? form_params["height"] = opts[:'height'] if !opts[:'height'].nil? form_params["caption"] = opts[:'caption'] if !opts[:'caption'].nil? form_params["parse_mode"] = opts[:'parse_mode'] if !opts[:'parse_mode'].nil? form_params["disable_notification"] = opts[:'disable_notification'] if !opts[:'disable_notification'].nil? form_params["reply_to_message_id"] = opts[:'reply_to_message_id'] if !opts[:'reply_to_message_id'].nil? form_params["reply_markup"] = opts[:'reply_markup'] if !opts[:'reply_markup'].nil? # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseMessage') if @api_client.config.debugging @api_client.config.logger.debug "API called: AttachmentsApi#send_video\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_voice(token, chat_id, voice, opts = {}) ⇒ ResponseMessage
1262 1263 1264 1265 |
# File 'lib/teleswagger/api/attachments_api.rb', line 1262 def send_voice(token, chat_id, voice, opts = {}) data, _status_code, _headers = send_voice_with_http_info(token, chat_id, voice, opts) return data end |
#send_voice_link(token, opts = {}) ⇒ ResponseMessage
1340 1341 1342 1343 |
# File 'lib/teleswagger/api/attachments_api.rb', line 1340 def send_voice_link(token, opts = {}) data, _status_code, _headers = send_voice_link_with_http_info(token, opts) return data end |
#send_voice_link_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
Returns ResponseMessage data, response status code and response headers.
1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 |
# File 'lib/teleswagger/api/attachments_api.rb', line 1351 def send_voice_link_with_http_info(token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AttachmentsApi.send_voice_link ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_voice_link" if token.nil? # resource path local_var_path = "/bot{token}/sendVoice#link".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseMessage') if @api_client.config.debugging @api_client.config.logger.debug "API called: AttachmentsApi#send_voice_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_voice_with_http_info(token, chat_id, voice, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
Returns ResponseMessage data, response status code and response headers.
1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 |
# File 'lib/teleswagger/api/attachments_api.rb', line 1280 def send_voice_with_http_info(token, chat_id, voice, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AttachmentsApi.send_voice ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_voice" if token.nil? # verify the required parameter 'chat_id' is set fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_voice" if chat_id.nil? # verify the required parameter 'voice' is set fail ArgumentError, "Missing the required parameter 'voice' when calling AttachmentsApi.send_voice" if voice.nil? # resource path local_var_path = "/bot{token}/sendVoice".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['multipart/form-data'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} form_params["chat_id"] = chat_id form_params["voice"] = voice form_params["caption"] = opts[:'caption'] if !opts[:'caption'].nil? form_params["parse_mode"] = opts[:'parse_mode'] if !opts[:'parse_mode'].nil? form_params["duration"] = opts[:'duration'] if !opts[:'duration'].nil? form_params["disable_notification"] = opts[:'disable_notification'] if !opts[:'disable_notification'].nil? form_params["reply_to_message_id"] = opts[:'reply_to_message_id'] if !opts[:'reply_to_message_id'].nil? form_params["reply_markup"] = opts[:'reply_markup'] if !opts[:'reply_markup'].nil? # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseMessage') if @api_client.config.debugging @api_client.config.logger.debug "API called: AttachmentsApi#send_voice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#stop_message_live_location(token, opts = {}) ⇒ ResponseMessage
1399 1400 1401 1402 |
# File 'lib/teleswagger/api/attachments_api.rb', line 1399 def (token, opts = {}) data, _status_code, _headers = (token, opts) return data end |
#stop_message_live_location_with_http_info(token, opts = {}) ⇒ Array<(ResponseMessage, Fixnum, Hash)>
Returns ResponseMessage data, response status code and response headers.
1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 |
# File 'lib/teleswagger/api/attachments_api.rb', line 1410 def (token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AttachmentsApi.stop_message_live_location ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.stop_message_live_location" if token.nil? # resource path local_var_path = "/bot{token}/stopMessageLiveLocation".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseMessage') if @api_client.config.debugging @api_client.config.logger.debug "API called: AttachmentsApi#stop_message_live_location\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |