docraptor 3.0.0 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/.docker_env.list +2 -0
  3. data/.docker_mounts.list +4 -0
  4. data/.generator-revision +1 -1
  5. data/.gitlab-ci.yml +1 -1
  6. data/.openapi-generator/FILES +5 -0
  7. data/.openapi-generator/VERSION +1 -1
  8. data/.openapi-generator-ignore +0 -10
  9. data/.review/generated_files/README.md +6 -5
  10. data/.review/generated_files/docs/AsyncDoc.md +18 -0
  11. data/.review/generated_files/docs/Doc.md +50 -0
  12. data/.review/generated_files/docs/DocApi.md +503 -0
  13. data/.review/generated_files/docs/DocStatus.md +28 -0
  14. data/.review/generated_files/docs/PrinceOptions.md +82 -0
  15. data/.review/generated_files/spec/api/doc_api_spec.rb +112 -0
  16. data/.review/generated_files/spec/api_client_spec.rb +228 -0
  17. data/.review/generated_files/spec/configuration_spec.rb +42 -0
  18. data/.review/generated_files/spec/models/async_doc_spec.rb +34 -0
  19. data/.review/generated_files/spec/models/doc_spec.rb +138 -0
  20. data/.review/generated_files/spec/models/doc_status_spec.rb +64 -0
  21. data/.review/generated_files/spec/models/prince_options_spec.rb +234 -0
  22. data/.review/generated_files/spec/spec_helper.rb +111 -0
  23. data/.runtime-environments +3 -0
  24. data/.travis.yml +2 -5
  25. data/CHANGELOG.md +3 -0
  26. data/README.md +1 -1
  27. data/docraptor.gemspec +1 -1
  28. data/docraptor.yaml +281 -283
  29. data/gemfiles/Gemfile.3.1.lock +72 -0
  30. data/gemfiles/Gemfile.3.2.lock +72 -0
  31. data/gemfiles/Gemfile.3.3.lock +72 -0
  32. data/generator-config.json +1 -1
  33. data/lib/docraptor/api/doc_api.rb +33 -13
  34. data/lib/docraptor/api_client.rb +1 -1
  35. data/lib/docraptor/api_error.rb +2 -1
  36. data/lib/docraptor/configuration.rb +19 -3
  37. data/lib/docraptor/models/async_doc.rb +1 -1
  38. data/lib/docraptor/models/doc.rb +1 -6
  39. data/lib/docraptor/models/doc_status.rb +1 -1
  40. data/lib/docraptor/models/prince_options.rb +49 -10
  41. data/lib/docraptor/version.rb +2 -2
  42. data/lib/docraptor.rb +1 -1
  43. data/script/docker +21 -4
  44. data/script/generate_language +26 -4
  45. data/script/inside_container/test +52 -3
  46. data/script/post_generate_language +1 -3
  47. data/script/release +13 -0
  48. data/test/iframes_default.rb +40 -0
  49. data/test/iframes_false.rb +40 -0
  50. data/test/iframes_true.rb +40 -0
  51. data/test/prince_options.rb +45 -0
  52. data/test/xlsx.rb +6 -2
  53. metadata +32 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e59619a7e4c76658472337dcfedf6ecbb1a6e4cbc6bedfcb7aa80adc4fe33ae9
4
- data.tar.gz: 69095f9007180960bdae69017a5a6dedf48ad1d475b0d87db92951c8a8525a14
3
+ metadata.gz: ae5113eeec4fbe7b113fe5f92c8fb7175e672beadb72ab3e96fd458484e8e5d2
4
+ data.tar.gz: 8923f22767e21a57af7afbf6082b9da27a23e2781ecd35947f2229ecf9ba889a
5
5
  SHA512:
6
- metadata.gz: 45931088e15d3312c18b7f55b51f07c263796ee90d5942c246a60b026ac6eea0f3fae14e3b2e1dba1f2335ff9596f5152005891033e5f01602a22558488d532e
7
- data.tar.gz: 945ffc6a58c560588f05c4d8252046250af740e6804978b956f2e04785d9aa4cbc41c059b695ad656248dae3968fc2f766a12e6bf6f153cdeda925a038bb48d1
6
+ metadata.gz: 72383235430a25aa8faa722dcdc353376ef8d9bffd2e663698b09b3149895c5bb63b3c699897ffaa7627e5275f4477017322583d6e8ebcff77d3b8136694d7ac
7
+ data.tar.gz: cb9a0f14cc1da9022ffd07cce3ad670e4eb742285bb6a13074af4b7edf5418da97b3d106c8cb59ec1777f21850a7d01ce3f35ee18043229de8680518d1432502
data/.docker_env.list CHANGED
@@ -1,3 +1,5 @@
1
1
  TRACE
2
2
  TEST_OUTPUT_DIR=/app/tmp/test_output
3
3
  BUNDLE_PATH=/app/tmp/cache/bundle
4
+ INSIDE_DOCKER=true
5
+ SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock
@@ -0,0 +1,4 @@
1
+ # Specify mounts in `docker run --volume` format (source:target). Bash
2
+ # expressions will be evaluated.
3
+ $(pwd)/tmp/cache_${image//:/_}:/app/tmp/cache
4
+ /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock
data/.generator-revision CHANGED
@@ -1 +1 @@
1
- v6.0.1
1
+ v6.6.0
data/.gitlab-ci.yml CHANGED
@@ -7,7 +7,7 @@
7
7
  - bundle install -j $(nproc)
8
8
  parallel:
9
9
  matrix:
10
- - RUBY_VERSION: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0']
10
+ - RUBY_VERSION: ['2.7', '3.0', '3.1']
11
11
  image: "ruby:$RUBY_VERSION"
12
12
  cache:
13
13
  paths:
@@ -7,6 +7,11 @@ Gemfile
7
7
  README.md
8
8
  Rakefile
9
9
  docraptor.gemspec
10
+ docs/AsyncDoc.md
11
+ docs/Doc.md
12
+ docs/DocApi.md
13
+ docs/DocStatus.md
14
+ docs/PrinceOptions.md
10
15
  lib/docraptor.rb
11
16
  lib/docraptor/api/doc_api.rb
12
17
  lib/docraptor/api_client.rb
@@ -1 +1 @@
1
- 6.1.0-SNAPSHOT
1
+ 6.6.0
@@ -23,16 +23,6 @@
23
23
  #!docs/README.md
24
24
 
25
25
 
26
- # These are autogenerated and aren't exactly what we want. We rely on the
27
- # readme, and website documentation.
28
- # TODO: Ideally, when updating the agent, it would be nice to see the
29
- # differences between when the previous version and the new version generated.
30
- # This would help make it more obvious when the agent supported a newer usage
31
- # pattern that we might prefer.
32
- # TODO: Consider if it's possible to make the generated docs more useful so we
33
- # might actually want to use them.
34
- docs/
35
-
36
26
  # This seems to be a script related to developing openapi-generator and making
37
27
  # new test APIs.
38
28
  git_push.sh
@@ -7,7 +7,7 @@ A native client library for the DocRaptor HTML to PDF/XLS service.
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 3.0.0
10
+ - Package version: 3.1.0
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
 
13
13
  ## Installation
@@ -23,16 +23,16 @@ gem build docraptor.gemspec
23
23
  Then either install the gem locally:
24
24
 
25
25
  ```shell
26
- gem install ./docraptor-3.0.0.gem
26
+ gem install ./docraptor-3.1.0.gem
27
27
  ```
28
28
 
29
- (for development, run `gem install --dev ./docraptor-3.0.0.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./docraptor-3.1.0.gem` to install the development dependencies)
30
30
 
31
31
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
32
32
 
33
33
  Finally add this to the Gemfile:
34
34
 
35
- gem 'docraptor', '~> 3.0.0'
35
+ gem 'docraptor', '~> 3.1.0'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -64,7 +64,7 @@ DocRaptor.configure do |config|
64
64
  end
65
65
 
66
66
  api_instance = DocRaptor::DocApi.new
67
- doc = DocRaptor::Doc.new({name: 'name_example', document_type: 'pdf', document_content: 'document_content_example'}) # Doc | The document to be created.
67
+ doc = DocRaptor::Doc.new({name: 'name_example', document_type: 'pdf'}) # Doc |
68
68
 
69
69
  begin
70
70
  result = api_instance.create_async_doc(doc)
@@ -101,6 +101,7 @@ Class | Method | HTTP request | Description
101
101
  ## Documentation for Authorization
102
102
 
103
103
 
104
+ Authentication schemes defined for the API:
104
105
  ### basicAuth
105
106
 
106
107
  - **Type**: HTTP basic authentication
@@ -0,0 +1,18 @@
1
+ # DocRaptor::AsyncDoc
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **status_id** | **String** | The identifier used to get the status of the document using the status API. | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'docraptor'
13
+
14
+ instance = DocRaptor::AsyncDoc.new(
15
+ status_id: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,50 @@
1
+ # DocRaptor::Doc
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | A name for identifying your document. | |
8
+ | **document_type** | **String** | The type of document being created. | |
9
+ | **document_content** | **String** | The HTML data to be transformed into a document. You must supply content using document_content or document_url. | [optional] |
10
+ | **document_url** | **String** | The URL to fetch the HTML data to be transformed into a document. You must supply content using document_content or document_url. | [optional] |
11
+ | **test** | **Boolean** | Enable test mode for this document. Test documents are not charged for but include a watermark. | [optional][default to true] |
12
+ | **pipeline** | **String** | Specify a specific verison of the DocRaptor Pipeline to use. | [optional] |
13
+ | **strict** | **String** | Force strict HTML validation. | [optional] |
14
+ | **ignore_resource_errors** | **Boolean** | Failed loading of images/javascripts/stylesheets/etc. will not cause the rendering to stop. | [optional][default to true] |
15
+ | **ignore_console_messages** | **Boolean** | Prevent console.log from stopping document rendering during JavaScript execution. | [optional][default to false] |
16
+ | **tag** | **String** | A field for storing a small amount of metadata with this document. | [optional] |
17
+ | **help** | **Boolean** | Request support help with this request if it succeeds. | [optional][default to false] |
18
+ | **javascript** | **Boolean** | Enable DocRaptor JavaScript parsing. PrinceXML JavaScript parsing is also available elsewhere. | [optional][default to false] |
19
+ | **referrer** | **String** | Set HTTP referrer when generating this document. | [optional] |
20
+ | **callback_url** | **String** | A URL that will receive a POST request after successfully completing an asynchronous document. The POST data will include download_url and download_id similar to status API responses. WARNING: this only works on asynchronous documents. | [optional] |
21
+ | **hosted_download_limit** | **Integer** | The number of times a hosted document can be downloaded. If no limit is specified, the document will be available for an unlimited number of downloads. | [optional] |
22
+ | **hosted_expires_at** | **String** | The date and time at which a hosted document will be removed and no longer available. Must be a properly formatted ISO 8601 datetime, like 1981-01-23T08:02:30-05:00. | [optional] |
23
+ | **prince_options** | [**PrinceOptions**](PrinceOptions.md) | | [optional] |
24
+
25
+ ## Example
26
+
27
+ ```ruby
28
+ require 'docraptor'
29
+
30
+ instance = DocRaptor::Doc.new(
31
+ name: null,
32
+ document_type: null,
33
+ document_content: null,
34
+ document_url: null,
35
+ test: null,
36
+ pipeline: null,
37
+ strict: null,
38
+ ignore_resource_errors: null,
39
+ ignore_console_messages: null,
40
+ tag: null,
41
+ help: null,
42
+ javascript: null,
43
+ referrer: null,
44
+ callback_url: null,
45
+ hosted_download_limit: null,
46
+ hosted_expires_at: null,
47
+ prince_options: null
48
+ )
49
+ ```
50
+
@@ -0,0 +1,503 @@
1
+ # DocRaptor::DocApi
2
+
3
+ All URIs are relative to *https://api.docraptor.com*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**create_async_doc**](DocApi.md#create_async_doc) | **POST** /async_docs | |
8
+ | [**create_doc**](DocApi.md#create_doc) | **POST** /docs | |
9
+ | [**create_hosted_async_doc**](DocApi.md#create_hosted_async_doc) | **POST** /hosted_async_docs | |
10
+ | [**create_hosted_doc**](DocApi.md#create_hosted_doc) | **POST** /hosted_docs | |
11
+ | [**expire**](DocApi.md#expire) | **PATCH** /expire/{id} | |
12
+ | [**get_async_doc**](DocApi.md#get_async_doc) | **GET** /download/{id} | |
13
+ | [**get_async_doc_status**](DocApi.md#get_async_doc_status) | **GET** /status/{id} | |
14
+
15
+
16
+ ## create_async_doc
17
+
18
+ > <AsyncDoc> create_async_doc(doc)
19
+
20
+
21
+
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
+
24
+ ### Examples
25
+
26
+ ```ruby
27
+ require 'time'
28
+ require 'docraptor'
29
+ # setup authorization
30
+ DocRaptor.configure do |config|
31
+ # Configure HTTP basic authorization: basicAuth
32
+ config.username = 'YOUR USERNAME'
33
+ config.password = 'YOUR PASSWORD'
34
+ end
35
+
36
+ api_instance = DocRaptor::DocApi.new
37
+ doc = DocRaptor::Doc.new({name: 'name_example', document_type: 'pdf'}) # Doc |
38
+
39
+ begin
40
+
41
+ result = api_instance.create_async_doc(doc)
42
+ p result
43
+ rescue DocRaptor::ApiError => e
44
+ puts "Error when calling DocApi->create_async_doc: #{e}"
45
+ end
46
+ ```
47
+
48
+ #### Using the create_async_doc_with_http_info variant
49
+
50
+ This returns an Array which contains the response data, status code and headers.
51
+
52
+ > <Array(<AsyncDoc>, Integer, Hash)> create_async_doc_with_http_info(doc)
53
+
54
+ ```ruby
55
+ begin
56
+
57
+ data, status_code, headers = api_instance.create_async_doc_with_http_info(doc)
58
+ p status_code # => 2xx
59
+ p headers # => { ... }
60
+ p data # => <AsyncDoc>
61
+ rescue DocRaptor::ApiError => e
62
+ puts "Error when calling DocApi->create_async_doc_with_http_info: #{e}"
63
+ end
64
+ ```
65
+
66
+ ### Parameters
67
+
68
+ | Name | Type | Description | Notes |
69
+ | ---- | ---- | ----------- | ----- |
70
+ | **doc** | [**Doc**](Doc.md) | | |
71
+
72
+ ### Return type
73
+
74
+ [**AsyncDoc**](AsyncDoc.md)
75
+
76
+ ### Authorization
77
+
78
+ [basicAuth](../README.md#basicAuth)
79
+
80
+ ### HTTP request headers
81
+
82
+ - **Content-Type**: application/json
83
+ - **Accept**: */*
84
+
85
+
86
+ ## create_doc
87
+
88
+ > String create_doc(doc)
89
+
90
+
91
+
92
+ Creates a document synchronously.
93
+
94
+ ### Examples
95
+
96
+ ```ruby
97
+ require 'time'
98
+ require 'docraptor'
99
+ # setup authorization
100
+ DocRaptor.configure do |config|
101
+ # Configure HTTP basic authorization: basicAuth
102
+ config.username = 'YOUR USERNAME'
103
+ config.password = 'YOUR PASSWORD'
104
+ end
105
+
106
+ api_instance = DocRaptor::DocApi.new
107
+ doc = DocRaptor::Doc.new({name: 'name_example', document_type: 'pdf'}) # Doc |
108
+
109
+ begin
110
+
111
+ result = api_instance.create_doc(doc)
112
+ p result
113
+ rescue DocRaptor::ApiError => e
114
+ puts "Error when calling DocApi->create_doc: #{e}"
115
+ end
116
+ ```
117
+
118
+ #### Using the create_doc_with_http_info variant
119
+
120
+ This returns an Array which contains the response data, status code and headers.
121
+
122
+ > <Array(String, Integer, Hash)> create_doc_with_http_info(doc)
123
+
124
+ ```ruby
125
+ begin
126
+
127
+ data, status_code, headers = api_instance.create_doc_with_http_info(doc)
128
+ p status_code # => 2xx
129
+ p headers # => { ... }
130
+ p data # => String
131
+ rescue DocRaptor::ApiError => e
132
+ puts "Error when calling DocApi->create_doc_with_http_info: #{e}"
133
+ end
134
+ ```
135
+
136
+ ### Parameters
137
+
138
+ | Name | Type | Description | Notes |
139
+ | ---- | ---- | ----------- | ----- |
140
+ | **doc** | [**Doc**](Doc.md) | | |
141
+
142
+ ### Return type
143
+
144
+ **String**
145
+
146
+ ### Authorization
147
+
148
+ [basicAuth](../README.md#basicAuth)
149
+
150
+ ### HTTP request headers
151
+
152
+ - **Content-Type**: application/json
153
+ - **Accept**: */*
154
+
155
+
156
+ ## create_hosted_async_doc
157
+
158
+ > <AsyncDoc> create_hosted_async_doc(doc)
159
+
160
+
161
+
162
+ 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.
163
+
164
+ ### Examples
165
+
166
+ ```ruby
167
+ require 'time'
168
+ require 'docraptor'
169
+ # setup authorization
170
+ DocRaptor.configure do |config|
171
+ # Configure HTTP basic authorization: basicAuth
172
+ config.username = 'YOUR USERNAME'
173
+ config.password = 'YOUR PASSWORD'
174
+ end
175
+
176
+ api_instance = DocRaptor::DocApi.new
177
+ doc = DocRaptor::Doc.new({name: 'name_example', document_type: 'pdf'}) # Doc |
178
+
179
+ begin
180
+
181
+ result = api_instance.create_hosted_async_doc(doc)
182
+ p result
183
+ rescue DocRaptor::ApiError => e
184
+ puts "Error when calling DocApi->create_hosted_async_doc: #{e}"
185
+ end
186
+ ```
187
+
188
+ #### Using the create_hosted_async_doc_with_http_info variant
189
+
190
+ This returns an Array which contains the response data, status code and headers.
191
+
192
+ > <Array(<AsyncDoc>, Integer, Hash)> create_hosted_async_doc_with_http_info(doc)
193
+
194
+ ```ruby
195
+ begin
196
+
197
+ data, status_code, headers = api_instance.create_hosted_async_doc_with_http_info(doc)
198
+ p status_code # => 2xx
199
+ p headers # => { ... }
200
+ p data # => <AsyncDoc>
201
+ rescue DocRaptor::ApiError => e
202
+ puts "Error when calling DocApi->create_hosted_async_doc_with_http_info: #{e}"
203
+ end
204
+ ```
205
+
206
+ ### Parameters
207
+
208
+ | Name | Type | Description | Notes |
209
+ | ---- | ---- | ----------- | ----- |
210
+ | **doc** | [**Doc**](Doc.md) | | |
211
+
212
+ ### Return type
213
+
214
+ [**AsyncDoc**](AsyncDoc.md)
215
+
216
+ ### Authorization
217
+
218
+ [basicAuth](../README.md#basicAuth)
219
+
220
+ ### HTTP request headers
221
+
222
+ - **Content-Type**: application/json
223
+ - **Accept**: */*
224
+
225
+
226
+ ## create_hosted_doc
227
+
228
+ > <DocStatus> create_hosted_doc(doc)
229
+
230
+
231
+
232
+ Creates a hosted document synchronously.
233
+
234
+ ### Examples
235
+
236
+ ```ruby
237
+ require 'time'
238
+ require 'docraptor'
239
+ # setup authorization
240
+ DocRaptor.configure do |config|
241
+ # Configure HTTP basic authorization: basicAuth
242
+ config.username = 'YOUR USERNAME'
243
+ config.password = 'YOUR PASSWORD'
244
+ end
245
+
246
+ api_instance = DocRaptor::DocApi.new
247
+ doc = DocRaptor::Doc.new({name: 'name_example', document_type: 'pdf'}) # Doc | The document to be created.
248
+
249
+ begin
250
+
251
+ result = api_instance.create_hosted_doc(doc)
252
+ p result
253
+ rescue DocRaptor::ApiError => e
254
+ puts "Error when calling DocApi->create_hosted_doc: #{e}"
255
+ end
256
+ ```
257
+
258
+ #### Using the create_hosted_doc_with_http_info variant
259
+
260
+ This returns an Array which contains the response data, status code and headers.
261
+
262
+ > <Array(<DocStatus>, Integer, Hash)> create_hosted_doc_with_http_info(doc)
263
+
264
+ ```ruby
265
+ begin
266
+
267
+ data, status_code, headers = api_instance.create_hosted_doc_with_http_info(doc)
268
+ p status_code # => 2xx
269
+ p headers # => { ... }
270
+ p data # => <DocStatus>
271
+ rescue DocRaptor::ApiError => e
272
+ puts "Error when calling DocApi->create_hosted_doc_with_http_info: #{e}"
273
+ end
274
+ ```
275
+
276
+ ### Parameters
277
+
278
+ | Name | Type | Description | Notes |
279
+ | ---- | ---- | ----------- | ----- |
280
+ | **doc** | [**Doc**](Doc.md) | The document to be created. | |
281
+
282
+ ### Return type
283
+
284
+ [**DocStatus**](DocStatus.md)
285
+
286
+ ### Authorization
287
+
288
+ [basicAuth](../README.md#basicAuth)
289
+
290
+ ### HTTP request headers
291
+
292
+ - **Content-Type**: application/json
293
+ - **Accept**: */*
294
+
295
+
296
+ ## expire
297
+
298
+ > expire(id)
299
+
300
+
301
+
302
+ Expires a previously created hosted doc.
303
+
304
+ ### Examples
305
+
306
+ ```ruby
307
+ require 'time'
308
+ require 'docraptor'
309
+ # setup authorization
310
+ DocRaptor.configure do |config|
311
+ # Configure HTTP basic authorization: basicAuth
312
+ config.username = 'YOUR USERNAME'
313
+ config.password = 'YOUR PASSWORD'
314
+ end
315
+
316
+ api_instance = DocRaptor::DocApi.new
317
+ id = 'id_example' # String | The download_id returned from status request or hosted document response.
318
+
319
+ begin
320
+
321
+ api_instance.expire(id)
322
+ rescue DocRaptor::ApiError => e
323
+ puts "Error when calling DocApi->expire: #{e}"
324
+ end
325
+ ```
326
+
327
+ #### Using the expire_with_http_info variant
328
+
329
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
330
+
331
+ > <Array(nil, Integer, Hash)> expire_with_http_info(id)
332
+
333
+ ```ruby
334
+ begin
335
+
336
+ data, status_code, headers = api_instance.expire_with_http_info(id)
337
+ p status_code # => 2xx
338
+ p headers # => { ... }
339
+ p data # => nil
340
+ rescue DocRaptor::ApiError => e
341
+ puts "Error when calling DocApi->expire_with_http_info: #{e}"
342
+ end
343
+ ```
344
+
345
+ ### Parameters
346
+
347
+ | Name | Type | Description | Notes |
348
+ | ---- | ---- | ----------- | ----- |
349
+ | **id** | **String** | The download_id returned from status request or hosted document response. | |
350
+
351
+ ### Return type
352
+
353
+ nil (empty response body)
354
+
355
+ ### Authorization
356
+
357
+ [basicAuth](../README.md#basicAuth)
358
+
359
+ ### HTTP request headers
360
+
361
+ - **Content-Type**: Not defined
362
+ - **Accept**: Not defined
363
+
364
+
365
+ ## get_async_doc
366
+
367
+ > String get_async_doc(id)
368
+
369
+
370
+
371
+ Downloads a finished document.
372
+
373
+ ### Examples
374
+
375
+ ```ruby
376
+ require 'time'
377
+ require 'docraptor'
378
+ # setup authorization
379
+ DocRaptor.configure do |config|
380
+ # Configure HTTP basic authorization: basicAuth
381
+ config.username = 'YOUR USERNAME'
382
+ config.password = 'YOUR PASSWORD'
383
+ end
384
+
385
+ api_instance = DocRaptor::DocApi.new
386
+ id = 'id_example' # String | The download_id returned from an async status request or callback.
387
+
388
+ begin
389
+
390
+ result = api_instance.get_async_doc(id)
391
+ p result
392
+ rescue DocRaptor::ApiError => e
393
+ puts "Error when calling DocApi->get_async_doc: #{e}"
394
+ end
395
+ ```
396
+
397
+ #### Using the get_async_doc_with_http_info variant
398
+
399
+ This returns an Array which contains the response data, status code and headers.
400
+
401
+ > <Array(String, Integer, Hash)> get_async_doc_with_http_info(id)
402
+
403
+ ```ruby
404
+ begin
405
+
406
+ data, status_code, headers = api_instance.get_async_doc_with_http_info(id)
407
+ p status_code # => 2xx
408
+ p headers # => { ... }
409
+ p data # => String
410
+ rescue DocRaptor::ApiError => e
411
+ puts "Error when calling DocApi->get_async_doc_with_http_info: #{e}"
412
+ end
413
+ ```
414
+
415
+ ### Parameters
416
+
417
+ | Name | Type | Description | Notes |
418
+ | ---- | ---- | ----------- | ----- |
419
+ | **id** | **String** | The download_id returned from an async status request or callback. | |
420
+
421
+ ### Return type
422
+
423
+ **String**
424
+
425
+ ### Authorization
426
+
427
+ [basicAuth](../README.md#basicAuth)
428
+
429
+ ### HTTP request headers
430
+
431
+ - **Content-Type**: Not defined
432
+ - **Accept**: */*
433
+
434
+
435
+ ## get_async_doc_status
436
+
437
+ > <DocStatus> get_async_doc_status(id)
438
+
439
+
440
+
441
+ Check on the status of an asynchronously created document.
442
+
443
+ ### Examples
444
+
445
+ ```ruby
446
+ require 'time'
447
+ require 'docraptor'
448
+ # setup authorization
449
+ DocRaptor.configure do |config|
450
+ # Configure HTTP basic authorization: basicAuth
451
+ config.username = 'YOUR USERNAME'
452
+ config.password = 'YOUR PASSWORD'
453
+ end
454
+
455
+ api_instance = DocRaptor::DocApi.new
456
+ id = 'id_example' # String | The status_id returned when creating an asynchronous document.
457
+
458
+ begin
459
+
460
+ result = api_instance.get_async_doc_status(id)
461
+ p result
462
+ rescue DocRaptor::ApiError => e
463
+ puts "Error when calling DocApi->get_async_doc_status: #{e}"
464
+ end
465
+ ```
466
+
467
+ #### Using the get_async_doc_status_with_http_info variant
468
+
469
+ This returns an Array which contains the response data, status code and headers.
470
+
471
+ > <Array(<DocStatus>, Integer, Hash)> get_async_doc_status_with_http_info(id)
472
+
473
+ ```ruby
474
+ begin
475
+
476
+ data, status_code, headers = api_instance.get_async_doc_status_with_http_info(id)
477
+ p status_code # => 2xx
478
+ p headers # => { ... }
479
+ p data # => <DocStatus>
480
+ rescue DocRaptor::ApiError => e
481
+ puts "Error when calling DocApi->get_async_doc_status_with_http_info: #{e}"
482
+ end
483
+ ```
484
+
485
+ ### Parameters
486
+
487
+ | Name | Type | Description | Notes |
488
+ | ---- | ---- | ----------- | ----- |
489
+ | **id** | **String** | The status_id returned when creating an asynchronous document. | |
490
+
491
+ ### Return type
492
+
493
+ [**DocStatus**](DocStatus.md)
494
+
495
+ ### Authorization
496
+
497
+ [basicAuth](../README.md#basicAuth)
498
+
499
+ ### HTTP request headers
500
+
501
+ - **Content-Type**: Not defined
502
+ - **Accept**: */*
503
+