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 = {}) ⇒ InlineResponse2009
-
#get_sticker_set_with_http_info(token, name, opts = {}) ⇒ Array<(InlineResponse2009, Fixnum, Hash)>
InlineResponse2009 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.
19 20 21 |
# File 'lib/teleswagger/api/stickers_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/teleswagger/api/stickers_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#add_sticker_to_set(token, user_id, name, png_sticker, emojis, opts = {}) ⇒ ResponseBool
33 34 35 36 |
# File 'lib/teleswagger/api/stickers_api.rb', line 33 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
115 116 117 118 |
# File 'lib/teleswagger/api/stickers_api.rb', line 115 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.
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/teleswagger/api/stickers_api.rb', line 126 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.add_sticker_to_set_link" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling StickersApi.add_sticker_to_set_link" end # resource path local_var_path = "/bot{token}/addStickerToSet#link".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(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.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/teleswagger/api/stickers_api.rb', line 48 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.add_sticker_to_set" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling StickersApi.add_sticker_to_set" end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? fail ArgumentError, "Missing the required parameter 'name' when calling StickersApi.add_sticker_to_set" end # verify the required parameter 'png_sticker' is set if @api_client.config.client_side_validation && png_sticker.nil? fail ArgumentError, "Missing the required parameter 'png_sticker' when calling StickersApi.add_sticker_to_set" end # verify the required parameter 'emojis' is set if @api_client.config.client_side_validation && emojis.nil? fail ArgumentError, "Missing the required parameter 'emojis' when calling StickersApi.add_sticker_to_set" end # resource path local_var_path = "/bot{token}/addStickerToSet".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params["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
182 183 184 185 |
# File 'lib/teleswagger/api/stickers_api.rb', line 182 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
272 273 274 275 |
# File 'lib/teleswagger/api/stickers_api.rb', line 272 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.
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 323 324 325 |
# File 'lib/teleswagger/api/stickers_api.rb', line 283 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.create_new_sticker_set_link" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling StickersApi.create_new_sticker_set_link" end # resource path local_var_path = "/bot{token}/createNewStickerSet#link".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(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.
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'lib/teleswagger/api/stickers_api.rb', line 199 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.create_new_sticker_set" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling StickersApi.create_new_sticker_set" end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? fail ArgumentError, "Missing the required parameter 'name' when calling StickersApi.create_new_sticker_set" end # verify the required parameter 'title' is set if @api_client.config.client_side_validation && title.nil? fail ArgumentError, "Missing the required parameter 'title' when calling StickersApi.create_new_sticker_set" end # verify the required parameter 'png_sticker' is set if @api_client.config.client_side_validation && png_sticker.nil? fail ArgumentError, "Missing the required parameter 'png_sticker' when calling StickersApi.create_new_sticker_set" end # verify the required parameter 'emojis' is set if @api_client.config.client_side_validation && emojis.nil? fail ArgumentError, "Missing the required parameter 'emojis' when calling StickersApi.create_new_sticker_set" end # resource path local_var_path = "/bot{token}/createNewStickerSet".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params["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
333 334 335 336 |
# File 'lib/teleswagger/api/stickers_api.rb', line 333 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.
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 385 386 387 |
# File 'lib/teleswagger/api/stickers_api.rb', line 344 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.delete_sticker_from_set" end # verify the required parameter 'sticker' is set if @api_client.config.client_side_validation && sticker.nil? fail ArgumentError, "Missing the required parameter 'sticker' when calling StickersApi.delete_sticker_from_set" end # resource path local_var_path = "/bot{token}/deleteStickerFromSet".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} 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 = {}) ⇒ InlineResponse2009
395 396 397 398 |
# File 'lib/teleswagger/api/stickers_api.rb', line 395 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<(InlineResponse2009, Fixnum, Hash)>
Returns InlineResponse2009 data, response status code and response headers.
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 447 448 449 |
# File 'lib/teleswagger/api/stickers_api.rb', line 406 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.get_sticker_set" end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? fail ArgumentError, "Missing the required parameter 'name' when calling StickersApi.get_sticker_set" end # resource path local_var_path = "/bot{token}/getStickerSet".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} query_params[:'name'] = name # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InlineResponse2009') 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
458 459 460 461 |
# File 'lib/teleswagger/api/stickers_api.rb', line 458 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.
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 514 515 516 517 518 |
# File 'lib/teleswagger/api/stickers_api.rb', line 470 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.set_sticker_position_in_set" end # verify the required parameter 'sticker' is set if @api_client.config.client_side_validation && sticker.nil? fail ArgumentError, "Missing the required parameter 'sticker' when calling StickersApi.set_sticker_position_in_set" end # verify the required parameter 'position' is set if @api_client.config.client_side_validation && position.nil? fail ArgumentError, "Missing the required parameter 'position' when calling StickersApi.set_sticker_position_in_set" end # resource path local_var_path = "/bot{token}/setStickerPositionInSet".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} 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
527 528 529 530 |
# File 'lib/teleswagger/api/stickers_api.rb', line 527 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
596 597 598 599 |
# File 'lib/teleswagger/api/stickers_api.rb', line 596 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.
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 648 649 650 651 652 653 654 655 656 |
# File 'lib/teleswagger/api/stickers_api.rb', line 608 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.upload_sticker_file_link" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling StickersApi.upload_sticker_file_link" end # verify the required parameter 'png_sticker' is set if @api_client.config.client_side_validation && png_sticker.nil? fail ArgumentError, "Missing the required parameter 'png_sticker' when calling StickersApi.upload_sticker_file_link" end # resource path local_var_path = "/bot{token}/uploadStickerFile#link".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} 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.
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 581 582 583 584 585 586 587 |
# File 'lib/teleswagger/api/stickers_api.rb', line 539 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 if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling StickersApi.upload_sticker_file" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling StickersApi.upload_sticker_file" end # verify the required parameter 'png_sticker' is set if @api_client.config.client_side_validation && png_sticker.nil? fail ArgumentError, "Missing the required parameter 'png_sticker' when calling StickersApi.upload_sticker_file" end # resource path local_var_path = "/bot{token}/uploadStickerFile".sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params["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 |