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
- #get_file(token, file_id, opts = {}) ⇒ InlineResponse2002
-
#get_file_with_http_info(token, file_id, opts = {}) ⇒ Array<(InlineResponse2002, Fixnum, Hash)>
InlineResponse2002 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_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.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ AttachmentsApi
Returns a new instance of AttachmentsApi.
19 20 21 |
# File 'lib/teleswagger/api/attachments_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/teleswagger/api/attachments_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_file(token, file_id, opts = {}) ⇒ InlineResponse2002
29 30 31 32 |
# File 'lib/teleswagger/api/attachments_api.rb', line 29 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<(InlineResponse2002, Fixnum, Hash)>
Returns InlineResponse2002 data, response status code and response headers.
40 41 42 43 44 45 46 47 48 49 50 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 |
# File 'lib/teleswagger/api/attachments_api.rb', line 40 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.get_file" end # verify the required parameter 'file_id' is set if @api_client.config.client_side_validation && file_id.nil? fail ArgumentError, "Missing the required parameter 'file_id' when calling AttachmentsApi.get_file" end # resource path local_var_path = "/bot{token}/getFile".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} query_params[:'file_id'] = file_id # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # 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 => 'InlineResponse2002') 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
99 100 101 102 |
# File 'lib/teleswagger/api/attachments_api.rb', line 99 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
181 182 183 184 |
# File 'lib/teleswagger/api/attachments_api.rb', line 181 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.
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 |
# File 'lib/teleswagger/api/attachments_api.rb', line 192 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_audio_link" end # resource path local_var_path = "/bot{token}/sendAudio#link".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # 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.
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 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/teleswagger/api/attachments_api.rb', line 118 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_audio" end # verify the required parameter 'chat_id' is set if @api_client.config.client_side_validation && chat_id.nil? fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_audio" end # verify the required parameter 'audio' is set if @api_client.config.client_side_validation && audio.nil? fail ArgumentError, "Missing the required parameter 'audio' when calling AttachmentsApi.send_audio" end # resource path local_var_path = "/bot{token}/sendAudio".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # 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["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
238 239 240 241 |
# File 'lib/teleswagger/api/attachments_api.rb', line 238 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.
249 250 251 252 253 254 255 256 257 258 259 260 261 262 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 |
# File 'lib/teleswagger/api/attachments_api.rb', line 249 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_contact" end # resource path local_var_path = "/bot{token}/sendContact".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # 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
300 301 302 303 |
# File 'lib/teleswagger/api/attachments_api.rb', line 300 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
376 377 378 379 |
# File 'lib/teleswagger/api/attachments_api.rb', line 376 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.
387 388 389 390 391 392 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 |
# File 'lib/teleswagger/api/attachments_api.rb', line 387 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_document_link" end # resource path local_var_path = "/bot{token}/sendDocument#link".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # 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.
316 317 318 319 320 321 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 363 364 365 366 367 368 |
# File 'lib/teleswagger/api/attachments_api.rb', line 316 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_document" end # verify the required parameter 'chat_id' is set if @api_client.config.client_side_validation && chat_id.nil? fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_document" end # verify the required parameter 'document' is set if @api_client.config.client_side_validation && document.nil? fail ArgumentError, "Missing the required parameter 'document' when calling AttachmentsApi.send_document" end # resource path local_var_path = "/bot{token}/sendDocument".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # 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["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
433 434 435 436 |
# File 'lib/teleswagger/api/attachments_api.rb', line 433 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.
444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 |
# File 'lib/teleswagger/api/attachments_api.rb', line 444 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_location" end # resource path local_var_path = "/bot{token}/sendLocation".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # 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_photo(token, chat_id, photo, opts = {}) ⇒ ResponseMessage
495 496 497 498 |
# File 'lib/teleswagger/api/attachments_api.rb', line 495 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
571 572 573 574 |
# File 'lib/teleswagger/api/attachments_api.rb', line 571 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.
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 |
# File 'lib/teleswagger/api/attachments_api.rb', line 582 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_photo_link" end # resource path local_var_path = "/bot{token}/sendPhoto#link".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # 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.
511 512 513 514 515 516 517 518 519 520 521 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 563 |
# File 'lib/teleswagger/api/attachments_api.rb', line 511 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_photo" end # verify the required parameter 'chat_id' is set if @api_client.config.client_side_validation && chat_id.nil? fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_photo" end # verify the required parameter 'photo' is set if @api_client.config.client_side_validation && photo.nil? fail ArgumentError, "Missing the required parameter 'photo' when calling AttachmentsApi.send_photo" end # resource path local_var_path = "/bot{token}/sendPhoto".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # 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["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
632 633 634 635 |
# File 'lib/teleswagger/api/attachments_api.rb', line 632 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
706 707 708 709 |
# File 'lib/teleswagger/api/attachments_api.rb', line 706 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.
717 718 719 720 721 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 |
# File 'lib/teleswagger/api/attachments_api.rb', line 717 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_sticker_link" end # resource path local_var_path = "/bot{token}/sendSticker#link".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # 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.
647 648 649 650 651 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 |
# File 'lib/teleswagger/api/attachments_api.rb', line 647 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_sticker" end # verify the required parameter 'chat_id' is set if @api_client.config.client_side_validation && chat_id.nil? fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_sticker" end # verify the required parameter 'sticker' is set if @api_client.config.client_side_validation && sticker.nil? fail ArgumentError, "Missing the required parameter 'sticker' when calling AttachmentsApi.send_sticker" end # resource path local_var_path = "/bot{token}/sendSticker".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # 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
763 764 765 766 |
# File 'lib/teleswagger/api/attachments_api.rb', line 763 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.
774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 |
# File 'lib/teleswagger/api/attachments_api.rb', line 774 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_venue" end # resource path local_var_path = "/bot{token}/sendVenue".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # 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
828 829 830 831 |
# File 'lib/teleswagger/api/attachments_api.rb', line 828 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
910 911 912 913 |
# File 'lib/teleswagger/api/attachments_api.rb', line 910 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.
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 957 958 959 |
# File 'lib/teleswagger/api/attachments_api.rb', line 921 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_video_link" end # resource path local_var_path = "/bot{token}/sendVideo#link".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # 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
973 974 975 976 |
# File 'lib/teleswagger/api/attachments_api.rb', line 973 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
1051 1052 1053 1054 |
# File 'lib/teleswagger/api/attachments_api.rb', line 1051 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.
1062 1063 1064 1065 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 |
# File 'lib/teleswagger/api/attachments_api.rb', line 1062 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_video_note_link" end # resource path local_var_path = "/bot{token}/sendVideoNote#link".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # 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.
990 991 992 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 |
# File 'lib/teleswagger/api/attachments_api.rb', line 990 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_video_note" end # verify the required parameter 'chat_id' is set if @api_client.config.client_side_validation && chat_id.nil? fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_video_note" end # verify the required parameter 'video_note' is set if @api_client.config.client_side_validation && video_note.nil? fail ArgumentError, "Missing the required parameter 'video_note' when calling AttachmentsApi.send_video_note" end # resource path local_var_path = "/bot{token}/sendVideoNote".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # 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.
847 848 849 850 851 852 853 854 855 856 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 898 899 900 901 902 |
# File 'lib/teleswagger/api/attachments_api.rb', line 847 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_video" end # verify the required parameter 'chat_id' is set if @api_client.config.client_side_validation && chat_id.nil? fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_video" end # verify the required parameter 'video' is set if @api_client.config.client_side_validation && video.nil? fail ArgumentError, "Missing the required parameter 'video' when calling AttachmentsApi.send_video" end # resource path local_var_path = "/bot{token}/sendVideo".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # 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["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
1114 1115 1116 1117 |
# File 'lib/teleswagger/api/attachments_api.rb', line 1114 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
1192 1193 1194 1195 |
# File 'lib/teleswagger/api/attachments_api.rb', line 1192 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.
1203 1204 1205 1206 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 |
# File 'lib/teleswagger/api/attachments_api.rb', line 1203 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_voice_link" end # resource path local_var_path = "/bot{token}/sendVoice#link".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # 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.
1131 1132 1133 1134 1135 1136 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 |
# File 'lib/teleswagger/api/attachments_api.rb', line 1131 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling AttachmentsApi.send_voice" end # verify the required parameter 'chat_id' is set if @api_client.config.client_side_validation && chat_id.nil? fail ArgumentError, "Missing the required parameter 'chat_id' when calling AttachmentsApi.send_voice" end # verify the required parameter 'voice' is set if @api_client.config.client_side_validation && voice.nil? fail ArgumentError, "Missing the required parameter 'voice' when calling AttachmentsApi.send_voice" end # resource path local_var_path = "/bot{token}/sendVoice".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # 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["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 |