form_api
FormAPI - the Ruby gem for the API V1
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
This SDK is automatically generated by the Swagger Codegen project:
- API version: v1
- Package version: 0.2.0
- Build package: io.swagger.codegen.languages.RubyClientCodegen
Installation
Build a gem
To build the Ruby code into a gem:
gem build form_api.gemspec
Then either install the gem locally:
gem install ./form_api-0.2.0.gem
(for development, run gem install --dev ./form_api-0.2.0.gem to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'form_api', '~> 0.2.0'
Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'form_api', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly
Include the Ruby code directly using -I as follows:
ruby -Ilib script.rb
Getting Started
Please follow the installation procedure and then run the following code:
# Load the gem
require 'form_api'
# Setup authorization
FormAPI.configure do |config|
# Configure HTTP basic authorization: api_token_basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = FormAPI::PDFApi.new
template_id = "template_id_example" # String |
opts = {
create_submission_batch_body: [FormAPI::CreateSubmissionBatchBody.new] # Array<CreateSubmissionBatchBody> |
}
begin
#Generates multiple PDFs
result = api_instance.batch_generate_pdf(template_id, opts)
p result
rescue FormAPI::ApiError => e
puts "Exception when calling PDFApi->batch_generate_pdf: #{e}"
end
Documentation for API Endpoints
All URIs are relative to https://app.formapi.io/api/v1
| Class | Method | HTTP request | Description |
|---|---|---|---|
| FormAPI::PDFApi | batch_generate_pdf | POST /templates/template_id/submissions/batch | Generates multiple PDFs |
| FormAPI::PDFApi | combine_submissions | POST /combined_submissions | Merge generated PDFs together |
| FormAPI::PDFApi | expire_combined_submission | DELETE /combined_submissions/combined_submission_id | Expire a combined submission |
| FormAPI::PDFApi | expire_submission | DELETE /submissions/submission_id | Expire a PDF submission |
| FormAPI::PDFApi | generate_pdf | POST /templates/template_id/submissions | Generates a new PDF |
| FormAPI::PDFApi | get_combined_submission | GET /combined_submissions/combined_submission_id | Check the status of a combined submission (merged PDFs) |
| FormAPI::PDFApi | get_submission | GET /submissions/submission_id | Check the status of a PDF |
| FormAPI::PDFApi | get_templates | GET /templates | Get a list of all templates |
| FormAPI::PDFApi | test_authentication | GET /authentication | Test Authentication |
Documentation for Models
- FormAPI::CreateCombinedSubmissionBody
- FormAPI::CreateSubmissionBatchBody
- FormAPI::CreateSubmissionBody
- FormAPI::InlineResponse200
- FormAPI::InlineResponse2001
- FormAPI::InlineResponse201
- FormAPI::InlineResponse2011
- FormAPI::InlineResponse201CombinedSubmission
- FormAPI::InlineResponse400
- FormAPI::InlineResponse401
- FormAPI::InlineResponse422
- FormAPI::TemplatestemplateIdsubmissionsbatchSubmission
Documentation for Authorization
api_token_basic
- Type: HTTP basic authentication