docraptor 2.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.docker_env.list +5 -0
- data/.docker_mounts.list +4 -0
- data/.generator-language-identifier +1 -0
- data/.generator-revision +1 -0
- data/.github/pull_request_template.txt +17 -0
- data/.gitignore +20 -14
- data/.gitlab-ci.yml +26 -0
- data/.openapi-generator/FILES +32 -0
- data/.openapi-generator/VERSION +1 -0
- data/{.swagger-codegen-ignore → .openapi-generator-ignore} +13 -7
- data/.review/README.md +16 -0
- data/.review/generated_files/.gitignore +39 -0
- data/.review/generated_files/README.md +108 -0
- data/.review/generated_files/docs/AsyncDoc.md +18 -0
- data/.review/generated_files/docs/Doc.md +50 -0
- data/.review/generated_files/docs/DocApi.md +503 -0
- data/.review/generated_files/docs/DocStatus.md +28 -0
- data/.review/generated_files/docs/PrinceOptions.md +82 -0
- data/.review/generated_files/spec/api/doc_api_spec.rb +112 -0
- data/{spec → .review/generated_files/spec}/api_client_spec.rb +6 -21
- data/{spec → .review/generated_files/spec}/configuration_spec.rb +6 -6
- data/.review/generated_files/spec/models/async_doc_spec.rb +34 -0
- data/.review/generated_files/spec/models/doc_spec.rb +138 -0
- data/.review/generated_files/spec/models/doc_status_spec.rb +64 -0
- data/.review/generated_files/spec/models/prince_options_spec.rb +234 -0
- data/{spec → .review/generated_files/spec}/spec_helper.rb +3 -3
- data/.rubocop.yml +148 -0
- data/.runtime-environments +13 -0
- data/.travis.yml +9 -7
- data/CHANGELOG.md +8 -0
- data/Gemfile +3 -1
- data/README.md +8 -8
- data/Rakefile +1 -2
- data/docraptor.gemspec +5 -19
- data/docraptor.yaml +283 -284
- data/examples/async.rb +24 -30
- data/examples/hosted_async.rb +21 -33
- data/examples/hosted_sync.rb +19 -32
- data/examples/sync.rb +20 -26
- data/gemfiles/Gemfile.2.5.lock +70 -0
- data/gemfiles/Gemfile.2.6.lock +70 -0
- data/gemfiles/Gemfile.2.7.lock +70 -0
- data/gemfiles/Gemfile.3.0.lock +70 -0
- data/gemfiles/Gemfile.3.1.lock +72 -0
- data/gemfiles/Gemfile.3.2.lock +72 -0
- data/gemfiles/Gemfile.3.3.lock +72 -0
- data/{swagger-config.json → generator-config.json} +3 -2
- data/lib/docraptor/api/doc_api.rb +180 -85
- data/lib/docraptor/api_client.rb +91 -90
- data/lib/docraptor/api_error.rb +23 -3
- data/lib/docraptor/configuration.rb +101 -15
- data/lib/docraptor/models/async_doc.rb +53 -18
- data/lib/docraptor/models/doc.rb +80 -50
- data/lib/docraptor/models/doc_status.rb +58 -23
- data/lib/docraptor/models/prince_options.rb +149 -75
- data/lib/docraptor/version.rb +4 -4
- data/lib/docraptor.rb +3 -3
- data/script/clean +2 -2
- data/script/console +5 -0
- data/script/docker +56 -0
- data/script/fix_gemspec.rb +3 -18
- data/script/generate_language +43 -4
- data/script/inside_container/README.md +6 -0
- data/script/inside_container/test +87 -0
- data/script/post_generate_language +8 -2
- data/script/release +13 -0
- data/script/setup +25 -14
- data/script/swagger +6 -33
- data/script/test +30 -27
- data/test/async.rb +2 -2
- data/test/expire_hosted.rb +2 -2
- data/test/hosted_async.rb +7 -1
- data/test/hosted_sync.rb +2 -2
- data/test/iframes_default.rb +40 -0
- data/test/iframes_false.rb +40 -0
- data/test/iframes_true.rb +40 -0
- data/test/prince_options.rb +45 -0
- data/test/sync.rb +2 -2
- data/test/xlsx.rb +10 -3
- metadata +52 -214
- data/.swagger-codegen/VERSION +0 -1
- data/.swagger-revision +0 -1
@@ -0,0 +1,72 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
docraptor (3.0.0)
|
5
|
+
typhoeus (~> 1.0, >= 1.0.1)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
ast (2.4.2)
|
11
|
+
byebug (11.1.3)
|
12
|
+
coderay (1.1.3)
|
13
|
+
diff-lcs (1.5.0)
|
14
|
+
ethon (0.16.0)
|
15
|
+
ffi (>= 1.15.0)
|
16
|
+
ffi (1.15.5)
|
17
|
+
jaro_winkler (1.5.6)
|
18
|
+
method_source (1.0.0)
|
19
|
+
parallel (1.23.0)
|
20
|
+
parser (3.2.2.3)
|
21
|
+
ast (~> 2.4.1)
|
22
|
+
racc
|
23
|
+
pry (0.14.2)
|
24
|
+
coderay (~> 1.1)
|
25
|
+
method_source (~> 1.0)
|
26
|
+
pry-byebug (3.10.1)
|
27
|
+
byebug (~> 11.0)
|
28
|
+
pry (>= 0.13, < 0.15)
|
29
|
+
psych (5.1.0)
|
30
|
+
stringio
|
31
|
+
racc (1.7.1)
|
32
|
+
rainbow (3.1.1)
|
33
|
+
rake (13.0.6)
|
34
|
+
rspec (3.12.0)
|
35
|
+
rspec-core (~> 3.12.0)
|
36
|
+
rspec-expectations (~> 3.12.0)
|
37
|
+
rspec-mocks (~> 3.12.0)
|
38
|
+
rspec-core (3.12.2)
|
39
|
+
rspec-support (~> 3.12.0)
|
40
|
+
rspec-expectations (3.12.3)
|
41
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
42
|
+
rspec-support (~> 3.12.0)
|
43
|
+
rspec-mocks (3.12.6)
|
44
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
45
|
+
rspec-support (~> 3.12.0)
|
46
|
+
rspec-support (3.12.1)
|
47
|
+
rubocop (0.66.0)
|
48
|
+
jaro_winkler (~> 1.5.1)
|
49
|
+
parallel (~> 1.10)
|
50
|
+
parser (>= 2.5, != 2.5.1.1)
|
51
|
+
psych (>= 3.1.0)
|
52
|
+
rainbow (>= 2.2.2, < 4.0)
|
53
|
+
ruby-progressbar (~> 1.7)
|
54
|
+
unicode-display_width (>= 1.4.0, < 1.6)
|
55
|
+
ruby-progressbar (1.13.0)
|
56
|
+
stringio (3.0.7)
|
57
|
+
typhoeus (1.4.0)
|
58
|
+
ethon (>= 0.9.0)
|
59
|
+
unicode-display_width (1.5.0)
|
60
|
+
|
61
|
+
PLATFORMS
|
62
|
+
aarch64-linux
|
63
|
+
|
64
|
+
DEPENDENCIES
|
65
|
+
docraptor!
|
66
|
+
pry-byebug
|
67
|
+
rake (~> 13.0.1)
|
68
|
+
rspec (~> 3.6, >= 3.6.0)
|
69
|
+
rubocop (~> 0.66.0)
|
70
|
+
|
71
|
+
BUNDLED WITH
|
72
|
+
2.4.10
|
@@ -0,0 +1,72 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
docraptor (3.0.0)
|
5
|
+
typhoeus (~> 1.0, >= 1.0.1)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
ast (2.4.2)
|
11
|
+
byebug (11.1.3)
|
12
|
+
coderay (1.1.3)
|
13
|
+
diff-lcs (1.5.0)
|
14
|
+
ethon (0.16.0)
|
15
|
+
ffi (>= 1.15.0)
|
16
|
+
ffi (1.15.5)
|
17
|
+
jaro_winkler (1.5.6)
|
18
|
+
method_source (1.0.0)
|
19
|
+
parallel (1.23.0)
|
20
|
+
parser (3.2.2.3)
|
21
|
+
ast (~> 2.4.1)
|
22
|
+
racc
|
23
|
+
pry (0.14.2)
|
24
|
+
coderay (~> 1.1)
|
25
|
+
method_source (~> 1.0)
|
26
|
+
pry-byebug (3.10.1)
|
27
|
+
byebug (~> 11.0)
|
28
|
+
pry (>= 0.13, < 0.15)
|
29
|
+
psych (5.1.0)
|
30
|
+
stringio
|
31
|
+
racc (1.7.1)
|
32
|
+
rainbow (3.1.1)
|
33
|
+
rake (13.0.6)
|
34
|
+
rspec (3.12.0)
|
35
|
+
rspec-core (~> 3.12.0)
|
36
|
+
rspec-expectations (~> 3.12.0)
|
37
|
+
rspec-mocks (~> 3.12.0)
|
38
|
+
rspec-core (3.12.2)
|
39
|
+
rspec-support (~> 3.12.0)
|
40
|
+
rspec-expectations (3.12.3)
|
41
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
42
|
+
rspec-support (~> 3.12.0)
|
43
|
+
rspec-mocks (3.12.6)
|
44
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
45
|
+
rspec-support (~> 3.12.0)
|
46
|
+
rspec-support (3.12.1)
|
47
|
+
rubocop (0.66.0)
|
48
|
+
jaro_winkler (~> 1.5.1)
|
49
|
+
parallel (~> 1.10)
|
50
|
+
parser (>= 2.5, != 2.5.1.1)
|
51
|
+
psych (>= 3.1.0)
|
52
|
+
rainbow (>= 2.2.2, < 4.0)
|
53
|
+
ruby-progressbar (~> 1.7)
|
54
|
+
unicode-display_width (>= 1.4.0, < 1.6)
|
55
|
+
ruby-progressbar (1.13.0)
|
56
|
+
stringio (3.0.7)
|
57
|
+
typhoeus (1.4.0)
|
58
|
+
ethon (>= 0.9.0)
|
59
|
+
unicode-display_width (1.5.0)
|
60
|
+
|
61
|
+
PLATFORMS
|
62
|
+
aarch64-linux
|
63
|
+
|
64
|
+
DEPENDENCIES
|
65
|
+
docraptor!
|
66
|
+
pry-byebug
|
67
|
+
rake (~> 13.0.1)
|
68
|
+
rspec (~> 3.6, >= 3.6.0)
|
69
|
+
rubocop (~> 0.66.0)
|
70
|
+
|
71
|
+
BUNDLED WITH
|
72
|
+
2.5.0.dev
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"gemName": "docraptor",
|
3
3
|
"moduleName": "DocRaptor",
|
4
|
-
"gemVersion": "
|
4
|
+
"gemVersion": "3.1.0",
|
5
5
|
"gemAuthor": "Expected Behavior",
|
6
6
|
"gemAuthorEmail": "support@docraptor.com",
|
7
7
|
"gemHomepage": "https://github.com/docraptor/docraptor-ruby",
|
@@ -9,5 +9,6 @@
|
|
9
9
|
"gemDescription": "A native client library for the DocRaptor HTML to PDF/XLS service.",
|
10
10
|
"gemLicense": "MIT",
|
11
11
|
"hideGenerationTimestamp": true,
|
12
|
-
"httpUserAgent": "ruby-swagger-#{VERSION}"
|
12
|
+
"httpUserAgent": "ruby-swagger-#{VERSION}",
|
13
|
+
"gemRequiredRubyVersion": ">= 2.5"
|
13
14
|
}
|
@@ -3,14 +3,14 @@
|
|
3
3
|
|
4
4
|
#A native client library for the DocRaptor HTML to PDF/XLS service.
|
5
5
|
|
6
|
-
OpenAPI
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
7
|
|
8
|
-
Generated by: https://
|
9
|
-
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.6.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
|
-
require '
|
13
|
+
require 'cgi'
|
14
14
|
|
15
15
|
module DocRaptor
|
16
16
|
class DocApi
|
@@ -20,7 +20,7 @@ module DocRaptor
|
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
22
|
# Creates a document asynchronously. You must use a callback url or the returned status id and the status API to find out when it completes. Then use the download API to get the document.
|
23
|
-
# @param doc
|
23
|
+
# @param doc [Doc]
|
24
24
|
# @param [Hash] opts the optional parameters
|
25
25
|
# @return [AsyncDoc]
|
26
26
|
def create_async_doc(doc, opts = {})
|
@@ -29,9 +29,9 @@ module DocRaptor
|
|
29
29
|
end
|
30
30
|
|
31
31
|
# Creates a document asynchronously. You must use a callback url or the returned status id and the status API to find out when it completes. Then use the download API to get the document.
|
32
|
-
# @param doc
|
32
|
+
# @param doc [Doc]
|
33
33
|
# @param [Hash] opts the optional parameters
|
34
|
-
# @return [Array<(AsyncDoc,
|
34
|
+
# @return [Array<(AsyncDoc, Integer, Hash)>] AsyncDoc data, response status code and response headers
|
35
35
|
def create_async_doc_with_http_info(doc, opts = {})
|
36
36
|
if @api_client.config.debugging
|
37
37
|
@api_client.config.logger.debug 'Calling API: DocApi.create_async_doc ...'
|
@@ -44,33 +44,49 @@ module DocRaptor
|
|
44
44
|
local_var_path = '/async_docs'
|
45
45
|
|
46
46
|
# query parameters
|
47
|
-
query_params = {}
|
47
|
+
query_params = opts[:query_params] || {}
|
48
48
|
|
49
49
|
# header parameters
|
50
|
-
header_params = {}
|
50
|
+
header_params = opts[:header_params] || {}
|
51
51
|
# HTTP header 'Accept' (if needed)
|
52
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
53
|
+
# HTTP header 'Content-Type'
|
54
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
55
|
+
if !content_type.nil?
|
56
|
+
header_params['Content-Type'] = content_type
|
57
|
+
end
|
53
58
|
|
54
59
|
# form parameters
|
55
|
-
form_params = {}
|
60
|
+
form_params = opts[:form_params] || {}
|
56
61
|
|
57
62
|
# http body (model)
|
58
|
-
post_body = @api_client.object_to_http_body(doc)
|
59
|
-
|
60
|
-
|
63
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(doc)
|
64
|
+
|
65
|
+
# return_type
|
66
|
+
return_type = opts[:debug_return_type] || 'AsyncDoc'
|
67
|
+
|
68
|
+
# auth_names
|
69
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
70
|
+
|
71
|
+
new_options = opts.merge(
|
72
|
+
:operation => :"DocApi.create_async_doc",
|
61
73
|
:header_params => header_params,
|
62
74
|
:query_params => query_params,
|
63
75
|
:form_params => form_params,
|
64
76
|
:body => post_body,
|
65
77
|
:auth_names => auth_names,
|
66
|
-
:return_type =>
|
78
|
+
:return_type => return_type
|
79
|
+
)
|
80
|
+
|
81
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
67
82
|
if @api_client.config.debugging
|
68
83
|
@api_client.config.logger.debug "API called: DocApi#create_async_doc\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
69
84
|
end
|
70
85
|
return data, status_code, headers
|
71
86
|
end
|
87
|
+
|
72
88
|
# Creates a document synchronously.
|
73
|
-
# @param doc
|
89
|
+
# @param doc [Doc]
|
74
90
|
# @param [Hash] opts the optional parameters
|
75
91
|
# @return [String]
|
76
92
|
def create_doc(doc, opts = {})
|
@@ -79,9 +95,9 @@ module DocRaptor
|
|
79
95
|
end
|
80
96
|
|
81
97
|
# Creates a document synchronously.
|
82
|
-
# @param doc
|
98
|
+
# @param doc [Doc]
|
83
99
|
# @param [Hash] opts the optional parameters
|
84
|
-
# @return [Array<(String,
|
100
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
85
101
|
def create_doc_with_http_info(doc, opts = {})
|
86
102
|
if @api_client.config.debugging
|
87
103
|
@api_client.config.logger.debug 'Calling API: DocApi.create_doc ...'
|
@@ -94,33 +110,49 @@ module DocRaptor
|
|
94
110
|
local_var_path = '/docs'
|
95
111
|
|
96
112
|
# query parameters
|
97
|
-
query_params = {}
|
113
|
+
query_params = opts[:query_params] || {}
|
98
114
|
|
99
115
|
# header parameters
|
100
|
-
header_params = {}
|
116
|
+
header_params = opts[:header_params] || {}
|
101
117
|
# HTTP header 'Accept' (if needed)
|
102
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
118
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
119
|
+
# HTTP header 'Content-Type'
|
120
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
121
|
+
if !content_type.nil?
|
122
|
+
header_params['Content-Type'] = content_type
|
123
|
+
end
|
103
124
|
|
104
125
|
# form parameters
|
105
|
-
form_params = {}
|
126
|
+
form_params = opts[:form_params] || {}
|
106
127
|
|
107
128
|
# http body (model)
|
108
|
-
post_body = @api_client.object_to_http_body(doc)
|
109
|
-
|
110
|
-
|
129
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(doc)
|
130
|
+
|
131
|
+
# return_type
|
132
|
+
return_type = opts[:debug_return_type] || 'String'
|
133
|
+
|
134
|
+
# auth_names
|
135
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
136
|
+
|
137
|
+
new_options = opts.merge(
|
138
|
+
:operation => :"DocApi.create_doc",
|
111
139
|
:header_params => header_params,
|
112
140
|
:query_params => query_params,
|
113
141
|
:form_params => form_params,
|
114
142
|
:body => post_body,
|
115
143
|
:auth_names => auth_names,
|
116
|
-
:return_type =>
|
144
|
+
:return_type => return_type
|
145
|
+
)
|
146
|
+
|
147
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
117
148
|
if @api_client.config.debugging
|
118
149
|
@api_client.config.logger.debug "API called: DocApi#create_doc\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
119
150
|
end
|
120
151
|
return data, status_code, headers
|
121
152
|
end
|
153
|
+
|
122
154
|
# Creates a hosted document asynchronously. You must use a callback url or the returned status id and the status API to find out when it completes. Then use the download API to get the document.
|
123
|
-
# @param doc
|
155
|
+
# @param doc [Doc]
|
124
156
|
# @param [Hash] opts the optional parameters
|
125
157
|
# @return [AsyncDoc]
|
126
158
|
def create_hosted_async_doc(doc, opts = {})
|
@@ -129,9 +161,9 @@ module DocRaptor
|
|
129
161
|
end
|
130
162
|
|
131
163
|
# Creates a hosted document asynchronously. You must use a callback url or the returned status id and the status API to find out when it completes. Then use the download API to get the document.
|
132
|
-
# @param doc
|
164
|
+
# @param doc [Doc]
|
133
165
|
# @param [Hash] opts the optional parameters
|
134
|
-
# @return [Array<(AsyncDoc,
|
166
|
+
# @return [Array<(AsyncDoc, Integer, Hash)>] AsyncDoc data, response status code and response headers
|
135
167
|
def create_hosted_async_doc_with_http_info(doc, opts = {})
|
136
168
|
if @api_client.config.debugging
|
137
169
|
@api_client.config.logger.debug 'Calling API: DocApi.create_hosted_async_doc ...'
|
@@ -144,33 +176,49 @@ module DocRaptor
|
|
144
176
|
local_var_path = '/hosted_async_docs'
|
145
177
|
|
146
178
|
# query parameters
|
147
|
-
query_params = {}
|
179
|
+
query_params = opts[:query_params] || {}
|
148
180
|
|
149
181
|
# header parameters
|
150
|
-
header_params = {}
|
182
|
+
header_params = opts[:header_params] || {}
|
151
183
|
# HTTP header 'Accept' (if needed)
|
152
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
184
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
185
|
+
# HTTP header 'Content-Type'
|
186
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
187
|
+
if !content_type.nil?
|
188
|
+
header_params['Content-Type'] = content_type
|
189
|
+
end
|
153
190
|
|
154
191
|
# form parameters
|
155
|
-
form_params = {}
|
192
|
+
form_params = opts[:form_params] || {}
|
156
193
|
|
157
194
|
# http body (model)
|
158
|
-
post_body = @api_client.object_to_http_body(doc)
|
159
|
-
|
160
|
-
|
195
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(doc)
|
196
|
+
|
197
|
+
# return_type
|
198
|
+
return_type = opts[:debug_return_type] || 'AsyncDoc'
|
199
|
+
|
200
|
+
# auth_names
|
201
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
202
|
+
|
203
|
+
new_options = opts.merge(
|
204
|
+
:operation => :"DocApi.create_hosted_async_doc",
|
161
205
|
:header_params => header_params,
|
162
206
|
:query_params => query_params,
|
163
207
|
:form_params => form_params,
|
164
208
|
:body => post_body,
|
165
209
|
:auth_names => auth_names,
|
166
|
-
:return_type =>
|
210
|
+
:return_type => return_type
|
211
|
+
)
|
212
|
+
|
213
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
167
214
|
if @api_client.config.debugging
|
168
215
|
@api_client.config.logger.debug "API called: DocApi#create_hosted_async_doc\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
169
216
|
end
|
170
217
|
return data, status_code, headers
|
171
218
|
end
|
219
|
+
|
172
220
|
# Creates a hosted document synchronously.
|
173
|
-
# @param doc The document to be created.
|
221
|
+
# @param doc [Doc] The document to be created.
|
174
222
|
# @param [Hash] opts the optional parameters
|
175
223
|
# @return [DocStatus]
|
176
224
|
def create_hosted_doc(doc, opts = {})
|
@@ -179,9 +227,9 @@ module DocRaptor
|
|
179
227
|
end
|
180
228
|
|
181
229
|
# Creates a hosted document synchronously.
|
182
|
-
# @param doc The document to be created.
|
230
|
+
# @param doc [Doc] The document to be created.
|
183
231
|
# @param [Hash] opts the optional parameters
|
184
|
-
# @return [Array<(DocStatus,
|
232
|
+
# @return [Array<(DocStatus, Integer, Hash)>] DocStatus data, response status code and response headers
|
185
233
|
def create_hosted_doc_with_http_info(doc, opts = {})
|
186
234
|
if @api_client.config.debugging
|
187
235
|
@api_client.config.logger.debug 'Calling API: DocApi.create_hosted_doc ...'
|
@@ -194,33 +242,49 @@ module DocRaptor
|
|
194
242
|
local_var_path = '/hosted_docs'
|
195
243
|
|
196
244
|
# query parameters
|
197
|
-
query_params = {}
|
245
|
+
query_params = opts[:query_params] || {}
|
198
246
|
|
199
247
|
# header parameters
|
200
|
-
header_params = {}
|
248
|
+
header_params = opts[:header_params] || {}
|
201
249
|
# HTTP header 'Accept' (if needed)
|
202
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
250
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
251
|
+
# HTTP header 'Content-Type'
|
252
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
253
|
+
if !content_type.nil?
|
254
|
+
header_params['Content-Type'] = content_type
|
255
|
+
end
|
203
256
|
|
204
257
|
# form parameters
|
205
|
-
form_params = {}
|
258
|
+
form_params = opts[:form_params] || {}
|
206
259
|
|
207
260
|
# http body (model)
|
208
|
-
post_body = @api_client.object_to_http_body(doc)
|
209
|
-
|
210
|
-
|
261
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(doc)
|
262
|
+
|
263
|
+
# return_type
|
264
|
+
return_type = opts[:debug_return_type] || 'DocStatus'
|
265
|
+
|
266
|
+
# auth_names
|
267
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
268
|
+
|
269
|
+
new_options = opts.merge(
|
270
|
+
:operation => :"DocApi.create_hosted_doc",
|
211
271
|
:header_params => header_params,
|
212
272
|
:query_params => query_params,
|
213
273
|
:form_params => form_params,
|
214
274
|
:body => post_body,
|
215
275
|
:auth_names => auth_names,
|
216
|
-
:return_type =>
|
276
|
+
:return_type => return_type
|
277
|
+
)
|
278
|
+
|
279
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
217
280
|
if @api_client.config.debugging
|
218
281
|
@api_client.config.logger.debug "API called: DocApi#create_hosted_doc\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
219
282
|
end
|
220
283
|
return data, status_code, headers
|
221
284
|
end
|
285
|
+
|
222
286
|
# Expires a previously created hosted doc.
|
223
|
-
# @param id The download_id returned from status request or hosted document response.
|
287
|
+
# @param id [String] The download_id returned from status request or hosted document response.
|
224
288
|
# @param [Hash] opts the optional parameters
|
225
289
|
# @return [nil]
|
226
290
|
def expire(id, opts = {})
|
@@ -229,9 +293,9 @@ module DocRaptor
|
|
229
293
|
end
|
230
294
|
|
231
295
|
# Expires a previously created hosted doc.
|
232
|
-
# @param id The download_id returned from status request or hosted document response.
|
296
|
+
# @param id [String] The download_id returned from status request or hosted document response.
|
233
297
|
# @param [Hash] opts the optional parameters
|
234
|
-
# @return [Array<(nil,
|
298
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
235
299
|
def expire_with_http_info(id, opts = {})
|
236
300
|
if @api_client.config.debugging
|
237
301
|
@api_client.config.logger.debug 'Calling API: DocApi.expire ...'
|
@@ -241,35 +305,45 @@ module DocRaptor
|
|
241
305
|
fail ArgumentError, "Missing the required parameter 'id' when calling DocApi.expire"
|
242
306
|
end
|
243
307
|
# resource path
|
244
|
-
local_var_path = '/expire/{id}'.sub('{' + 'id' + '}', id.to_s)
|
308
|
+
local_var_path = '/expire/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
245
309
|
|
246
310
|
# query parameters
|
247
|
-
query_params = {}
|
311
|
+
query_params = opts[:query_params] || {}
|
248
312
|
|
249
313
|
# header parameters
|
250
|
-
header_params = {}
|
251
|
-
# HTTP header 'Accept' (if needed)
|
252
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', 'application/pdf', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'])
|
314
|
+
header_params = opts[:header_params] || {}
|
253
315
|
|
254
316
|
# form parameters
|
255
|
-
form_params = {}
|
317
|
+
form_params = opts[:form_params] || {}
|
256
318
|
|
257
319
|
# http body (model)
|
258
|
-
post_body =
|
259
|
-
|
260
|
-
|
320
|
+
post_body = opts[:debug_body]
|
321
|
+
|
322
|
+
# return_type
|
323
|
+
return_type = opts[:debug_return_type]
|
324
|
+
|
325
|
+
# auth_names
|
326
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
327
|
+
|
328
|
+
new_options = opts.merge(
|
329
|
+
:operation => :"DocApi.expire",
|
261
330
|
:header_params => header_params,
|
262
331
|
:query_params => query_params,
|
263
332
|
:form_params => form_params,
|
264
333
|
:body => post_body,
|
265
|
-
:auth_names => auth_names
|
334
|
+
:auth_names => auth_names,
|
335
|
+
:return_type => return_type
|
336
|
+
)
|
337
|
+
|
338
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
266
339
|
if @api_client.config.debugging
|
267
340
|
@api_client.config.logger.debug "API called: DocApi#expire\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
268
341
|
end
|
269
342
|
return data, status_code, headers
|
270
343
|
end
|
344
|
+
|
271
345
|
# Downloads a finished document.
|
272
|
-
# @param id The download_id returned from an async status request or callback.
|
346
|
+
# @param id [String] The download_id returned from an async status request or callback.
|
273
347
|
# @param [Hash] opts the optional parameters
|
274
348
|
# @return [String]
|
275
349
|
def get_async_doc(id, opts = {})
|
@@ -278,9 +352,9 @@ module DocRaptor
|
|
278
352
|
end
|
279
353
|
|
280
354
|
# Downloads a finished document.
|
281
|
-
# @param id The download_id returned from an async status request or callback.
|
355
|
+
# @param id [String] The download_id returned from an async status request or callback.
|
282
356
|
# @param [Hash] opts the optional parameters
|
283
|
-
# @return [Array<(String,
|
357
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
284
358
|
def get_async_doc_with_http_info(id, opts = {})
|
285
359
|
if @api_client.config.debugging
|
286
360
|
@api_client.config.logger.debug 'Calling API: DocApi.get_async_doc ...'
|
@@ -290,36 +364,47 @@ module DocRaptor
|
|
290
364
|
fail ArgumentError, "Missing the required parameter 'id' when calling DocApi.get_async_doc"
|
291
365
|
end
|
292
366
|
# resource path
|
293
|
-
local_var_path = '/download/{id}'.sub('{' + 'id' + '}', id.to_s)
|
367
|
+
local_var_path = '/download/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
294
368
|
|
295
369
|
# query parameters
|
296
|
-
query_params = {}
|
370
|
+
query_params = opts[:query_params] || {}
|
297
371
|
|
298
372
|
# header parameters
|
299
|
-
header_params = {}
|
373
|
+
header_params = opts[:header_params] || {}
|
300
374
|
# HTTP header 'Accept' (if needed)
|
301
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
375
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
302
376
|
|
303
377
|
# form parameters
|
304
|
-
form_params = {}
|
378
|
+
form_params = opts[:form_params] || {}
|
305
379
|
|
306
380
|
# http body (model)
|
307
|
-
post_body =
|
308
|
-
|
309
|
-
|
381
|
+
post_body = opts[:debug_body]
|
382
|
+
|
383
|
+
# return_type
|
384
|
+
return_type = opts[:debug_return_type] || 'String'
|
385
|
+
|
386
|
+
# auth_names
|
387
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
388
|
+
|
389
|
+
new_options = opts.merge(
|
390
|
+
:operation => :"DocApi.get_async_doc",
|
310
391
|
:header_params => header_params,
|
311
392
|
:query_params => query_params,
|
312
393
|
:form_params => form_params,
|
313
394
|
:body => post_body,
|
314
395
|
:auth_names => auth_names,
|
315
|
-
:return_type =>
|
396
|
+
:return_type => return_type
|
397
|
+
)
|
398
|
+
|
399
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
316
400
|
if @api_client.config.debugging
|
317
401
|
@api_client.config.logger.debug "API called: DocApi#get_async_doc\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
318
402
|
end
|
319
403
|
return data, status_code, headers
|
320
404
|
end
|
405
|
+
|
321
406
|
# Check on the status of an asynchronously created document.
|
322
|
-
# @param id The status_id returned when creating an asynchronous document.
|
407
|
+
# @param id [String] The status_id returned when creating an asynchronous document.
|
323
408
|
# @param [Hash] opts the optional parameters
|
324
409
|
# @return [DocStatus]
|
325
410
|
def get_async_doc_status(id, opts = {})
|
@@ -328,9 +413,9 @@ module DocRaptor
|
|
328
413
|
end
|
329
414
|
|
330
415
|
# Check on the status of an asynchronously created document.
|
331
|
-
# @param id The status_id returned when creating an asynchronous document.
|
416
|
+
# @param id [String] The status_id returned when creating an asynchronous document.
|
332
417
|
# @param [Hash] opts the optional parameters
|
333
|
-
# @return [Array<(DocStatus,
|
418
|
+
# @return [Array<(DocStatus, Integer, Hash)>] DocStatus data, response status code and response headers
|
334
419
|
def get_async_doc_status_with_http_info(id, opts = {})
|
335
420
|
if @api_client.config.debugging
|
336
421
|
@api_client.config.logger.debug 'Calling API: DocApi.get_async_doc_status ...'
|
@@ -340,29 +425,39 @@ module DocRaptor
|
|
340
425
|
fail ArgumentError, "Missing the required parameter 'id' when calling DocApi.get_async_doc_status"
|
341
426
|
end
|
342
427
|
# resource path
|
343
|
-
local_var_path = '/status/{id}'.sub('{' + 'id' + '}', id.to_s)
|
428
|
+
local_var_path = '/status/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
344
429
|
|
345
430
|
# query parameters
|
346
|
-
query_params = {}
|
431
|
+
query_params = opts[:query_params] || {}
|
347
432
|
|
348
433
|
# header parameters
|
349
|
-
header_params = {}
|
434
|
+
header_params = opts[:header_params] || {}
|
350
435
|
# HTTP header 'Accept' (if needed)
|
351
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
436
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
352
437
|
|
353
438
|
# form parameters
|
354
|
-
form_params = {}
|
439
|
+
form_params = opts[:form_params] || {}
|
355
440
|
|
356
441
|
# http body (model)
|
357
|
-
post_body =
|
358
|
-
|
359
|
-
|
442
|
+
post_body = opts[:debug_body]
|
443
|
+
|
444
|
+
# return_type
|
445
|
+
return_type = opts[:debug_return_type] || 'DocStatus'
|
446
|
+
|
447
|
+
# auth_names
|
448
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
449
|
+
|
450
|
+
new_options = opts.merge(
|
451
|
+
:operation => :"DocApi.get_async_doc_status",
|
360
452
|
:header_params => header_params,
|
361
453
|
:query_params => query_params,
|
362
454
|
:form_params => form_params,
|
363
455
|
:body => post_body,
|
364
456
|
:auth_names => auth_names,
|
365
|
-
:return_type =>
|
457
|
+
:return_type => return_type
|
458
|
+
)
|
459
|
+
|
460
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
366
461
|
if @api_client.config.debugging
|
367
462
|
@api_client.config.logger.debug "API called: DocApi#get_async_doc_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
368
463
|
end
|