Class: Teleswagger::StickersApi
- Inherits:
-
Object
- Object
- Teleswagger::StickersApi
- Defined in:
- lib/teleswagger/api/stickers_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
- #add_sticker_to_set(token, user_id, name, png_sticker, emojis, opts = {}) ⇒ ResponseBool
- #add_sticker_to_set_link(token, body, opts = {}) ⇒ ResponseBool
-
#add_sticker_to_set_link_with_http_info(token, body, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
ResponseBool data, response status code and response headers.
-
#add_sticker_to_set_with_http_info(token, user_id, name, png_sticker, emojis, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
ResponseBool data, response status code and response headers.
- #create_new_sticker_set(token, user_id, name, title, png_sticker, emojis, opts = {}) ⇒ File
- #create_new_sticker_set_link(token, body, opts = {}) ⇒ File
-
#create_new_sticker_set_link_with_http_info(token, body, opts = {}) ⇒ Array<(File, Fixnum, Hash)>
File data, response status code and response headers.
-
#create_new_sticker_set_with_http_info(token, user_id, name, title, png_sticker, emojis, opts = {}) ⇒ Array<(File, Fixnum, Hash)>
File data, response status code and response headers.
- #delete_sticker_from_set(token, sticker, opts = {}) ⇒ ResponseBool
-
#delete_sticker_from_set_with_http_info(token, sticker, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
ResponseBool data, response status code and response headers.
- #get_sticker_set(token, name, opts = {}) ⇒ InlineResponse2008
-
#get_sticker_set_with_http_info(token, name, opts = {}) ⇒ Array<(InlineResponse2008, Fixnum, Hash)>
InlineResponse2008 data, response status code and response headers.
-
#initialize(api_client = ApiClient.default) ⇒ StickersApi
constructor
A new instance of StickersApi.
- #set_sticker_position_in_set(token, sticker, position, opts = {}) ⇒ ResponseBool
-
#set_sticker_position_in_set_with_http_info(token, sticker, position, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
ResponseBool data, response status code and response headers.
- #upload_sticker_file(token, user_id, png_sticker, opts = {}) ⇒ File
- #upload_sticker_file_link(token, user_id, png_sticker, opts = {}) ⇒ File
-
#upload_sticker_file_link_with_http_info(token, user_id, png_sticker, opts = {}) ⇒ Array<(File, Fixnum, Hash)>
File data, response status code and response headers.
-
#upload_sticker_file_with_http_info(token, user_id, png_sticker, opts = {}) ⇒ Array<(File, Fixnum, Hash)>
File data, response status code and response headers.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ StickersApi
Returns a new instance of StickersApi.
30 31 32 |
# File 'lib/teleswagger/api/stickers_api.rb', line 30 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
28 29 30 |
# File 'lib/teleswagger/api/stickers_api.rb', line 28 def api_client @api_client end |
Instance Method Details
#add_sticker_to_set(token, user_id, name, png_sticker, emojis, opts = {}) ⇒ ResponseBool
44 45 46 47 |
# File 'lib/teleswagger/api/stickers_api.rb', line 44 def add_sticker_to_set(token, user_id, name, png_sticker, emojis, opts = {}) data, _status_code, _headers = add_sticker_to_set_with_http_info(token, user_id, name, png_sticker, emojis, opts) return data end |
#add_sticker_to_set_link(token, body, opts = {}) ⇒ ResponseBool
120 121 122 123 |
# File 'lib/teleswagger/api/stickers_api.rb', line 120 def add_sticker_to_set_link(token, body, opts = {}) data, _status_code, _headers = add_sticker_to_set_link_with_http_info(token, body, opts) return data end |
#add_sticker_to_set_link_with_http_info(token, body, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
Returns ResponseBool data, response status code and response headers.
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/teleswagger/api/stickers_api.rb', line 131 def add_sticker_to_set_link_with_http_info(token, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: StickersApi.add_sticker_to_set_link ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.add_sticker_to_set_link" if token.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling StickersApi.add_sticker_to_set_link" if body.nil? # resource path local_var_path = "/bot{token}/addStickerToSet#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(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: StickersApi#add_sticker_to_set_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#add_sticker_to_set_with_http_info(token, user_id, name, png_sticker, emojis, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
Returns ResponseBool data, response status code and response headers.
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 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/teleswagger/api/stickers_api.rb', line 59 def add_sticker_to_set_with_http_info(token, user_id, name, png_sticker, emojis, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: StickersApi.add_sticker_to_set ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.add_sticker_to_set" if token.nil? # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling StickersApi.add_sticker_to_set" if user_id.nil? # verify the required parameter 'name' is set fail ArgumentError, "Missing the required parameter 'name' when calling StickersApi.add_sticker_to_set" if name.nil? # verify the required parameter 'png_sticker' is set fail ArgumentError, "Missing the required parameter 'png_sticker' when calling StickersApi.add_sticker_to_set" if png_sticker.nil? # verify the required parameter 'emojis' is set fail ArgumentError, "Missing the required parameter 'emojis' when calling StickersApi.add_sticker_to_set" if emojis.nil? # resource path local_var_path = "/bot{token}/addStickerToSet".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["user_id"] = user_id form_params["name"] = name form_params["png_sticker"] = png_sticker form_params["emojis"] = emojis form_params["mask_position"] = opts[:'mask_position'] if !opts[:'mask_position'].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 => 'ResponseBool') if @api_client.config.debugging @api_client.config.logger.debug "API called: StickersApi#add_sticker_to_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_new_sticker_set(token, user_id, name, title, png_sticker, emojis, opts = {}) ⇒ File
187 188 189 190 |
# File 'lib/teleswagger/api/stickers_api.rb', line 187 def create_new_sticker_set(token, user_id, name, title, png_sticker, emojis, opts = {}) data, _status_code, _headers = create_new_sticker_set_with_http_info(token, user_id, name, title, png_sticker, emojis, opts) return data end |
#create_new_sticker_set_link(token, body, opts = {}) ⇒ File
269 270 271 272 |
# File 'lib/teleswagger/api/stickers_api.rb', line 269 def create_new_sticker_set_link(token, body, opts = {}) data, _status_code, _headers = create_new_sticker_set_link_with_http_info(token, body, opts) return data end |
#create_new_sticker_set_link_with_http_info(token, body, opts = {}) ⇒ Array<(File, Fixnum, Hash)>
Returns File data, response status code and response headers.
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 |
# File 'lib/teleswagger/api/stickers_api.rb', line 280 def create_new_sticker_set_link_with_http_info(token, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: StickersApi.create_new_sticker_set_link ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.create_new_sticker_set_link" if token.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling StickersApi.create_new_sticker_set_link" if body.nil? # resource path local_var_path = "/bot{token}/createNewStickerSet#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(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 => 'File') if @api_client.config.debugging @api_client.config.logger.debug "API called: StickersApi#create_new_sticker_set_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_new_sticker_set_with_http_info(token, user_id, name, title, png_sticker, emojis, opts = {}) ⇒ Array<(File, Fixnum, Hash)>
Returns File data, response status code and response headers.
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'lib/teleswagger/api/stickers_api.rb', line 204 def create_new_sticker_set_with_http_info(token, user_id, name, title, png_sticker, emojis, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: StickersApi.create_new_sticker_set ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.create_new_sticker_set" if token.nil? # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling StickersApi.create_new_sticker_set" if user_id.nil? # verify the required parameter 'name' is set fail ArgumentError, "Missing the required parameter 'name' when calling StickersApi.create_new_sticker_set" if name.nil? # verify the required parameter 'title' is set fail ArgumentError, "Missing the required parameter 'title' when calling StickersApi.create_new_sticker_set" if title.nil? # verify the required parameter 'png_sticker' is set fail ArgumentError, "Missing the required parameter 'png_sticker' when calling StickersApi.create_new_sticker_set" if png_sticker.nil? # verify the required parameter 'emojis' is set fail ArgumentError, "Missing the required parameter 'emojis' when calling StickersApi.create_new_sticker_set" if emojis.nil? # resource path local_var_path = "/bot{token}/createNewStickerSet".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["user_id"] = user_id form_params["name"] = name form_params["title"] = title form_params["png_sticker"] = png_sticker form_params["emojis"] = emojis form_params["is_masks"] = opts[:'is_masks'] if !opts[:'is_masks'].nil? form_params["mask_position"] = opts[:'mask_position'] if !opts[:'mask_position'].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 => 'File') if @api_client.config.debugging @api_client.config.logger.debug "API called: StickersApi#create_new_sticker_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_sticker_from_set(token, sticker, opts = {}) ⇒ ResponseBool
330 331 332 333 |
# File 'lib/teleswagger/api/stickers_api.rb', line 330 def delete_sticker_from_set(token, sticker, opts = {}) data, _status_code, _headers = delete_sticker_from_set_with_http_info(token, sticker, opts) return data end |
#delete_sticker_from_set_with_http_info(token, sticker, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
Returns ResponseBool data, response status code and response headers.
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 |
# File 'lib/teleswagger/api/stickers_api.rb', line 341 def delete_sticker_from_set_with_http_info(token, sticker, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: StickersApi.delete_sticker_from_set ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.delete_sticker_from_set" if token.nil? # verify the required parameter 'sticker' is set fail ArgumentError, "Missing the required parameter 'sticker' when calling StickersApi.delete_sticker_from_set" if sticker.nil? # resource path local_var_path = "/bot{token}/deleteStickerFromSet".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 = {} form_params["sticker"] = sticker # 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: StickersApi#delete_sticker_from_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_sticker_set(token, name, opts = {}) ⇒ InlineResponse2008
392 393 394 395 |
# File 'lib/teleswagger/api/stickers_api.rb', line 392 def get_sticker_set(token, name, opts = {}) data, _status_code, _headers = get_sticker_set_with_http_info(token, name, opts) return data end |
#get_sticker_set_with_http_info(token, name, opts = {}) ⇒ Array<(InlineResponse2008, Fixnum, Hash)>
Returns InlineResponse2008 data, response status code and response headers.
403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 |
# File 'lib/teleswagger/api/stickers_api.rb', line 403 def get_sticker_set_with_http_info(token, name, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: StickersApi.get_sticker_set ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.get_sticker_set" if token.nil? # verify the required parameter 'name' is set fail ArgumentError, "Missing the required parameter 'name' when calling StickersApi.get_sticker_set" if name.nil? # resource path local_var_path = "/bot{token}/getStickerSet".sub('{format}','json').sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} query_params[:'name'] = 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 => 'InlineResponse2008') if @api_client.config.debugging @api_client.config.logger.debug "API called: StickersApi#get_sticker_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#set_sticker_position_in_set(token, sticker, position, opts = {}) ⇒ ResponseBool
455 456 457 458 |
# File 'lib/teleswagger/api/stickers_api.rb', line 455 def set_sticker_position_in_set(token, sticker, position, opts = {}) data, _status_code, _headers = set_sticker_position_in_set_with_http_info(token, sticker, position, opts) return data end |
#set_sticker_position_in_set_with_http_info(token, sticker, position, opts = {}) ⇒ Array<(ResponseBool, Fixnum, Hash)>
Returns ResponseBool data, response status code and response headers.
467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 |
# File 'lib/teleswagger/api/stickers_api.rb', line 467 def set_sticker_position_in_set_with_http_info(token, sticker, position, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: StickersApi.set_sticker_position_in_set ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.set_sticker_position_in_set" if token.nil? # verify the required parameter 'sticker' is set fail ArgumentError, "Missing the required parameter 'sticker' when calling StickersApi.set_sticker_position_in_set" if sticker.nil? # verify the required parameter 'position' is set fail ArgumentError, "Missing the required parameter 'position' when calling StickersApi.set_sticker_position_in_set" if position.nil? # resource path local_var_path = "/bot{token}/setStickerPositionInSet".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 = {} form_params["sticker"] = sticker form_params["position"] = position # 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: StickersApi#set_sticker_position_in_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#upload_sticker_file(token, user_id, png_sticker, opts = {}) ⇒ File
522 523 524 525 |
# File 'lib/teleswagger/api/stickers_api.rb', line 522 def upload_sticker_file(token, user_id, png_sticker, opts = {}) data, _status_code, _headers = upload_sticker_file_with_http_info(token, user_id, png_sticker, opts) return data end |
#upload_sticker_file_link(token, user_id, png_sticker, opts = {}) ⇒ File
589 590 591 592 |
# File 'lib/teleswagger/api/stickers_api.rb', line 589 def upload_sticker_file_link(token, user_id, png_sticker, opts = {}) data, _status_code, _headers = upload_sticker_file_link_with_http_info(token, user_id, png_sticker, opts) return data end |
#upload_sticker_file_link_with_http_info(token, user_id, png_sticker, opts = {}) ⇒ Array<(File, Fixnum, Hash)>
Returns File data, response status code and response headers.
601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 |
# File 'lib/teleswagger/api/stickers_api.rb', line 601 def upload_sticker_file_link_with_http_info(token, user_id, png_sticker, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: StickersApi.upload_sticker_file_link ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.upload_sticker_file_link" if token.nil? # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling StickersApi.upload_sticker_file_link" if user_id.nil? # verify the required parameter 'png_sticker' is set fail ArgumentError, "Missing the required parameter 'png_sticker' when calling StickersApi.upload_sticker_file_link" if png_sticker.nil? # resource path local_var_path = "/bot{token}/uploadStickerFile#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 = {} form_params["user_id"] = user_id form_params["png_sticker"] = png_sticker # 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 => 'File') if @api_client.config.debugging @api_client.config.logger.debug "API called: StickersApi#upload_sticker_file_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#upload_sticker_file_with_http_info(token, user_id, png_sticker, opts = {}) ⇒ Array<(File, Fixnum, Hash)>
Returns File data, response status code and response headers.
534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 |
# File 'lib/teleswagger/api/stickers_api.rb', line 534 def upload_sticker_file_with_http_info(token, user_id, png_sticker, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: StickersApi.upload_sticker_file ..." end # verify the required parameter 'token' is set fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.upload_sticker_file" if token.nil? # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling StickersApi.upload_sticker_file" if user_id.nil? # verify the required parameter 'png_sticker' is set fail ArgumentError, "Missing the required parameter 'png_sticker' when calling StickersApi.upload_sticker_file" if png_sticker.nil? # resource path local_var_path = "/bot{token}/uploadStickerFile".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["user_id"] = user_id form_params["png_sticker"] = png_sticker # 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 => 'File') if @api_client.config.debugging @api_client.config.logger.debug "API called: StickersApi#upload_sticker_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |