form_api 0.1.5 → 0.2.0
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 +4 -4
- data/.gitignore +15 -13
- data/.swagger-codegen-ignore +0 -8
- data/Gemfile +1 -0
- data/Gemfile.lock +80 -0
- data/README.md +86 -70
- data/Rakefile +0 -3
- data/docs/CreateCombinedSubmissionBody.md +11 -0
- data/docs/CreateSubmissionBatchBody.md +10 -0
- data/docs/CreateSubmissionBody.md +10 -0
- data/docs/InlineResponse200.md +8 -0
- data/docs/InlineResponse2001.md +21 -0
- data/docs/InlineResponse201.md +9 -0
- data/docs/InlineResponse2011.md +9 -0
- data/docs/InlineResponse201CombinedSubmission.md +14 -0
- data/docs/InlineResponse400.md +9 -0
- data/docs/InlineResponse401.md +8 -0
- data/docs/InlineResponse422.md +9 -0
- data/docs/PDFApi.md +482 -0
- data/docs/TemplatestemplateIdsubmissionsbatchSubmission.md +14 -0
- data/form_api.gemspec +3 -10
- data/git_push.sh +55 -0
- data/{extensions/lib → lib}/form_api/api/client.rb +2 -2
- data/lib/form_api/api/pdf_api.rb +129 -19
- data/lib/form_api/configuration.rb +1 -1
- data/lib/form_api/models/{data.rb → create_combined_submission_body.rb} +1 -1
- data/lib/form_api/models/create_submission_batch_body.rb +211 -0
- data/lib/form_api/models/{data_1.rb → create_submission_body.rb} +1 -1
- data/lib/form_api/models/inline_response_200_1.rb +400 -0
- data/lib/form_api/models/inline_response_201_1.rb +1 -1
- data/lib/form_api/models/{inline_response_201_1_submission.rb → templatestemplate_idsubmissionsbatch_submission.rb} +1 -1
- data/lib/form_api/version.rb +1 -1
- data/lib/form_api.rb +6 -4
- data/spec/api/pdf_api_spec.rb +41 -15
- data/spec/api_client_spec.rb +1 -1
- data/spec/models/{data_spec.rb → create_combined_submission_body_spec.rb} +6 -6
- data/spec/models/create_submission_batch_body_spec.rb +54 -0
- data/spec/models/{data_1_spec.rb → create_submission_body_spec.rb} +6 -6
- data/spec/models/inline_response_200_1_spec.rb +124 -0
- data/spec/models/{inline_response_201_1_submission_spec.rb → templatestemplate_idsubmissionsbatch_submission_spec.rb} +6 -6
- data/spec/vcr_cassettes/FormAPI_Client/should_generate_a_PDF_and_wait_for_the_submission_to_be_processed.yml +2 -2
- metadata +45 -47
- data/.swagger-revision +0 -1
- data/.travis.yml +0 -8
- data/CHANGELOG.md +0 -2
- data/LICENSE +0 -7
- data/examples/generate_and_download_pdf.rb +0 -60
- data/examples/generate_pdf_async.rb +0 -57
- data/examples/merge_generated_pdfs.rb +0 -31
- data/scripts/clean +0 -5
- data/scripts/fix_gemspec.rb +0 -31
- data/scripts/generate +0 -22
- data/scripts/post_generate +0 -22
- data/scripts/release +0 -6
- data/scripts/swagger +0 -35
- data/scripts/test +0 -24
- data/swagger-config.json +0 -13
data/docs/PDFApi.md
ADDED
@@ -0,0 +1,482 @@
|
|
1
|
+
# FormAPI::PDFApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://app.formapi.io/api/v1*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**batch_generate_pdf**](PDFApi.md#batch_generate_pdf) | **POST** /templates/{template_id}/submissions/batch | Generates multiple PDFs
|
8
|
+
[**combine_submissions**](PDFApi.md#combine_submissions) | **POST** /combined_submissions | Merge generated PDFs together
|
9
|
+
[**expire_combined_submission**](PDFApi.md#expire_combined_submission) | **DELETE** /combined_submissions/{combined_submission_id} | Expire a combined submission
|
10
|
+
[**expire_submission**](PDFApi.md#expire_submission) | **DELETE** /submissions/{submission_id} | Expire a PDF submission
|
11
|
+
[**generate_pdf**](PDFApi.md#generate_pdf) | **POST** /templates/{template_id}/submissions | Generates a new PDF
|
12
|
+
[**get_combined_submission**](PDFApi.md#get_combined_submission) | **GET** /combined_submissions/{combined_submission_id} | Check the status of a combined submission (merged PDFs)
|
13
|
+
[**get_submission**](PDFApi.md#get_submission) | **GET** /submissions/{submission_id} | Check the status of a PDF
|
14
|
+
[**get_templates**](PDFApi.md#get_templates) | **GET** /templates | Get a list of all templates
|
15
|
+
[**test_authentication**](PDFApi.md#test_authentication) | **GET** /authentication | Test Authentication
|
16
|
+
|
17
|
+
|
18
|
+
# **batch_generate_pdf**
|
19
|
+
> Array<InlineResponse2011> batch_generate_pdf(template_id, opts)
|
20
|
+
|
21
|
+
Generates multiple PDFs
|
22
|
+
|
23
|
+
### Example
|
24
|
+
```ruby
|
25
|
+
# load the gem
|
26
|
+
require 'form_api'
|
27
|
+
# setup authorization
|
28
|
+
FormAPI.configure do |config|
|
29
|
+
# Configure HTTP basic authorization: api_token_basic
|
30
|
+
config.username = 'YOUR USERNAME'
|
31
|
+
config.password = 'YOUR PASSWORD'
|
32
|
+
end
|
33
|
+
|
34
|
+
api_instance = FormAPI::PDFApi.new
|
35
|
+
|
36
|
+
template_id = "template_id_example" # String |
|
37
|
+
|
38
|
+
opts = {
|
39
|
+
create_submission_batch_body: [FormAPI::CreateSubmissionBatchBody.new] # Array<CreateSubmissionBatchBody> |
|
40
|
+
}
|
41
|
+
|
42
|
+
begin
|
43
|
+
#Generates multiple PDFs
|
44
|
+
result = api_instance.batch_generate_pdf(template_id, opts)
|
45
|
+
p result
|
46
|
+
rescue FormAPI::ApiError => e
|
47
|
+
puts "Exception when calling PDFApi->batch_generate_pdf: #{e}"
|
48
|
+
end
|
49
|
+
```
|
50
|
+
|
51
|
+
### Parameters
|
52
|
+
|
53
|
+
Name | Type | Description | Notes
|
54
|
+
------------- | ------------- | ------------- | -------------
|
55
|
+
**template_id** | **String**| |
|
56
|
+
**create_submission_batch_body** | [**Array<CreateSubmissionBatchBody>**](CreateSubmissionBatchBody.md)| | [optional]
|
57
|
+
|
58
|
+
### Return type
|
59
|
+
|
60
|
+
[**Array<InlineResponse2011>**](InlineResponse2011.md)
|
61
|
+
|
62
|
+
### Authorization
|
63
|
+
|
64
|
+
[api_token_basic](../README.md#api_token_basic)
|
65
|
+
|
66
|
+
### HTTP request headers
|
67
|
+
|
68
|
+
- **Content-Type**: application/json
|
69
|
+
- **Accept**: application/json
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
# **combine_submissions**
|
74
|
+
> InlineResponse201 combine_submissions(opts)
|
75
|
+
|
76
|
+
Merge generated PDFs together
|
77
|
+
|
78
|
+
### Example
|
79
|
+
```ruby
|
80
|
+
# load the gem
|
81
|
+
require 'form_api'
|
82
|
+
# setup authorization
|
83
|
+
FormAPI.configure do |config|
|
84
|
+
# Configure HTTP basic authorization: api_token_basic
|
85
|
+
config.username = 'YOUR USERNAME'
|
86
|
+
config.password = 'YOUR PASSWORD'
|
87
|
+
end
|
88
|
+
|
89
|
+
api_instance = FormAPI::PDFApi.new
|
90
|
+
|
91
|
+
opts = {
|
92
|
+
create_combined_submission_body: FormAPI::CreateCombinedSubmissionBody.new # CreateCombinedSubmissionBody |
|
93
|
+
}
|
94
|
+
|
95
|
+
begin
|
96
|
+
#Merge generated PDFs together
|
97
|
+
result = api_instance.combine_submissions(opts)
|
98
|
+
p result
|
99
|
+
rescue FormAPI::ApiError => e
|
100
|
+
puts "Exception when calling PDFApi->combine_submissions: #{e}"
|
101
|
+
end
|
102
|
+
```
|
103
|
+
|
104
|
+
### Parameters
|
105
|
+
|
106
|
+
Name | Type | Description | Notes
|
107
|
+
------------- | ------------- | ------------- | -------------
|
108
|
+
**create_combined_submission_body** | [**CreateCombinedSubmissionBody**](CreateCombinedSubmissionBody.md)| | [optional]
|
109
|
+
|
110
|
+
### Return type
|
111
|
+
|
112
|
+
[**InlineResponse201**](InlineResponse201.md)
|
113
|
+
|
114
|
+
### Authorization
|
115
|
+
|
116
|
+
[api_token_basic](../README.md#api_token_basic)
|
117
|
+
|
118
|
+
### HTTP request headers
|
119
|
+
|
120
|
+
- **Content-Type**: application/json
|
121
|
+
- **Accept**: application/json
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
# **expire_combined_submission**
|
126
|
+
> InlineResponse201CombinedSubmission expire_combined_submission(combined_submission_id)
|
127
|
+
|
128
|
+
Expire a combined submission
|
129
|
+
|
130
|
+
### Example
|
131
|
+
```ruby
|
132
|
+
# load the gem
|
133
|
+
require 'form_api'
|
134
|
+
# setup authorization
|
135
|
+
FormAPI.configure do |config|
|
136
|
+
# Configure HTTP basic authorization: api_token_basic
|
137
|
+
config.username = 'YOUR USERNAME'
|
138
|
+
config.password = 'YOUR PASSWORD'
|
139
|
+
end
|
140
|
+
|
141
|
+
api_instance = FormAPI::PDFApi.new
|
142
|
+
|
143
|
+
combined_submission_id = "combined_submission_id_example" # String |
|
144
|
+
|
145
|
+
|
146
|
+
begin
|
147
|
+
#Expire a combined submission
|
148
|
+
result = api_instance.expire_combined_submission(combined_submission_id)
|
149
|
+
p result
|
150
|
+
rescue FormAPI::ApiError => e
|
151
|
+
puts "Exception when calling PDFApi->expire_combined_submission: #{e}"
|
152
|
+
end
|
153
|
+
```
|
154
|
+
|
155
|
+
### Parameters
|
156
|
+
|
157
|
+
Name | Type | Description | Notes
|
158
|
+
------------- | ------------- | ------------- | -------------
|
159
|
+
**combined_submission_id** | **String**| |
|
160
|
+
|
161
|
+
### Return type
|
162
|
+
|
163
|
+
[**InlineResponse201CombinedSubmission**](InlineResponse201CombinedSubmission.md)
|
164
|
+
|
165
|
+
### Authorization
|
166
|
+
|
167
|
+
[api_token_basic](../README.md#api_token_basic)
|
168
|
+
|
169
|
+
### HTTP request headers
|
170
|
+
|
171
|
+
- **Content-Type**: Not defined
|
172
|
+
- **Accept**: application/json
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
# **expire_submission**
|
177
|
+
> TemplatestemplateIdsubmissionsbatchSubmission expire_submission(submission_id)
|
178
|
+
|
179
|
+
Expire a PDF submission
|
180
|
+
|
181
|
+
### Example
|
182
|
+
```ruby
|
183
|
+
# load the gem
|
184
|
+
require 'form_api'
|
185
|
+
# setup authorization
|
186
|
+
FormAPI.configure do |config|
|
187
|
+
# Configure HTTP basic authorization: api_token_basic
|
188
|
+
config.username = 'YOUR USERNAME'
|
189
|
+
config.password = 'YOUR PASSWORD'
|
190
|
+
end
|
191
|
+
|
192
|
+
api_instance = FormAPI::PDFApi.new
|
193
|
+
|
194
|
+
submission_id = "submission_id_example" # String |
|
195
|
+
|
196
|
+
|
197
|
+
begin
|
198
|
+
#Expire a PDF submission
|
199
|
+
result = api_instance.expire_submission(submission_id)
|
200
|
+
p result
|
201
|
+
rescue FormAPI::ApiError => e
|
202
|
+
puts "Exception when calling PDFApi->expire_submission: #{e}"
|
203
|
+
end
|
204
|
+
```
|
205
|
+
|
206
|
+
### Parameters
|
207
|
+
|
208
|
+
Name | Type | Description | Notes
|
209
|
+
------------- | ------------- | ------------- | -------------
|
210
|
+
**submission_id** | **String**| |
|
211
|
+
|
212
|
+
### Return type
|
213
|
+
|
214
|
+
[**TemplatestemplateIdsubmissionsbatchSubmission**](TemplatestemplateIdsubmissionsbatchSubmission.md)
|
215
|
+
|
216
|
+
### Authorization
|
217
|
+
|
218
|
+
[api_token_basic](../README.md#api_token_basic)
|
219
|
+
|
220
|
+
### HTTP request headers
|
221
|
+
|
222
|
+
- **Content-Type**: Not defined
|
223
|
+
- **Accept**: application/json
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
# **generate_pdf**
|
228
|
+
> InlineResponse2011 generate_pdf(template_id, opts)
|
229
|
+
|
230
|
+
Generates a new PDF
|
231
|
+
|
232
|
+
### Example
|
233
|
+
```ruby
|
234
|
+
# load the gem
|
235
|
+
require 'form_api'
|
236
|
+
# setup authorization
|
237
|
+
FormAPI.configure do |config|
|
238
|
+
# Configure HTTP basic authorization: api_token_basic
|
239
|
+
config.username = 'YOUR USERNAME'
|
240
|
+
config.password = 'YOUR PASSWORD'
|
241
|
+
end
|
242
|
+
|
243
|
+
api_instance = FormAPI::PDFApi.new
|
244
|
+
|
245
|
+
template_id = "template_id_example" # String |
|
246
|
+
|
247
|
+
opts = {
|
248
|
+
create_submission_body: FormAPI::CreateSubmissionBody.new # CreateSubmissionBody |
|
249
|
+
}
|
250
|
+
|
251
|
+
begin
|
252
|
+
#Generates a new PDF
|
253
|
+
result = api_instance.generate_pdf(template_id, opts)
|
254
|
+
p result
|
255
|
+
rescue FormAPI::ApiError => e
|
256
|
+
puts "Exception when calling PDFApi->generate_pdf: #{e}"
|
257
|
+
end
|
258
|
+
```
|
259
|
+
|
260
|
+
### Parameters
|
261
|
+
|
262
|
+
Name | Type | Description | Notes
|
263
|
+
------------- | ------------- | ------------- | -------------
|
264
|
+
**template_id** | **String**| |
|
265
|
+
**create_submission_body** | [**CreateSubmissionBody**](CreateSubmissionBody.md)| | [optional]
|
266
|
+
|
267
|
+
### Return type
|
268
|
+
|
269
|
+
[**InlineResponse2011**](InlineResponse2011.md)
|
270
|
+
|
271
|
+
### Authorization
|
272
|
+
|
273
|
+
[api_token_basic](../README.md#api_token_basic)
|
274
|
+
|
275
|
+
### HTTP request headers
|
276
|
+
|
277
|
+
- **Content-Type**: application/json
|
278
|
+
- **Accept**: application/json
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
# **get_combined_submission**
|
283
|
+
> InlineResponse201CombinedSubmission get_combined_submission(combined_submission_id)
|
284
|
+
|
285
|
+
Check the status of a combined submission (merged PDFs)
|
286
|
+
|
287
|
+
### Example
|
288
|
+
```ruby
|
289
|
+
# load the gem
|
290
|
+
require 'form_api'
|
291
|
+
# setup authorization
|
292
|
+
FormAPI.configure do |config|
|
293
|
+
# Configure HTTP basic authorization: api_token_basic
|
294
|
+
config.username = 'YOUR USERNAME'
|
295
|
+
config.password = 'YOUR PASSWORD'
|
296
|
+
end
|
297
|
+
|
298
|
+
api_instance = FormAPI::PDFApi.new
|
299
|
+
|
300
|
+
combined_submission_id = "combined_submission_id_example" # String |
|
301
|
+
|
302
|
+
|
303
|
+
begin
|
304
|
+
#Check the status of a combined submission (merged PDFs)
|
305
|
+
result = api_instance.get_combined_submission(combined_submission_id)
|
306
|
+
p result
|
307
|
+
rescue FormAPI::ApiError => e
|
308
|
+
puts "Exception when calling PDFApi->get_combined_submission: #{e}"
|
309
|
+
end
|
310
|
+
```
|
311
|
+
|
312
|
+
### Parameters
|
313
|
+
|
314
|
+
Name | Type | Description | Notes
|
315
|
+
------------- | ------------- | ------------- | -------------
|
316
|
+
**combined_submission_id** | **String**| |
|
317
|
+
|
318
|
+
### Return type
|
319
|
+
|
320
|
+
[**InlineResponse201CombinedSubmission**](InlineResponse201CombinedSubmission.md)
|
321
|
+
|
322
|
+
### Authorization
|
323
|
+
|
324
|
+
[api_token_basic](../README.md#api_token_basic)
|
325
|
+
|
326
|
+
### HTTP request headers
|
327
|
+
|
328
|
+
- **Content-Type**: Not defined
|
329
|
+
- **Accept**: application/json
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
# **get_submission**
|
334
|
+
> TemplatestemplateIdsubmissionsbatchSubmission get_submission(submission_id)
|
335
|
+
|
336
|
+
Check the status of a PDF
|
337
|
+
|
338
|
+
### Example
|
339
|
+
```ruby
|
340
|
+
# load the gem
|
341
|
+
require 'form_api'
|
342
|
+
# setup authorization
|
343
|
+
FormAPI.configure do |config|
|
344
|
+
# Configure HTTP basic authorization: api_token_basic
|
345
|
+
config.username = 'YOUR USERNAME'
|
346
|
+
config.password = 'YOUR PASSWORD'
|
347
|
+
end
|
348
|
+
|
349
|
+
api_instance = FormAPI::PDFApi.new
|
350
|
+
|
351
|
+
submission_id = "submission_id_example" # String |
|
352
|
+
|
353
|
+
|
354
|
+
begin
|
355
|
+
#Check the status of a PDF
|
356
|
+
result = api_instance.get_submission(submission_id)
|
357
|
+
p result
|
358
|
+
rescue FormAPI::ApiError => e
|
359
|
+
puts "Exception when calling PDFApi->get_submission: #{e}"
|
360
|
+
end
|
361
|
+
```
|
362
|
+
|
363
|
+
### Parameters
|
364
|
+
|
365
|
+
Name | Type | Description | Notes
|
366
|
+
------------- | ------------- | ------------- | -------------
|
367
|
+
**submission_id** | **String**| |
|
368
|
+
|
369
|
+
### Return type
|
370
|
+
|
371
|
+
[**TemplatestemplateIdsubmissionsbatchSubmission**](TemplatestemplateIdsubmissionsbatchSubmission.md)
|
372
|
+
|
373
|
+
### Authorization
|
374
|
+
|
375
|
+
[api_token_basic](../README.md#api_token_basic)
|
376
|
+
|
377
|
+
### HTTP request headers
|
378
|
+
|
379
|
+
- **Content-Type**: Not defined
|
380
|
+
- **Accept**: application/json
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
# **get_templates**
|
385
|
+
> Array<InlineResponse2001> get_templates(opts)
|
386
|
+
|
387
|
+
Get a list of all templates
|
388
|
+
|
389
|
+
### Example
|
390
|
+
```ruby
|
391
|
+
# load the gem
|
392
|
+
require 'form_api'
|
393
|
+
# setup authorization
|
394
|
+
FormAPI.configure do |config|
|
395
|
+
# Configure HTTP basic authorization: api_token_basic
|
396
|
+
config.username = 'YOUR USERNAME'
|
397
|
+
config.password = 'YOUR PASSWORD'
|
398
|
+
end
|
399
|
+
|
400
|
+
api_instance = FormAPI::PDFApi.new
|
401
|
+
|
402
|
+
opts = {
|
403
|
+
page: 56, # Integer | Default: 1
|
404
|
+
per_page: 56 # Integer | Default: 50
|
405
|
+
}
|
406
|
+
|
407
|
+
begin
|
408
|
+
#Get a list of all templates
|
409
|
+
result = api_instance.get_templates(opts)
|
410
|
+
p result
|
411
|
+
rescue FormAPI::ApiError => e
|
412
|
+
puts "Exception when calling PDFApi->get_templates: #{e}"
|
413
|
+
end
|
414
|
+
```
|
415
|
+
|
416
|
+
### Parameters
|
417
|
+
|
418
|
+
Name | Type | Description | Notes
|
419
|
+
------------- | ------------- | ------------- | -------------
|
420
|
+
**page** | **Integer**| Default: 1 | [optional]
|
421
|
+
**per_page** | **Integer**| Default: 50 | [optional]
|
422
|
+
|
423
|
+
### Return type
|
424
|
+
|
425
|
+
[**Array<InlineResponse2001>**](InlineResponse2001.md)
|
426
|
+
|
427
|
+
### Authorization
|
428
|
+
|
429
|
+
[api_token_basic](../README.md#api_token_basic)
|
430
|
+
|
431
|
+
### HTTP request headers
|
432
|
+
|
433
|
+
- **Content-Type**: Not defined
|
434
|
+
- **Accept**: application/json
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
# **test_authentication**
|
439
|
+
> InlineResponse200 test_authentication
|
440
|
+
|
441
|
+
Test Authentication
|
442
|
+
|
443
|
+
### Example
|
444
|
+
```ruby
|
445
|
+
# load the gem
|
446
|
+
require 'form_api'
|
447
|
+
# setup authorization
|
448
|
+
FormAPI.configure do |config|
|
449
|
+
# Configure HTTP basic authorization: api_token_basic
|
450
|
+
config.username = 'YOUR USERNAME'
|
451
|
+
config.password = 'YOUR PASSWORD'
|
452
|
+
end
|
453
|
+
|
454
|
+
api_instance = FormAPI::PDFApi.new
|
455
|
+
|
456
|
+
begin
|
457
|
+
#Test Authentication
|
458
|
+
result = api_instance.test_authentication
|
459
|
+
p result
|
460
|
+
rescue FormAPI::ApiError => e
|
461
|
+
puts "Exception when calling PDFApi->test_authentication: #{e}"
|
462
|
+
end
|
463
|
+
```
|
464
|
+
|
465
|
+
### Parameters
|
466
|
+
This endpoint does not need any parameter.
|
467
|
+
|
468
|
+
### Return type
|
469
|
+
|
470
|
+
[**InlineResponse200**](InlineResponse200.md)
|
471
|
+
|
472
|
+
### Authorization
|
473
|
+
|
474
|
+
[api_token_basic](../README.md#api_token_basic)
|
475
|
+
|
476
|
+
### HTTP request headers
|
477
|
+
|
478
|
+
- **Content-Type**: Not defined
|
479
|
+
- **Accept**: application/json
|
480
|
+
|
481
|
+
|
482
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# FormAPI::TemplatestemplateIdsubmissionsbatchSubmission
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**id** | **String** | |
|
7
|
+
**test** | **BOOLEAN** | |
|
8
|
+
**expired** | **BOOLEAN** | |
|
9
|
+
**expires_at** | **String** | | [optional]
|
10
|
+
**state** | **String** | |
|
11
|
+
**metadata** | **Object** | | [optional]
|
12
|
+
**download_url** | **String** | | [optional]
|
13
|
+
|
14
|
+
|
data/form_api.gemspec
CHANGED
@@ -22,8 +22,8 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.authors = ["Form Applications Inc."]
|
23
23
|
s.email = ["support@formapi.io"]
|
24
24
|
s.homepage = "https://github.com/FormAPI/formapi-ruby"
|
25
|
-
s.summary = "
|
26
|
-
s.description = "
|
25
|
+
s.summary = "FormAPI API Client"
|
26
|
+
s.description = "Client library for the FormAPI PDF generation service"
|
27
27
|
s.license = "MIT"
|
28
28
|
s.required_ruby_version = ">= 1.9"
|
29
29
|
|
@@ -33,8 +33,6 @@ Gem::Specification.new do |s|
|
|
33
33
|
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
34
34
|
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
|
35
35
|
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
|
36
|
-
# This version of addressable is required for Ruby 1.9.3 support
|
37
|
-
s.add_development_dependency 'addressable', '~> 2.4.0'
|
38
36
|
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
|
39
37
|
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
|
40
38
|
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
|
@@ -42,12 +40,7 @@ Gem::Specification.new do |s|
|
|
42
40
|
|
43
41
|
# added by script/fix_gemspec.rb.
|
44
42
|
s.add_development_dependency 'rake', '~>11.2', '>= 11.2.2'
|
45
|
-
|
46
|
-
s.add_development_dependency 'pry-byebug'
|
47
|
-
else
|
48
|
-
s.add_development_dependency 'pry', '~>0.10', '>= 0.10.4'
|
49
|
-
end
|
50
|
-
|
43
|
+
s.add_development_dependency 'pry', '~>0.10', '>= 0.10.4'
|
51
44
|
# </added> : if the above lines are missing in the gemspec, then
|
52
45
|
# the matcher for autotest is probably broken
|
53
46
|
|
data/git_push.sh
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
#
|
3
|
+
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
4
|
+
#
|
5
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
6
|
+
#
|
7
|
+
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
8
|
+
|
9
|
+
git_user_id=$1
|
10
|
+
git_repo_id=$2
|
11
|
+
release_note=$3
|
12
|
+
|
13
|
+
if [ "$git_user_id" = "" ]; then
|
14
|
+
git_user_id="GIT_USER_ID"
|
15
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
16
|
+
fi
|
17
|
+
|
18
|
+
if [ "$git_repo_id" = "" ]; then
|
19
|
+
git_repo_id="GIT_REPO_ID"
|
20
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
21
|
+
fi
|
22
|
+
|
23
|
+
if [ "$release_note" = "" ]; then
|
24
|
+
release_note="Minor update"
|
25
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
26
|
+
fi
|
27
|
+
|
28
|
+
# Initialize the local directory as a Git repository
|
29
|
+
git init
|
30
|
+
|
31
|
+
# Adds the files in the local repository and stages them for commit.
|
32
|
+
git add .
|
33
|
+
|
34
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
35
|
+
git commit -m "$release_note"
|
36
|
+
|
37
|
+
# Sets the new remote
|
38
|
+
git_remote=`git remote`
|
39
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
40
|
+
|
41
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
42
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
43
|
+
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
44
|
+
else
|
45
|
+
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
46
|
+
fi
|
47
|
+
|
48
|
+
fi
|
49
|
+
|
50
|
+
git pull origin master
|
51
|
+
|
52
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
53
|
+
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
54
|
+
git push origin master 2>&1 | grep -v 'To https'
|
55
|
+
|
@@ -21,9 +21,9 @@ module FormAPI
|
|
21
21
|
end
|
22
22
|
|
23
23
|
# FormAPI requires a nested :data object.
|
24
|
-
opts[:
|
24
|
+
opts[:'create_submission_body'] = { data: opts.delete(:data) }
|
25
25
|
if opts[:metadata]
|
26
|
-
opts[:
|
26
|
+
opts[:'create_submission_body'][:metadata] = opts.delete(:metadata)
|
27
27
|
end
|
28
28
|
|
29
29
|
template_id = opts.delete :template_id
|