class Teleswagger::AttachmentsApi
Attributes
Public Class Methods
# File lib/teleswagger/api/attachments_api.rb, line 30 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [EditMessageLiveLocationBody] :body @return [ResponseMessage]
# File lib/teleswagger/api/attachments_api.rb, line 40 def edit_message_live_location(token, opts = {}) data, _status_code, _headers = edit_message_live_location_with_http_info(token, opts) return data end
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [EditMessageLiveLocationBody] :body @return [Array<(ResponseMessage
, Fixnum, Hash)>] ResponseMessage
data, response status code and response headers
# File lib/teleswagger/api/attachments_api.rb, line 51 def edit_message_live_location_with_http_info(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
@param token bot's token to authorize the request @param file_id @param [Hash] opts the optional parameters @return [InlineResponse2005]
# 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
@param token bot's token to authorize the request @param file_id @param [Hash] opts the optional parameters @return [Array<(InlineResponse2005
, Fixnum, Hash)>] InlineResponse2005
data, response status code and response headers
# 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
@param token bot's token to authorize the request @param chat_id @param audio @param [Hash] opts the optional parameters @option opts [String] :caption @option opts [String] :parse_mode @option opts [Integer] :duration @option opts [String] :performer @option opts [String] :title @option opts [BOOLEAN] :disable_notification @option opts [Integer] :reply_to_message_id @option opts [String] :reply_markup json string of reply_markup object @return [ResponseMessage]
# 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
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [SendAudioLinkBody] :body @return [ResponseMessage]
# 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
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [SendAudioLinkBody] :body @return [Array<(ResponseMessage
, Fixnum, Hash)>] ResponseMessage
data, response status code and response headers
# 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
@param token bot's token to authorize the request @param chat_id @param audio @param [Hash] opts the optional parameters @option opts [String] :caption @option opts [String] :parse_mode @option opts [Integer] :duration @option opts [String] :performer @option opts [String] :title @option opts [BOOLEAN] :disable_notification @option opts [Integer] :reply_to_message_id @option opts [String] :reply_markup json string of reply_markup object @return [Array<(ResponseMessage
, Fixnum, Hash)>] ResponseMessage
data, response status code and response headers
# 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
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [SendContactBody] :body @return [ResponseMessage]
# 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
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [SendContactBody] :body @return [Array<(ResponseMessage
, Fixnum, Hash)>] ResponseMessage
data, response status code and response headers
# 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
@param token bot's token to authorize the request @param chat_id @param document @param [Hash] opts the optional parameters @option opts [String] :caption @option opts [String] :parse_mode @option opts [BOOLEAN] :disable_notification @option opts [Integer] :reply_to_message_id @option opts [String] :reply_markup json string of reply_markup object @return [ResponseMessage]
# 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
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [SendDocumentLinkBody] :body @return [ResponseMessage]
# 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
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [SendDocumentLinkBody] :body @return [Array<(ResponseMessage
, Fixnum, Hash)>] ResponseMessage
data, response status code and response headers
# 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
@param token bot's token to authorize the request @param chat_id @param document @param [Hash] opts the optional parameters @option opts [String] :caption @option opts [String] :parse_mode @option opts [BOOLEAN] :disable_notification @option opts [Integer] :reply_to_message_id @option opts [String] :reply_markup json string of reply_markup object @return [Array<(ResponseMessage
, Fixnum, Hash)>] ResponseMessage
data, response status code and response headers
# 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
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [SendLocationBody] :body @return [ResponseMessage]
# 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
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [SendLocationBody] :body @return [Array<(ResponseMessage
, Fixnum, Hash)>] ResponseMessage
data, response status code and response headers
# 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
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [SendMediaGroupLinkBody] :body @return [ResponseMessage]
# 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
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [SendMediaGroupLinkBody] :body @return [Array<(ResponseMessage
, Fixnum, Hash)>] ResponseMessage
data, response status code and response headers
# 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
@param token bot's token to authorize the request @param chat_id @param photo @param [Hash] opts the optional parameters @option opts [String] :caption @option opts [String] :parse_mode @option opts [BOOLEAN] :disable_notification @option opts [Integer] :reply_to_message_id @option opts [String] :reply_markup json string of reply_markup object @return [ResponseMessage]
# 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
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [SendPhotoLinkBody] :body @return [ResponseMessage]
# 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
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [SendPhotoLinkBody] :body @return [Array<(ResponseMessage
, Fixnum, Hash)>] ResponseMessage
data, response status code and response headers
# 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
@param token bot's token to authorize the request @param chat_id @param photo @param [Hash] opts the optional parameters @option opts [String] :caption @option opts [String] :parse_mode @option opts [BOOLEAN] :disable_notification @option opts [Integer] :reply_to_message_id @option opts [String] :reply_markup json string of reply_markup object @return [Array<(ResponseMessage
, Fixnum, Hash)>] ResponseMessage
data, response status code and response headers
# 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
@param token bot's token to authorize the request @param chat_id @param sticker @param [Hash] opts the optional parameters @option opts [BOOLEAN] :disable_notification @option opts [Integer] :reply_to_message_id @option opts [String] :reply_markup json string of reply_markup object @return [ResponseMessage]
# 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
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [SendStickerLinkBody] :body @return [ResponseMessage]
# 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
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [SendStickerLinkBody] :body @return [Array<(ResponseMessage
, Fixnum, Hash)>] ResponseMessage
data, response status code and response headers
# 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
@param token bot's token to authorize the request @param chat_id @param sticker @param [Hash] opts the optional parameters @option opts [BOOLEAN] :disable_notification @option opts [Integer] :reply_to_message_id @option opts [String] :reply_markup json string of reply_markup object @return [Array<(ResponseMessage
, Fixnum, Hash)>] ResponseMessage
data, response status code and response headers
# 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
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [SendVenueBody] :body @return [ResponseMessage]
# 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
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [SendVenueBody] :body @return [Array<(ResponseMessage
, Fixnum, Hash)>] ResponseMessage
data, response status code and response headers
# 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
@param token bot's token to authorize the request @param chat_id @param video @param [Hash] opts the optional parameters @option opts [Integer] :duration @option opts [Integer] :width @option opts [Integer] :height @option opts [String] :caption @option opts [String] :parse_mode @option opts [BOOLEAN] :disable_notification @option opts [Integer] :reply_to_message_id @option opts [String] :reply_markup json string of reply_markup object @return [ResponseMessage]
# 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
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [SendVideoLinkBody] :body @return [ResponseMessage]
# 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
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [SendVideoLinkBody] :body @return [Array<(ResponseMessage
, Fixnum, Hash)>] ResponseMessage
data, response status code and response headers
# 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
@param token bot's token to authorize the request @param chat_id @param video_note @param [Hash] opts the optional parameters @option opts [Integer] :duration @option opts [Integer] :length @option opts [BOOLEAN] :disable_notification @option opts [Integer] :reply_to_message_id @option opts [String] :reply_markup json string of reply_markup object @return [ResponseMessage]
# 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
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [SendVideoNoteLinkBody] :body @return [ResponseMessage]
# 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
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [SendVideoNoteLinkBody] :body @return [Array<(ResponseMessage
, Fixnum, Hash)>] ResponseMessage
data, response status code and response headers
# 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
@param token bot's token to authorize the request @param chat_id @param video_note @param [Hash] opts the optional parameters @option opts [Integer] :duration @option opts [Integer] :length @option opts [BOOLEAN] :disable_notification @option opts [Integer] :reply_to_message_id @option opts [String] :reply_markup json string of reply_markup object @return [Array<(ResponseMessage
, Fixnum, Hash)>] ResponseMessage
data, response status code and response headers
# 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
@param token bot's token to authorize the request @param chat_id @param video @param [Hash] opts the optional parameters @option opts [Integer] :duration @option opts [Integer] :width @option opts [Integer] :height @option opts [String] :caption @option opts [String] :parse_mode @option opts [BOOLEAN] :disable_notification @option opts [Integer] :reply_to_message_id @option opts [String] :reply_markup json string of reply_markup object @return [Array<(ResponseMessage
, Fixnum, Hash)>] ResponseMessage
data, response status code and response headers
# 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
@param token bot's token to authorize the request @param chat_id @param voice @param [Hash] opts the optional parameters @option opts [String] :caption @option opts [String] :parse_mode @option opts [Integer] :duration @option opts [BOOLEAN] :disable_notification @option opts [Integer] :reply_to_message_id @option opts [String] :reply_markup json string of reply_markup object @return [ResponseMessage]
# 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
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [SendVoiceLinkBody] :body @return [ResponseMessage]
# 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
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [SendVoiceLinkBody] :body @return [Array<(ResponseMessage
, Fixnum, Hash)>] ResponseMessage
data, response status code and response headers
# 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
@param token bot's token to authorize the request @param chat_id @param voice @param [Hash] opts the optional parameters @option opts [String] :caption @option opts [String] :parse_mode @option opts [Integer] :duration @option opts [BOOLEAN] :disable_notification @option opts [Integer] :reply_to_message_id @option opts [String] :reply_markup json string of reply_markup object @return [Array<(ResponseMessage
, Fixnum, Hash)>] ResponseMessage
data, response status code and response headers
# 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
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [StopMessageLiveLocationBody] :body @return [ResponseMessage]
# File lib/teleswagger/api/attachments_api.rb, line 1399 def stop_message_live_location(token, opts = {}) data, _status_code, _headers = stop_message_live_location_with_http_info(token, opts) return data end
@param token bot's token to authorize the request @param [Hash] opts the optional parameters @option opts [StopMessageLiveLocationBody] :body @return [Array<(ResponseMessage
, Fixnum, Hash)>] ResponseMessage
data, response status code and response headers
# File lib/teleswagger/api/attachments_api.rb, line 1410 def stop_message_live_location_with_http_info(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