Class: Weblate::ScreenshotsApi
- Inherits:
-
Object
- Object
- Weblate::ScreenshotsApi
- Defined in:
- lib/weblate/api/screenshots_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ ScreenshotsApi
constructor
A new instance of ScreenshotsApi.
-
#screenshots_create(screenshot, opts = {}) ⇒ Screenshot
Screenshots API.
-
#screenshots_create_with_http_info(screenshot, opts = {}) ⇒ Array<(Screenshot, Integer, Hash)>
Screenshots API.
-
#screenshots_destroy(id, opts = {}) ⇒ nil
Screenshots API.
-
#screenshots_destroy_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Screenshots API.
-
#screenshots_file_create(id, image, opts = {}) ⇒ ScreenshotFile
Screenshots API.
-
#screenshots_file_create_with_http_info(id, image, opts = {}) ⇒ Array<(ScreenshotFile, Integer, Hash)>
Screenshots API.
-
#screenshots_file_retrieve(id, opts = {}) ⇒ ScreenshotFile
Screenshots API.
-
#screenshots_file_retrieve_with_http_info(id, opts = {}) ⇒ Array<(ScreenshotFile, Integer, Hash)>
Screenshots API.
-
#screenshots_file_update(id, image, opts = {}) ⇒ ScreenshotFile
Screenshots API.
-
#screenshots_file_update_with_http_info(id, image, opts = {}) ⇒ Array<(ScreenshotFile, Integer, Hash)>
Screenshots API.
-
#screenshots_list(opts = {}) ⇒ PaginatedScreenshotList
Screenshots API.
-
#screenshots_list_with_http_info(opts = {}) ⇒ Array<(PaginatedScreenshotList, Integer, Hash)>
Screenshots API.
-
#screenshots_partial_update(id, opts = {}) ⇒ Screenshot
Screenshots API.
-
#screenshots_partial_update_with_http_info(id, opts = {}) ⇒ Array<(Screenshot, Integer, Hash)>
Screenshots API.
-
#screenshots_retrieve(id, opts = {}) ⇒ Screenshot
Screenshots API.
-
#screenshots_retrieve_with_http_info(id, opts = {}) ⇒ Array<(Screenshot, Integer, Hash)>
Screenshots API.
-
#screenshots_units_create(id, screenshot, opts = {}) ⇒ Screenshot
Screenshots API.
-
#screenshots_units_create_with_http_info(id, screenshot, opts = {}) ⇒ Array<(Screenshot, Integer, Hash)>
Screenshots API.
-
#screenshots_units_destroy(id, unit_id, opts = {}) ⇒ nil
Screenshots API.
-
#screenshots_units_destroy_with_http_info(id, unit_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Screenshots API.
-
#screenshots_update(id, screenshot, opts = {}) ⇒ Screenshot
Screenshots API.
-
#screenshots_update_with_http_info(id, screenshot, opts = {}) ⇒ Array<(Screenshot, Integer, Hash)>
Screenshots API.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ScreenshotsApi
Returns a new instance of ScreenshotsApi.
19 20 21 |
# File 'lib/weblate/api/screenshots_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/weblate/api/screenshots_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#screenshots_create(screenshot, opts = {}) ⇒ Screenshot
Screenshots API.
26 27 28 29 |
# File 'lib/weblate/api/screenshots_api.rb', line 26 def screenshots_create(screenshot, opts = {}) data, _status_code, _headers = screenshots_create_with_http_info(screenshot, opts) data end |
#screenshots_create_with_http_info(screenshot, opts = {}) ⇒ Array<(Screenshot, Integer, Hash)>
Screenshots API.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/weblate/api/screenshots_api.rb', line 35 def screenshots_create_with_http_info(screenshot, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScreenshotsApi.screenshots_create ...' end # verify the required parameter 'screenshot' is set if @api_client.config.client_side_validation && screenshot.nil? fail ArgumentError, "Missing the required parameter 'screenshot' when calling ScreenshotsApi.screenshots_create" end # resource path local_var_path = '/screenshots/' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(screenshot) # return_type return_type = opts[:debug_return_type] || 'Screenshot' # auth_names auth_names = opts[:debug_auth_names] || ['tokenAuth'] = opts.merge( :operation => :"ScreenshotsApi.screenshots_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ScreenshotsApi#screenshots_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#screenshots_destroy(id, opts = {}) ⇒ nil
Screenshots API.
92 93 94 95 |
# File 'lib/weblate/api/screenshots_api.rb', line 92 def screenshots_destroy(id, opts = {}) screenshots_destroy_with_http_info(id, opts) nil end |
#screenshots_destroy_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Screenshots API.
101 102 103 104 105 106 107 108 109 110 111 112 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 |
# File 'lib/weblate/api/screenshots_api.rb', line 101 def screenshots_destroy_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScreenshotsApi.screenshots_destroy ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ScreenshotsApi.screenshots_destroy" end pattern = Regexp.new(/^[^\/]+$/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling ScreenshotsApi.screenshots_destroy, must conform to the pattern #{pattern}." end # resource path local_var_path = '/screenshots/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['tokenAuth'] = opts.merge( :operation => :"ScreenshotsApi.screenshots_destroy", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ScreenshotsApi#screenshots_destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#screenshots_file_create(id, image, opts = {}) ⇒ ScreenshotFile
Screenshots API.
157 158 159 160 |
# File 'lib/weblate/api/screenshots_api.rb', line 157 def screenshots_file_create(id, image, opts = {}) data, _status_code, _headers = screenshots_file_create_with_http_info(id, image, opts) data end |
#screenshots_file_create_with_http_info(id, image, opts = {}) ⇒ Array<(ScreenshotFile, Integer, Hash)>
Screenshots API.
167 168 169 170 171 172 173 174 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 219 220 221 222 223 224 225 226 227 228 |
# File 'lib/weblate/api/screenshots_api.rb', line 167 def screenshots_file_create_with_http_info(id, image, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScreenshotsApi.screenshots_file_create ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ScreenshotsApi.screenshots_file_create" end pattern = Regexp.new(/^[^\/]+$/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling ScreenshotsApi.screenshots_file_create, must conform to the pattern #{pattern}." end # verify the required parameter 'image' is set if @api_client.config.client_side_validation && image.nil? fail ArgumentError, "Missing the required parameter 'image' when calling ScreenshotsApi.screenshots_file_create" end # resource path local_var_path = '/screenshots/{id}/file/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} form_params['image'] = image # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ScreenshotFile' # auth_names auth_names = opts[:debug_auth_names] || ['tokenAuth'] = opts.merge( :operation => :"ScreenshotsApi.screenshots_file_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ScreenshotsApi#screenshots_file_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#screenshots_file_retrieve(id, opts = {}) ⇒ ScreenshotFile
Screenshots API.
234 235 236 237 |
# File 'lib/weblate/api/screenshots_api.rb', line 234 def screenshots_file_retrieve(id, opts = {}) data, _status_code, _headers = screenshots_file_retrieve_with_http_info(id, opts) data end |
#screenshots_file_retrieve_with_http_info(id, opts = {}) ⇒ Array<(ScreenshotFile, Integer, Hash)>
Screenshots API.
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 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/weblate/api/screenshots_api.rb', line 243 def screenshots_file_retrieve_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScreenshotsApi.screenshots_file_retrieve ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ScreenshotsApi.screenshots_file_retrieve" end pattern = Regexp.new(/^[^\/]+$/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling ScreenshotsApi.screenshots_file_retrieve, must conform to the pattern #{pattern}." end # resource path local_var_path = '/screenshots/{id}/file/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ScreenshotFile' # auth_names auth_names = opts[:debug_auth_names] || ['tokenAuth'] = opts.merge( :operation => :"ScreenshotsApi.screenshots_file_retrieve", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ScreenshotsApi#screenshots_file_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#screenshots_file_update(id, image, opts = {}) ⇒ ScreenshotFile
Screenshots API.
301 302 303 304 |
# File 'lib/weblate/api/screenshots_api.rb', line 301 def screenshots_file_update(id, image, opts = {}) data, _status_code, _headers = screenshots_file_update_with_http_info(id, image, opts) data end |
#screenshots_file_update_with_http_info(id, image, opts = {}) ⇒ Array<(ScreenshotFile, Integer, Hash)>
Screenshots API.
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 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 |
# File 'lib/weblate/api/screenshots_api.rb', line 311 def screenshots_file_update_with_http_info(id, image, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScreenshotsApi.screenshots_file_update ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ScreenshotsApi.screenshots_file_update" end pattern = Regexp.new(/^[^\/]+$/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling ScreenshotsApi.screenshots_file_update, must conform to the pattern #{pattern}." end # verify the required parameter 'image' is set if @api_client.config.client_side_validation && image.nil? fail ArgumentError, "Missing the required parameter 'image' when calling ScreenshotsApi.screenshots_file_update" end # resource path local_var_path = '/screenshots/{id}/file/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} form_params['image'] = image # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ScreenshotFile' # auth_names auth_names = opts[:debug_auth_names] || ['tokenAuth'] = opts.merge( :operation => :"ScreenshotsApi.screenshots_file_update", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ScreenshotsApi#screenshots_file_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#screenshots_list(opts = {}) ⇒ PaginatedScreenshotList
Screenshots API.
379 380 381 382 |
# File 'lib/weblate/api/screenshots_api.rb', line 379 def screenshots_list(opts = {}) data, _status_code, _headers = screenshots_list_with_http_info(opts) data end |
#screenshots_list_with_http_info(opts = {}) ⇒ Array<(PaginatedScreenshotList, Integer, Hash)>
Screenshots API.
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 |
# File 'lib/weblate/api/screenshots_api.rb', line 389 def screenshots_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScreenshotsApi.screenshots_list ...' end # resource path local_var_path = '/screenshots/' # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PaginatedScreenshotList' # auth_names auth_names = opts[:debug_auth_names] || ['tokenAuth'] = opts.merge( :operation => :"ScreenshotsApi.screenshots_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ScreenshotsApi#screenshots_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#screenshots_partial_update(id, opts = {}) ⇒ Screenshot
Screenshots API.
440 441 442 443 |
# File 'lib/weblate/api/screenshots_api.rb', line 440 def screenshots_partial_update(id, opts = {}) data, _status_code, _headers = screenshots_partial_update_with_http_info(id, opts) data end |
#screenshots_partial_update_with_http_info(id, opts = {}) ⇒ Array<(Screenshot, Integer, Hash)>
Screenshots API.
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 |
# File 'lib/weblate/api/screenshots_api.rb', line 450 def screenshots_partial_update_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScreenshotsApi.screenshots_partial_update ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ScreenshotsApi.screenshots_partial_update" end pattern = Regexp.new(/^[^\/]+$/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling ScreenshotsApi.screenshots_partial_update, must conform to the pattern #{pattern}." end # resource path local_var_path = '/screenshots/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'patched_screenshot']) # return_type return_type = opts[:debug_return_type] || 'Screenshot' # auth_names auth_names = opts[:debug_auth_names] || ['tokenAuth'] = opts.merge( :operation => :"ScreenshotsApi.screenshots_partial_update", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ScreenshotsApi#screenshots_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#screenshots_retrieve(id, opts = {}) ⇒ Screenshot
Screenshots API.
512 513 514 515 |
# File 'lib/weblate/api/screenshots_api.rb', line 512 def screenshots_retrieve(id, opts = {}) data, _status_code, _headers = screenshots_retrieve_with_http_info(id, opts) data end |
#screenshots_retrieve_with_http_info(id, opts = {}) ⇒ Array<(Screenshot, Integer, Hash)>
Screenshots API.
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 |
# File 'lib/weblate/api/screenshots_api.rb', line 521 def screenshots_retrieve_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScreenshotsApi.screenshots_retrieve ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ScreenshotsApi.screenshots_retrieve" end pattern = Regexp.new(/^[^\/]+$/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling ScreenshotsApi.screenshots_retrieve, must conform to the pattern #{pattern}." end # resource path local_var_path = '/screenshots/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Screenshot' # auth_names auth_names = opts[:debug_auth_names] || ['tokenAuth'] = opts.merge( :operation => :"ScreenshotsApi.screenshots_retrieve", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ScreenshotsApi#screenshots_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#screenshots_units_create(id, screenshot, opts = {}) ⇒ Screenshot
Screenshots API.
579 580 581 582 |
# File 'lib/weblate/api/screenshots_api.rb', line 579 def screenshots_units_create(id, screenshot, opts = {}) data, _status_code, _headers = screenshots_units_create_with_http_info(id, screenshot, opts) data end |
#screenshots_units_create_with_http_info(id, screenshot, opts = {}) ⇒ Array<(Screenshot, Integer, Hash)>
Screenshots API.
589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 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 |
# File 'lib/weblate/api/screenshots_api.rb', line 589 def screenshots_units_create_with_http_info(id, screenshot, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScreenshotsApi.screenshots_units_create ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ScreenshotsApi.screenshots_units_create" end pattern = Regexp.new(/^[^\/]+$/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling ScreenshotsApi.screenshots_units_create, must conform to the pattern #{pattern}." end # verify the required parameter 'screenshot' is set if @api_client.config.client_side_validation && screenshot.nil? fail ArgumentError, "Missing the required parameter 'screenshot' when calling ScreenshotsApi.screenshots_units_create" end # resource path local_var_path = '/screenshots/{id}/units/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(screenshot) # return_type return_type = opts[:debug_return_type] || 'Screenshot' # auth_names auth_names = opts[:debug_auth_names] || ['tokenAuth'] = opts.merge( :operation => :"ScreenshotsApi.screenshots_units_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ScreenshotsApi#screenshots_units_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#screenshots_units_destroy(id, unit_id, opts = {}) ⇒ nil
Screenshots API.
656 657 658 659 |
# File 'lib/weblate/api/screenshots_api.rb', line 656 def screenshots_units_destroy(id, unit_id, opts = {}) screenshots_units_destroy_with_http_info(id, unit_id, opts) nil end |
#screenshots_units_destroy_with_http_info(id, unit_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Screenshots API.
666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 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 |
# File 'lib/weblate/api/screenshots_api.rb', line 666 def screenshots_units_destroy_with_http_info(id, unit_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScreenshotsApi.screenshots_units_destroy ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ScreenshotsApi.screenshots_units_destroy" end pattern = Regexp.new(/^[^\/]+$/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling ScreenshotsApi.screenshots_units_destroy, must conform to the pattern #{pattern}." end # verify the required parameter 'unit_id' is set if @api_client.config.client_side_validation && unit_id.nil? fail ArgumentError, "Missing the required parameter 'unit_id' when calling ScreenshotsApi.screenshots_units_destroy" end pattern = Regexp.new(/^[0-9]+$/) if @api_client.config.client_side_validation && unit_id !~ pattern fail ArgumentError, "invalid value for 'unit_id' when calling ScreenshotsApi.screenshots_units_destroy, must conform to the pattern #{pattern}." end # resource path local_var_path = '/screenshots/{id}/units/{unit_id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'unit_id' + '}', CGI.escape(unit_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['tokenAuth'] = opts.merge( :operation => :"ScreenshotsApi.screenshots_units_destroy", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ScreenshotsApi#screenshots_units_destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#screenshots_update(id, screenshot, opts = {}) ⇒ Screenshot
Screenshots API.
731 732 733 734 |
# File 'lib/weblate/api/screenshots_api.rb', line 731 def screenshots_update(id, screenshot, opts = {}) data, _status_code, _headers = screenshots_update_with_http_info(id, screenshot, opts) data end |
#screenshots_update_with_http_info(id, screenshot, opts = {}) ⇒ Array<(Screenshot, Integer, Hash)>
Screenshots API.
741 742 743 744 745 746 747 748 749 750 751 752 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 796 797 798 799 800 801 |
# File 'lib/weblate/api/screenshots_api.rb', line 741 def screenshots_update_with_http_info(id, screenshot, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScreenshotsApi.screenshots_update ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ScreenshotsApi.screenshots_update" end pattern = Regexp.new(/^[^\/]+$/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling ScreenshotsApi.screenshots_update, must conform to the pattern #{pattern}." end # verify the required parameter 'screenshot' is set if @api_client.config.client_side_validation && screenshot.nil? fail ArgumentError, "Missing the required parameter 'screenshot' when calling ScreenshotsApi.screenshots_update" end # resource path local_var_path = '/screenshots/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(screenshot) # return_type return_type = opts[:debug_return_type] || 'Screenshot' # auth_names auth_names = opts[:debug_auth_names] || ['tokenAuth'] = opts.merge( :operation => :"ScreenshotsApi.screenshots_update", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ScreenshotsApi#screenshots_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |