groupdocs_parser_cloud 22.12 → 25.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/lib/groupdocs_parser_cloud/api/file_api.rb +6 -6
- data/lib/groupdocs_parser_cloud/api/folder_api.rb +6 -6
- data/lib/groupdocs_parser_cloud/api/info_api.rb +3 -3
- data/lib/groupdocs_parser_cloud/api/parse_api.rb +101 -4
- data/lib/groupdocs_parser_cloud/api/storage_api.rb +5 -5
- data/lib/groupdocs_parser_cloud/api/template_api.rb +4 -4
- data/lib/groupdocs_parser_cloud/api_client.rb +4 -4
- data/lib/groupdocs_parser_cloud/{api_error.rb → api_client_error.rb} +22 -17
- data/lib/groupdocs_parser_cloud/configuration.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/barcode.rb +254 -0
- data/lib/groupdocs_parser_cloud/models/barcode_page.rb +229 -0
- data/lib/groupdocs_parser_cloud/models/barcodes_options.rb +254 -0
- data/lib/groupdocs_parser_cloud/models/barcodes_result.rb +216 -0
- data/lib/groupdocs_parser_cloud/models/container_item.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/container_item_info.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/container_options.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/container_result.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/coordinates.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/create_template_options.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/detector_parameters.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/disc_usage.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/error.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/error_details.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/field.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/field_data.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/field_position.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/file_info.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/file_type.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/file_version.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/file_versions.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/files_list.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/files_upload_result.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/format.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/formats_result.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/formatted_text_options.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/image.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/image_page.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/images_options.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/images_result.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/info_options.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/info_result.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/object_exist.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/page.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/page_area.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/page_table_area.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/page_table_area_cell.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/page_text_area.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/parse_options.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/parse_result.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/parser_options.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/point.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/rectangle.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/size.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/storage_exist.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/storage_file.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/table.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/table_layout.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/template.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/template_options.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/template_result.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/text_options.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/text_page.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/text_result.rb +1 -1
- data/lib/groupdocs_parser_cloud/models/text_style.rb +1 -1
- data/lib/groupdocs_parser_cloud/version.rb +2 -2
- data/lib/groupdocs_parser_cloud.rb +6 -2
- metadata +15 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3763c8951cc51dd422df220875faefb8f0b77311928ba7fe48d528f31668f293
|
4
|
+
data.tar.gz: 26afb2b067463fb4365ad3f10a73c458f460874ab41f42f5f1d7e52bac75a9ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09905ffe2d520aac5ea1dec24e2db76507ae2f9cd322b7e3591786965f49b13dec4ac4501b171fc505fa1cac8d4763430555fb91fdaa587d55e221f79c4df40f'
|
7
|
+
data.tar.gz: ca3067c80dfa6468ff16d3c45cfe62a753a034b354e9bf94368c82019698592bb310b8b02fa7ae88606ef3f403ef9dd594937e8b73175e647a83500b1464213b
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="file.rb">
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -449,7 +449,7 @@ end
|
|
449
449
|
#
|
450
450
|
# --------------------------------------------------------------------------------------------------------------------
|
451
451
|
# <copyright company="Aspose Pty Ltd" file="copy_file_request.rb">
|
452
|
-
# Copyright (c)
|
452
|
+
# Copyright (c) Aspose Pty Ltd
|
453
453
|
# </copyright>
|
454
454
|
# <summary>
|
455
455
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -510,7 +510,7 @@ end
|
|
510
510
|
#
|
511
511
|
# --------------------------------------------------------------------------------------------------------------------
|
512
512
|
# <copyright company="Aspose Pty Ltd" file="delete_file_request.rb">
|
513
|
-
# Copyright (c)
|
513
|
+
# Copyright (c) Aspose Pty Ltd
|
514
514
|
# </copyright>
|
515
515
|
# <summary>
|
516
516
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -563,7 +563,7 @@ end
|
|
563
563
|
#
|
564
564
|
# --------------------------------------------------------------------------------------------------------------------
|
565
565
|
# <copyright company="Aspose Pty Ltd" file="download_file_request.rb">
|
566
|
-
# Copyright (c)
|
566
|
+
# Copyright (c) Aspose Pty Ltd
|
567
567
|
# </copyright>
|
568
568
|
# <summary>
|
569
569
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -616,7 +616,7 @@ end
|
|
616
616
|
#
|
617
617
|
# --------------------------------------------------------------------------------------------------------------------
|
618
618
|
# <copyright company="Aspose Pty Ltd" file="move_file_request.rb">
|
619
|
-
# Copyright (c)
|
619
|
+
# Copyright (c) Aspose Pty Ltd
|
620
620
|
# </copyright>
|
621
621
|
# <summary>
|
622
622
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -677,7 +677,7 @@ end
|
|
677
677
|
#
|
678
678
|
# --------------------------------------------------------------------------------------------------------------------
|
679
679
|
# <copyright company="Aspose Pty Ltd" file="upload_file_request.rb">
|
680
|
-
# Copyright (c)
|
680
|
+
# Copyright (c) Aspose Pty Ltd
|
681
681
|
# </copyright>
|
682
682
|
# <summary>
|
683
683
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="folder.rb">
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -430,7 +430,7 @@ end
|
|
430
430
|
#
|
431
431
|
# --------------------------------------------------------------------------------------------------------------------
|
432
432
|
# <copyright company="Aspose Pty Ltd" file="copy_folder_request.rb">
|
433
|
-
# Copyright (c)
|
433
|
+
# Copyright (c) Aspose Pty Ltd
|
434
434
|
# </copyright>
|
435
435
|
# <summary>
|
436
436
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -487,7 +487,7 @@ end
|
|
487
487
|
#
|
488
488
|
# --------------------------------------------------------------------------------------------------------------------
|
489
489
|
# <copyright company="Aspose Pty Ltd" file="create_folder_request.rb">
|
490
|
-
# Copyright (c)
|
490
|
+
# Copyright (c) Aspose Pty Ltd
|
491
491
|
# </copyright>
|
492
492
|
# <summary>
|
493
493
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -536,7 +536,7 @@ end
|
|
536
536
|
#
|
537
537
|
# --------------------------------------------------------------------------------------------------------------------
|
538
538
|
# <copyright company="Aspose Pty Ltd" file="delete_folder_request.rb">
|
539
|
-
# Copyright (c)
|
539
|
+
# Copyright (c) Aspose Pty Ltd
|
540
540
|
# </copyright>
|
541
541
|
# <summary>
|
542
542
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -589,7 +589,7 @@ end
|
|
589
589
|
#
|
590
590
|
# --------------------------------------------------------------------------------------------------------------------
|
591
591
|
# <copyright company="Aspose Pty Ltd" file="get_files_list_request.rb">
|
592
|
-
# Copyright (c)
|
592
|
+
# Copyright (c) Aspose Pty Ltd
|
593
593
|
# </copyright>
|
594
594
|
# <summary>
|
595
595
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -638,7 +638,7 @@ end
|
|
638
638
|
#
|
639
639
|
# --------------------------------------------------------------------------------------------------------------------
|
640
640
|
# <copyright company="Aspose Pty Ltd" file="move_folder_request.rb">
|
641
|
-
# Copyright (c)
|
641
|
+
# Copyright (c) Aspose Pty Ltd
|
642
642
|
# </copyright>
|
643
643
|
# <summary>
|
644
644
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="info.rb">
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -274,7 +274,7 @@ end
|
|
274
274
|
#
|
275
275
|
# --------------------------------------------------------------------------------------------------------------------
|
276
276
|
# <copyright company="Aspose Pty Ltd" file="container_request.rb">
|
277
|
-
# Copyright (c)
|
277
|
+
# Copyright (c) Aspose Pty Ltd
|
278
278
|
# </copyright>
|
279
279
|
# <summary>
|
280
280
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -319,7 +319,7 @@ end
|
|
319
319
|
#
|
320
320
|
# --------------------------------------------------------------------------------------------------------------------
|
321
321
|
# <copyright company="Aspose Pty Ltd" file="get_info_request.rb">
|
322
|
-
# Copyright (c)
|
322
|
+
# Copyright (c) Aspose Pty Ltd
|
323
323
|
# </copyright>
|
324
324
|
# <summary>
|
325
325
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="parse.rb">
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -64,6 +64,58 @@ module GroupDocsParserCloud
|
|
64
64
|
return new(config)
|
65
65
|
end
|
66
66
|
|
67
|
+
# Extract barcodes from document.
|
68
|
+
#
|
69
|
+
# @param request barcodes_request
|
70
|
+
# @return [BarcodesResult]
|
71
|
+
def barcodes(request)
|
72
|
+
data, _status_code, _headers = barcodes_with_http_info(request)
|
73
|
+
data
|
74
|
+
end
|
75
|
+
|
76
|
+
# Extract barcodes from document.
|
77
|
+
#
|
78
|
+
# @param request barcodes_request
|
79
|
+
# @return [Array<(BarcodesResult, Fixnum, Hash)>]
|
80
|
+
# BarcodesResult data, response status code and response headers
|
81
|
+
def barcodes_with_http_info(request)
|
82
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? BarcodesRequest
|
83
|
+
|
84
|
+
@api_client.config.logger.debug 'Calling API: ParseApi.barcodes ...' if @api_client.config.debugging
|
85
|
+
# verify the required parameter 'options' is set
|
86
|
+
raise ArgumentError, 'Missing the required parameter options when calling ParseApi.barcodes' if @api_client.config.client_side_validation && request.options.nil?
|
87
|
+
# resource path
|
88
|
+
local_var_path = '/parser/barcodes'
|
89
|
+
|
90
|
+
# query parameters
|
91
|
+
query_params = {}
|
92
|
+
|
93
|
+
# header parameters
|
94
|
+
header_params = {}
|
95
|
+
# HTTP header 'Accept' (if needed)
|
96
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
97
|
+
# HTTP header 'Content-Type'
|
98
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
99
|
+
|
100
|
+
# form parameters
|
101
|
+
form_params = {}
|
102
|
+
|
103
|
+
# http body (model)
|
104
|
+
post_body = @api_client.object_to_http_body(request.options)
|
105
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
106
|
+
header_params: header_params,
|
107
|
+
query_params: query_params,
|
108
|
+
form_params: form_params,
|
109
|
+
body: post_body,
|
110
|
+
access_token: get_access_token,
|
111
|
+
return_type: 'BarcodesResult')
|
112
|
+
if @api_client.config.debugging
|
113
|
+
@api_client.config.logger.debug "API called:
|
114
|
+
ParseApi#barcodes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
115
|
+
end
|
116
|
+
[data, status_code, headers]
|
117
|
+
end
|
118
|
+
|
67
119
|
# Extract images from document.
|
68
120
|
#
|
69
121
|
# @param request images_request
|
@@ -273,11 +325,56 @@ module GroupDocsParserCloud
|
|
273
325
|
end
|
274
326
|
end
|
275
327
|
end
|
328
|
+
end
|
329
|
+
#
|
330
|
+
# --------------------------------------------------------------------------------------------------------------------
|
331
|
+
# <copyright company="Aspose Pty Ltd" file="barcodes_request.rb">
|
332
|
+
# Copyright (c) Aspose Pty Ltd
|
333
|
+
# </copyright>
|
334
|
+
# <summary>
|
335
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
336
|
+
# of this software and associated documentation files (the "Software"), to deal
|
337
|
+
# in the Software without restriction, including without limitation the rights
|
338
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
339
|
+
# copies of the Software, and to permit persons to whom the Software is
|
340
|
+
# furnished to do so, subject to the following conditions:
|
341
|
+
#
|
342
|
+
# The above copyright notice and this permission notice shall be included in all
|
343
|
+
# copies or substantial portions of the Software.
|
344
|
+
#
|
345
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
346
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
347
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
348
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
349
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
350
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
351
|
+
# SOFTWARE.
|
352
|
+
# </summary>
|
353
|
+
# --------------------------------------------------------------------------------------------------------------------
|
354
|
+
#
|
355
|
+
|
356
|
+
module GroupDocsParserCloud
|
357
|
+
|
358
|
+
#
|
359
|
+
# Request model for barcodes operation.
|
360
|
+
#
|
361
|
+
class BarcodesRequest
|
362
|
+
|
363
|
+
# Extract barcode options.
|
364
|
+
attr_accessor :options
|
365
|
+
|
366
|
+
#
|
367
|
+
# Initializes a new instance.
|
368
|
+
# @param options Extract barcode options.
|
369
|
+
def initialize(options)
|
370
|
+
self.options = options
|
371
|
+
end
|
372
|
+
end
|
276
373
|
end
|
277
374
|
#
|
278
375
|
# --------------------------------------------------------------------------------------------------------------------
|
279
376
|
# <copyright company="Aspose Pty Ltd" file="images_request.rb">
|
280
|
-
# Copyright (c)
|
377
|
+
# Copyright (c) Aspose Pty Ltd
|
281
378
|
# </copyright>
|
282
379
|
# <summary>
|
283
380
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -322,7 +419,7 @@ end
|
|
322
419
|
#
|
323
420
|
# --------------------------------------------------------------------------------------------------------------------
|
324
421
|
# <copyright company="Aspose Pty Ltd" file="parse_request.rb">
|
325
|
-
# Copyright (c)
|
422
|
+
# Copyright (c) Aspose Pty Ltd
|
326
423
|
# </copyright>
|
327
424
|
# <summary>
|
328
425
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -367,7 +464,7 @@ end
|
|
367
464
|
#
|
368
465
|
# --------------------------------------------------------------------------------------------------------------------
|
369
466
|
# <copyright company="Aspose Pty Ltd" file="text_request.rb">
|
370
|
-
# Copyright (c)
|
467
|
+
# Copyright (c) Aspose Pty Ltd
|
371
468
|
# </copyright>
|
372
469
|
# <summary>
|
373
470
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="storage.rb">
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -350,7 +350,7 @@ end
|
|
350
350
|
#
|
351
351
|
# --------------------------------------------------------------------------------------------------------------------
|
352
352
|
# <copyright company="Aspose Pty Ltd" file="get_disc_usage_request.rb">
|
353
|
-
# Copyright (c)
|
353
|
+
# Copyright (c) Aspose Pty Ltd
|
354
354
|
# </copyright>
|
355
355
|
# <summary>
|
356
356
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -395,7 +395,7 @@ end
|
|
395
395
|
#
|
396
396
|
# --------------------------------------------------------------------------------------------------------------------
|
397
397
|
# <copyright company="Aspose Pty Ltd" file="get_file_versions_request.rb">
|
398
|
-
# Copyright (c)
|
398
|
+
# Copyright (c) Aspose Pty Ltd
|
399
399
|
# </copyright>
|
400
400
|
# <summary>
|
401
401
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -444,7 +444,7 @@ end
|
|
444
444
|
#
|
445
445
|
# --------------------------------------------------------------------------------------------------------------------
|
446
446
|
# <copyright company="Aspose Pty Ltd" file="object_exists_request.rb">
|
447
|
-
# Copyright (c)
|
447
|
+
# Copyright (c) Aspose Pty Ltd
|
448
448
|
# </copyright>
|
449
449
|
# <summary>
|
450
450
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -497,7 +497,7 @@ end
|
|
497
497
|
#
|
498
498
|
# --------------------------------------------------------------------------------------------------------------------
|
499
499
|
# <copyright company="Aspose Pty Ltd" file="storage_exists_request.rb">
|
500
|
-
# Copyright (c)
|
500
|
+
# Copyright (c) Aspose Pty Ltd
|
501
501
|
# </copyright>
|
502
502
|
# <summary>
|
503
503
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="template.rb">
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -276,7 +276,7 @@ end
|
|
276
276
|
#
|
277
277
|
# --------------------------------------------------------------------------------------------------------------------
|
278
278
|
# <copyright company="Aspose Pty Ltd" file="create_template_request.rb">
|
279
|
-
# Copyright (c)
|
279
|
+
# Copyright (c) Aspose Pty Ltd
|
280
280
|
# </copyright>
|
281
281
|
# <summary>
|
282
282
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -321,7 +321,7 @@ end
|
|
321
321
|
#
|
322
322
|
# --------------------------------------------------------------------------------------------------------------------
|
323
323
|
# <copyright company="Aspose Pty Ltd" file="delete_template_request.rb">
|
324
|
-
# Copyright (c)
|
324
|
+
# Copyright (c) Aspose Pty Ltd
|
325
325
|
# </copyright>
|
326
326
|
# <summary>
|
327
327
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -366,7 +366,7 @@ end
|
|
366
366
|
#
|
367
367
|
# --------------------------------------------------------------------------------------------------------------------
|
368
368
|
# <copyright company="Aspose Pty Ltd" file="get_template_request.rb">
|
369
|
-
# Copyright (c)
|
369
|
+
# Copyright (c) Aspose Pty Ltd
|
370
370
|
# </copyright>
|
371
371
|
# <summary>
|
372
372
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="api_client.rb">
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -30,7 +30,7 @@ require 'tempfile'
|
|
30
30
|
require 'faraday'
|
31
31
|
require 'addressable'
|
32
32
|
require_relative 'version'
|
33
|
-
require_relative '
|
33
|
+
require_relative 'api_client_error'
|
34
34
|
|
35
35
|
module GroupDocsParserCloud
|
36
36
|
#
|
@@ -68,7 +68,7 @@ module GroupDocsParserCloud
|
|
68
68
|
end
|
69
69
|
|
70
70
|
unless response.success?
|
71
|
-
raise
|
71
|
+
raise ApiClientError.new(:code => response.status, :response_body => response.body)
|
72
72
|
end
|
73
73
|
|
74
74
|
data = deserialize(response, opts[:return_type]) if opts[:return_type]
|
@@ -280,7 +280,7 @@ module GroupDocsParserCloud
|
|
280
280
|
form_params.each do |key, value|
|
281
281
|
case value
|
282
282
|
when ::File
|
283
|
-
data[key] = Faraday::UploadIO.new(value.path,
|
283
|
+
data[key] = Faraday::UploadIO.new(value.path, "application/octet-stream", key)
|
284
284
|
when ::Array, nil
|
285
285
|
data[key] = value
|
286
286
|
else
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="api_error.rb">
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -25,33 +25,38 @@
|
|
25
25
|
|
26
26
|
module GroupDocsParserCloud
|
27
27
|
#
|
28
|
-
#
|
28
|
+
# ApiClientError class for error handling
|
29
29
|
#
|
30
|
-
class
|
30
|
+
class ApiClientError < StandardError
|
31
31
|
attr_reader :code
|
32
32
|
attr_reader :message
|
33
33
|
|
34
34
|
# Usage examples:
|
35
|
-
#
|
36
|
-
#
|
35
|
+
# ApiClientError.new
|
36
|
+
# ApiClientError.new(:code => 500, :response_body => "")
|
37
37
|
def initialize(arg = nil)
|
38
38
|
if arg.is_a? Hash
|
39
39
|
|
40
|
-
if arg.key?(:response_body)
|
40
|
+
if arg.key?(:response_body) then
|
41
41
|
data = JSON.parse(arg[:response_body], :symbolize_names => true)
|
42
|
-
if !data.nil?
|
43
|
-
if !data[:error].nil?
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
42
|
+
if !data.nil? then
|
43
|
+
if !data[:error].nil? then
|
44
|
+
error = data[:error]
|
45
|
+
if error.kind_of?(String) then
|
46
|
+
@message = error
|
47
|
+
else
|
48
|
+
@message = error[:message]
|
48
49
|
end
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
50
|
+
else
|
51
|
+
message = data[:message]
|
52
|
+
if !message.nil? && message.kind_of?(String) then
|
53
|
+
@message = message
|
54
|
+
@code = data[:code]
|
55
|
+
else
|
56
|
+
@message = data
|
57
|
+
end
|
53
58
|
end
|
54
|
-
|
59
|
+
end
|
55
60
|
end
|
56
61
|
|
57
62
|
if arg.key?(:arg) then
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# ------------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="configuration.rb">
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|