Class: Teleswagger::ChatsApi
- Inherits:
-
Object
- Object
- Teleswagger::ChatsApi
- Defined in:
- lib/teleswagger/api/chats_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
- #delete_chat_photo(token, chat_id, opts = {}) ⇒ ResponseBool
-
#delete_chat_photo_with_http_info(token, chat_id, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
ResponseBool data, response status code and response headers.
- #delete_chat_sticker_set(token, chat_id, opts = {}) ⇒ ResponseBool
-
#delete_chat_sticker_set_with_http_info(token, chat_id, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
ResponseBool data, response status code and response headers.
- #export_chat_invite_link(token, chat_id, opts = {}) ⇒ String
-
#export_chat_invite_link_with_http_info(token, chat_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
String data, response status code and response headers.
- #get_chat(token, chat_id, opts = {}) ⇒ InlineResponse2001
- #get_chat_administrators(token, chat_id, opts = {}) ⇒ InlineResponse2002
-
#get_chat_administrators_with_http_info(token, chat_id, opts = {}) ⇒ Array<(InlineResponse2002, Fixnum, Hash)>
InlineResponse2002 data, response status code and response headers.
- #get_chat_member(token, chat_id, user_id, opts = {}) ⇒ InlineResponse2003
-
#get_chat_member_with_http_info(token, chat_id, user_id, opts = {}) ⇒ Array<(InlineResponse2003, Fixnum, Hash)>
InlineResponse2003 data, response status code and response headers.
- #get_chat_members_count(token, chat_id, opts = {}) ⇒ InlineResponse2004
-
#get_chat_members_count_with_http_info(token, chat_id, opts = {}) ⇒ Array<(InlineResponse2004, Fixnum, Hash)>
InlineResponse2004 data, response status code and response headers.
-
#get_chat_with_http_info(token, chat_id, opts = {}) ⇒ Array<(InlineResponse2001, Fixnum, Hash)>
InlineResponse2001 data, response status code and response headers.
-
#initialize(api_client = ApiClient.default) ⇒ ChatsApi
constructor
A new instance of ChatsApi.
- #kick_chat_member(token, chat_id, user_id, opts = {}) ⇒ ResponseBool
-
#kick_chat_member_with_http_info(token, chat_id, user_id, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
ResponseBool data, response status code and response headers.
- #leave_chat(token, chat_id, opts = {}) ⇒ ResponseBool
-
#leave_chat_with_http_info(token, chat_id, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
ResponseBool data, response status code and response headers.
- #pin_chat_message(token, chat_id, message_id, opts = {}) ⇒ ResponseBool
-
#pin_chat_message_with_http_info(token, chat_id, message_id, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
ResponseBool data, response status code and response headers.
- #promote_chat_member(token, body, opts = {}) ⇒ ResponseBool
-
#promote_chat_member_with_http_info(token, body, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
ResponseBool data, response status code and response headers.
- #restrict_chat_member(token, body, opts = {}) ⇒ ResponseBool
-
#restrict_chat_member_with_http_info(token, body, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
ResponseBool data, response status code and response headers.
- #send_chat_action(token, chat_id, action, opts = {}) ⇒ ResponseBool
-
#send_chat_action_with_http_info(token, chat_id, action, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
ResponseBool data, response status code and response headers.
- #set_chat_description(token, chat_id, description, opts = {}) ⇒ ResponseBool
-
#set_chat_description_with_http_info(token, chat_id, description, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
ResponseBool data, response status code and response headers.
- #set_chat_photo(token, chat_id, photo, opts = {}) ⇒ ResponseBool
-
#set_chat_photo_with_http_info(token, chat_id, photo, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
ResponseBool data, response status code and response headers.
- #set_chat_sticker_set(token, chat_id, sticker_set_name, opts = {}) ⇒ ResponseBool
-
#set_chat_sticker_set_with_http_info(token, chat_id, sticker_set_name, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
ResponseBool data, response status code and response headers.
- #set_chat_title(token, chat_id, title, opts = {}) ⇒ ResponseBool
-
#set_chat_title_with_http_info(token, chat_id, title, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
ResponseBool data, response status code and response headers.
- #unban_chat_member(token, chat_id, user_id, opts = {}) ⇒ ResponseBool
-
#unban_chat_member_with_http_info(token, chat_id, user_id, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
ResponseBool data, response status code and response headers.
- #unpin_chat_message(token, chat_id, opts = {}) ⇒ ResponseBool
-
#unpin_chat_message_with_http_info(token, chat_id, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
ResponseBool data, response status code and response headers.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
28 29 30 |
# File 'lib/teleswagger/api/chats_api.rb', line 28 def api_client @api_client end |
Instance Method Details
#delete_chat_photo(token, chat_id, opts = {}) ⇒ ResponseBool
40 41 42 43 |
# File 'lib/teleswagger/api/chats_api.rb', line 40 def delete_chat_photo(token, chat_id, opts = {}) data, _status_code, _headers = delete_chat_photo_with_http_info(token, chat_id, opts) return data end |
#delete_chat_photo_with_http_info(token, chat_id, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
Returns ResponseBool data, response status code and response headers.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/teleswagger/api/chats_api.rb', line 51 def delete_chat_photo_with_http_info(token, chat_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ChatsApi.delete_chat_photo ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.delete_chat_photo" if token.nil? # verify the required parameter 'chat_id' is set fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.delete_chat_photo" if chat_id.nil? # resource path local_var_path = "/bot{token}/deleteChatPhoto".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} query_params[:'chat_id'] = chat_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(: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 => 'ResponseBool') if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatsApi#delete_chat_photo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_chat_sticker_set(token, chat_id, opts = {}) ⇒ ResponseBool
102 103 104 105 |
# File 'lib/teleswagger/api/chats_api.rb', line 102 def delete_chat_sticker_set(token, chat_id, opts = {}) data, _status_code, _headers = delete_chat_sticker_set_with_http_info(token, chat_id, opts) return data end |
#delete_chat_sticker_set_with_http_info(token, chat_id, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
Returns ResponseBool data, response status code and response headers.
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/teleswagger/api/chats_api.rb', line 113 def delete_chat_sticker_set_with_http_info(token, chat_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ChatsApi.delete_chat_sticker_set ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.delete_chat_sticker_set" if token.nil? # verify the required parameter 'chat_id' is set fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.delete_chat_sticker_set" if chat_id.nil? # resource path local_var_path = "/bot{token}/deleteChatStickerSet".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} query_params[:'chat_id'] = chat_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 => 'ResponseBool') if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatsApi#delete_chat_sticker_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#export_chat_invite_link(token, chat_id, opts = {}) ⇒ String
164 165 166 167 |
# File 'lib/teleswagger/api/chats_api.rb', line 164 def export_chat_invite_link(token, chat_id, opts = {}) data, _status_code, _headers = export_chat_invite_link_with_http_info(token, chat_id, opts) return data end |
#export_chat_invite_link_with_http_info(token, chat_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Returns String data, response status code and response headers.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 |
# File 'lib/teleswagger/api/chats_api.rb', line 175 def export_chat_invite_link_with_http_info(token, chat_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ChatsApi.export_chat_invite_link ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.export_chat_invite_link" if token.nil? # verify the required parameter 'chat_id' is set fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.export_chat_invite_link" if chat_id.nil? # resource path local_var_path = "/bot{token}/exportChatInviteLink".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} query_params[:'chat_id'] = chat_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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatsApi#export_chat_invite_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_chat(token, chat_id, opts = {}) ⇒ InlineResponse2001
226 227 228 229 |
# File 'lib/teleswagger/api/chats_api.rb', line 226 def get_chat(token, chat_id, opts = {}) data, _status_code, _headers = get_chat_with_http_info(token, chat_id, opts) return data end |
#get_chat_administrators(token, chat_id, opts = {}) ⇒ InlineResponse2002
288 289 290 291 |
# File 'lib/teleswagger/api/chats_api.rb', line 288 def get_chat_administrators(token, chat_id, opts = {}) data, _status_code, _headers = get_chat_administrators_with_http_info(token, chat_id, opts) return data end |
#get_chat_administrators_with_http_info(token, chat_id, opts = {}) ⇒ Array<(InlineResponse2002, Fixnum, Hash)>
Returns InlineResponse2002 data, response status code and response headers.
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 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 |
# File 'lib/teleswagger/api/chats_api.rb', line 299 def get_chat_administrators_with_http_info(token, chat_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ChatsApi.get_chat_administrators ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.get_chat_administrators" if token.nil? # verify the required parameter 'chat_id' is set fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.get_chat_administrators" if chat_id.nil? # resource path local_var_path = "/bot{token}/getChatAdministrators".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} query_params[:'chat_id'] = chat_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 => 'InlineResponse2002') if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatsApi#get_chat_administrators\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_chat_member(token, chat_id, user_id, opts = {}) ⇒ InlineResponse2003
351 352 353 354 |
# File 'lib/teleswagger/api/chats_api.rb', line 351 def get_chat_member(token, chat_id, user_id, opts = {}) data, _status_code, _headers = get_chat_member_with_http_info(token, chat_id, user_id, opts) return data end |
#get_chat_member_with_http_info(token, chat_id, user_id, opts = {}) ⇒ Array<(InlineResponse2003, Fixnum, Hash)>
Returns InlineResponse2003 data, response status code and response headers.
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 |
# File 'lib/teleswagger/api/chats_api.rb', line 363 def get_chat_member_with_http_info(token, chat_id, user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ChatsApi.get_chat_member ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.get_chat_member" if token.nil? # verify the required parameter 'chat_id' is set fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.get_chat_member" if chat_id.nil? # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling ChatsApi.get_chat_member" if user_id.nil? # resource path local_var_path = "/bot{token}/getChatMember".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} query_params[:'chat_id'] = chat_id query_params[:'user_id'] = user_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 => 'InlineResponse2003') if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatsApi#get_chat_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_chat_members_count(token, chat_id, opts = {}) ⇒ InlineResponse2004
417 418 419 420 |
# File 'lib/teleswagger/api/chats_api.rb', line 417 def get_chat_members_count(token, chat_id, opts = {}) data, _status_code, _headers = get_chat_members_count_with_http_info(token, chat_id, opts) return data end |
#get_chat_members_count_with_http_info(token, chat_id, opts = {}) ⇒ Array<(InlineResponse2004, Fixnum, Hash)>
Returns InlineResponse2004 data, response status code and response headers.
428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 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 |
# File 'lib/teleswagger/api/chats_api.rb', line 428 def get_chat_members_count_with_http_info(token, chat_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ChatsApi.get_chat_members_count ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.get_chat_members_count" if token.nil? # verify the required parameter 'chat_id' is set fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.get_chat_members_count" if chat_id.nil? # resource path local_var_path = "/bot{token}/getChatMembersCount".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} query_params[:'chat_id'] = chat_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 => 'InlineResponse2004') if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatsApi#get_chat_members_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_chat_with_http_info(token, chat_id, opts = {}) ⇒ Array<(InlineResponse2001, Fixnum, Hash)>
Returns InlineResponse2001 data, response status code and response headers.
237 238 239 240 241 242 243 244 245 246 247 248 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 |
# File 'lib/teleswagger/api/chats_api.rb', line 237 def get_chat_with_http_info(token, chat_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ChatsApi.get_chat ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.get_chat" if token.nil? # verify the required parameter 'chat_id' is set fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.get_chat" if chat_id.nil? # resource path local_var_path = "/bot{token}/getChat".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} query_params[:'chat_id'] = chat_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 => 'InlineResponse2001') if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatsApi#get_chat\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#kick_chat_member(token, chat_id, user_id, opts = {}) ⇒ ResponseBool
481 482 483 484 |
# File 'lib/teleswagger/api/chats_api.rb', line 481 def kick_chat_member(token, chat_id, user_id, opts = {}) data, _status_code, _headers = kick_chat_member_with_http_info(token, chat_id, user_id, opts) return data end |
#kick_chat_member_with_http_info(token, chat_id, user_id, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
Returns ResponseBool data, response status code and response headers.
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 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 |
# File 'lib/teleswagger/api/chats_api.rb', line 494 def kick_chat_member_with_http_info(token, chat_id, user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ChatsApi.kick_chat_member ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.kick_chat_member" if token.nil? # verify the required parameter 'chat_id' is set fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.kick_chat_member" if chat_id.nil? # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling ChatsApi.kick_chat_member" if user_id.nil? # resource path local_var_path = "/bot{token}/kickChatMember".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} query_params[:'chat_id'] = chat_id query_params[:'user_id'] = user_id query_params[:'until_date'] = opts[:'until_date'] if !opts[:'until_date'].nil? # 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 => 'ResponseBool') if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatsApi#kick_chat_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#leave_chat(token, chat_id, opts = {}) ⇒ ResponseBool
549 550 551 552 |
# File 'lib/teleswagger/api/chats_api.rb', line 549 def leave_chat(token, chat_id, opts = {}) data, _status_code, _headers = leave_chat_with_http_info(token, chat_id, opts) return data end |
#leave_chat_with_http_info(token, chat_id, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
Returns ResponseBool data, response status code and response headers.
560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 |
# File 'lib/teleswagger/api/chats_api.rb', line 560 def leave_chat_with_http_info(token, chat_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ChatsApi.leave_chat ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.leave_chat" if token.nil? # verify the required parameter 'chat_id' is set fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.leave_chat" if chat_id.nil? # resource path local_var_path = "/bot{token}/leaveChat".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} query_params[:'chat_id'] = chat_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 => 'ResponseBool') if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatsApi#leave_chat\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pin_chat_message(token, chat_id, message_id, opts = {}) ⇒ ResponseBool
613 614 615 616 |
# File 'lib/teleswagger/api/chats_api.rb', line 613 def (token, chat_id, , opts = {}) data, _status_code, _headers = (token, chat_id, , opts) return data end |
#pin_chat_message_with_http_info(token, chat_id, message_id, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
Returns ResponseBool data, response status code and response headers.
626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 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 |
# File 'lib/teleswagger/api/chats_api.rb', line 626 def (token, chat_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ChatsApi.pin_chat_message ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.pin_chat_message" if token.nil? # verify the required parameter 'chat_id' is set fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.pin_chat_message" if chat_id.nil? # verify the required parameter 'message_id' is set fail ArgumentError, "Missing the required parameter 'message_id' when calling ChatsApi.pin_chat_message" if .nil? # resource path local_var_path = "/bot{token}/pinChatMessage".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} query_params[:'chat_id'] = chat_id query_params[:'message_id'] = query_params[:'disable_notification'] = opts[:'disable_notification'] if !opts[:'disable_notification'].nil? # 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(: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 => 'ResponseBool') if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatsApi#pin_chat_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#promote_chat_member(token, body, opts = {}) ⇒ ResponseBool
681 682 683 684 |
# File 'lib/teleswagger/api/chats_api.rb', line 681 def promote_chat_member(token, body, opts = {}) data, _status_code, _headers = promote_chat_member_with_http_info(token, body, opts) return data end |
#promote_chat_member_with_http_info(token, body, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
Returns ResponseBool data, response status code and response headers.
692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 |
# File 'lib/teleswagger/api/chats_api.rb', line 692 def promote_chat_member_with_http_info(token, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ChatsApi.promote_chat_member ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.promote_chat_member" if token.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ChatsApi.promote_chat_member" if body.nil? # resource path local_var_path = "/bot{token}/promoteChatMember".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(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 => 'ResponseBool') if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatsApi#promote_chat_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#restrict_chat_member(token, body, opts = {}) ⇒ ResponseBool
742 743 744 745 |
# File 'lib/teleswagger/api/chats_api.rb', line 742 def restrict_chat_member(token, body, opts = {}) data, _status_code, _headers = restrict_chat_member_with_http_info(token, body, opts) return data end |
#restrict_chat_member_with_http_info(token, body, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
Returns ResponseBool data, response status code and response headers.
753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 |
# File 'lib/teleswagger/api/chats_api.rb', line 753 def restrict_chat_member_with_http_info(token, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ChatsApi.restrict_chat_member ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.restrict_chat_member" if token.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ChatsApi.restrict_chat_member" if body.nil? # resource path local_var_path = "/bot{token}/restrictChatMember".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(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 => 'ResponseBool') if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatsApi#restrict_chat_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_chat_action(token, chat_id, action, opts = {}) ⇒ ResponseBool
804 805 806 807 |
# File 'lib/teleswagger/api/chats_api.rb', line 804 def send_chat_action(token, chat_id, action, opts = {}) data, _status_code, _headers = send_chat_action_with_http_info(token, chat_id, action, opts) return data end |
#send_chat_action_with_http_info(token, chat_id, action, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
Returns ResponseBool data, response status code and response headers.
816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 |
# File 'lib/teleswagger/api/chats_api.rb', line 816 def send_chat_action_with_http_info(token, chat_id, action, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ChatsApi.send_chat_action ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.send_chat_action" if token.nil? # verify the required parameter 'chat_id' is set fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.send_chat_action" if chat_id.nil? # verify the required parameter 'action' is set fail ArgumentError, "Missing the required parameter 'action' when calling ChatsApi.send_chat_action" if action.nil? # verify enum value unless ['typing', 'upload_photo', 'record_video', 'upload_video', 'record_audio', 'upload_audio', 'upload_document', 'find_location', 'record_video_note', 'upload_video_note'].include?(action) fail ArgumentError, "invalid value for 'action', must be one of typing, upload_photo, record_video, upload_video, record_audio, upload_audio, upload_document, find_location, record_video_note, upload_video_note" end # resource path local_var_path = "/bot{token}/sendChatAction".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} query_params[:'chat_id'] = chat_id query_params[:'action'] = action # 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 => 'ResponseBool') if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatsApi#send_chat_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#set_chat_description(token, chat_id, description, opts = {}) ⇒ ResponseBool
875 876 877 878 |
# File 'lib/teleswagger/api/chats_api.rb', line 875 def set_chat_description(token, chat_id, description, opts = {}) data, _status_code, _headers = set_chat_description_with_http_info(token, chat_id, description, opts) return data end |
#set_chat_description_with_http_info(token, chat_id, description, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
Returns ResponseBool data, response status code and response headers.
887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 |
# File 'lib/teleswagger/api/chats_api.rb', line 887 def set_chat_description_with_http_info(token, chat_id, description, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ChatsApi.set_chat_description ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.set_chat_description" if token.nil? # verify the required parameter 'chat_id' is set fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.set_chat_description" if chat_id.nil? # verify the required parameter 'description' is set fail ArgumentError, "Missing the required parameter 'description' when calling ChatsApi.set_chat_description" if description.nil? # resource path local_var_path = "/bot{token}/setChatDescription".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} query_params[:'chat_id'] = chat_id query_params[:'description'] = description # 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(: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 => 'ResponseBool') if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatsApi#set_chat_description\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#set_chat_photo(token, chat_id, photo, opts = {}) ⇒ ResponseBool
942 943 944 945 |
# File 'lib/teleswagger/api/chats_api.rb', line 942 def set_chat_photo(token, chat_id, photo, opts = {}) data, _status_code, _headers = set_chat_photo_with_http_info(token, chat_id, photo, opts) return data end |
#set_chat_photo_with_http_info(token, chat_id, photo, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
Returns ResponseBool data, response status code and response headers.
954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 |
# File 'lib/teleswagger/api/chats_api.rb', line 954 def set_chat_photo_with_http_info(token, chat_id, photo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ChatsApi.set_chat_photo ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.set_chat_photo" if token.nil? # verify the required parameter 'chat_id' is set fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.set_chat_photo" if chat_id.nil? # verify the required parameter 'photo' is set fail ArgumentError, "Missing the required parameter 'photo' when calling ChatsApi.set_chat_photo" if photo.nil? # resource path local_var_path = "/bot{token}/setChatPhoto".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 # 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 => 'ResponseBool') if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatsApi#set_chat_photo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#set_chat_sticker_set(token, chat_id, sticker_set_name, opts = {}) ⇒ ResponseBool
1009 1010 1011 1012 |
# File 'lib/teleswagger/api/chats_api.rb', line 1009 def set_chat_sticker_set(token, chat_id, sticker_set_name, opts = {}) data, _status_code, _headers = set_chat_sticker_set_with_http_info(token, chat_id, sticker_set_name, opts) return data end |
#set_chat_sticker_set_with_http_info(token, chat_id, sticker_set_name, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
Returns ResponseBool data, response status code and response headers.
1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 |
# File 'lib/teleswagger/api/chats_api.rb', line 1021 def set_chat_sticker_set_with_http_info(token, chat_id, sticker_set_name, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ChatsApi.set_chat_sticker_set ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.set_chat_sticker_set" if token.nil? # verify the required parameter 'chat_id' is set fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.set_chat_sticker_set" if chat_id.nil? # verify the required parameter 'sticker_set_name' is set fail ArgumentError, "Missing the required parameter 'sticker_set_name' when calling ChatsApi.set_chat_sticker_set" if sticker_set_name.nil? # resource path local_var_path = "/bot{token}/setChatStickerSet".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} query_params[:'chat_id'] = chat_id query_params[:'sticker_set_name'] = sticker_set_name # 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 => 'ResponseBool') if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatsApi#set_chat_sticker_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#set_chat_title(token, chat_id, title, opts = {}) ⇒ ResponseBool
1076 1077 1078 1079 |
# File 'lib/teleswagger/api/chats_api.rb', line 1076 def set_chat_title(token, chat_id, title, opts = {}) data, _status_code, _headers = set_chat_title_with_http_info(token, chat_id, title, opts) return data end |
#set_chat_title_with_http_info(token, chat_id, title, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
Returns ResponseBool data, response status code and response headers.
1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 |
# File 'lib/teleswagger/api/chats_api.rb', line 1088 def set_chat_title_with_http_info(token, chat_id, title, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ChatsApi.set_chat_title ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.set_chat_title" if token.nil? # verify the required parameter 'chat_id' is set fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.set_chat_title" if chat_id.nil? # verify the required parameter 'title' is set fail ArgumentError, "Missing the required parameter 'title' when calling ChatsApi.set_chat_title" if title.nil? # resource path local_var_path = "/bot{token}/setChatTitle".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} query_params[:'chat_id'] = chat_id query_params[:'title'] = title # 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(: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 => 'ResponseBool') if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatsApi#set_chat_title\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#unban_chat_member(token, chat_id, user_id, opts = {}) ⇒ ResponseBool
1143 1144 1145 1146 |
# File 'lib/teleswagger/api/chats_api.rb', line 1143 def unban_chat_member(token, chat_id, user_id, opts = {}) data, _status_code, _headers = unban_chat_member_with_http_info(token, chat_id, user_id, opts) return data end |
#unban_chat_member_with_http_info(token, chat_id, user_id, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
Returns ResponseBool data, response status code and response headers.
1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 |
# File 'lib/teleswagger/api/chats_api.rb', line 1155 def unban_chat_member_with_http_info(token, chat_id, user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ChatsApi.unban_chat_member ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.unban_chat_member" if token.nil? # verify the required parameter 'chat_id' is set fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.unban_chat_member" if chat_id.nil? # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling ChatsApi.unban_chat_member" if user_id.nil? # resource path local_var_path = "/bot{token}/unbanChatMember".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} query_params[:'chat_id'] = chat_id query_params[:'user_id'] = user_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 => 'ResponseBool') if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatsApi#unban_chat_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#unpin_chat_message(token, chat_id, opts = {}) ⇒ ResponseBool
1209 1210 1211 1212 |
# File 'lib/teleswagger/api/chats_api.rb', line 1209 def (token, chat_id, opts = {}) data, _status_code, _headers = (token, chat_id, opts) return data end |
#unpin_chat_message_with_http_info(token, chat_id, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
Returns ResponseBool data, response status code and response headers.
1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 |
# File 'lib/teleswagger/api/chats_api.rb', line 1220 def (token, chat_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ChatsApi.unpin_chat_message ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling ChatsApi.unpin_chat_message" if token.nil? # verify the required parameter 'chat_id' is set fail ArgumentError, "Missing the required parameter 'chat_id' when calling ChatsApi.unpin_chat_message" if chat_id.nil? # resource path local_var_path = "/bot{token}/unpinChatMessage".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} query_params[:'chat_id'] = chat_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(: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 => 'ResponseBool') if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatsApi#unpin_chat_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |