jotform-api-client
jotform-api-client
How to use
Refer to Jotform API for request and response
# install lib
bundle add jotform-api-client
require 'jotform_api_client'
api_key = <your-jotform-api-key>
jotform_api_client = JotFormApiClient.new(api_key)
get user
user = jotform_api_client.user
get user usage
user_usage = jotform_api_client.user_usage
get user submissions
user_submissions = jotform_api_client.user_submissions
get user subusers
user_subusers = jotform_api_client.user_subusers
get user folders
user_folders = jotform_api_client.user_folders
get user reports
user_reports = jotform_api_client.user_reports
get user settings
user_settings = jotform_api_client.user_settings
get user history
user_history = jotform_api_client.user_history
get user forms
user_forms = jotform_api_client.user_forms
create form
# your params
params = {}
create_form = jotform_api_client.create_form(params)
get form by id
# your form id
id = ''
get_form_by_id = jotform_api_client.get_form_by_id(id)
get form questions
# your form id
id = ''
get_form_questions = jotform_api_client.get_form_questions(id)
get form question
# your form id
form_id = ''
# your question id
question_id = ''
get_form_questions = jotform_api_client.get_form_question(form_id, question_id)
get form properties
# your form id
form_id = ''
get_form_properties = jotform_api_client.get_form_properties(form_id)
get form property
# your form id
form_id = ''
# your property_key
property_key = ''
get_form_property = jotform_api_client.get_form_property(form_id, property_key)
get form submissions
# your form id
form_id = ''
# your params
params = {}
get_form_property = jotform_api_client.get_form_submissions(form_id, params)
get form files
# your form id
form_id = ''
get_form_files = jotform_api_client.get_form_files(form_id)
get form webhooks
# your form id
form_id = ''
get_form_webhooks = jotform_api_client.get_form_webhooks(form_id)
create form webhooks
# your form id
form_id = ''
# your params
params = {}
create_form_webhooks = jotform_api_client.create_form_webhooks(form_id, params)
create form submissions
# your form id
form_id = ''
# your params
params = {}
create_form_webhooks = jotform_api_client.create_form_submissions(form_id, params)
get submission
# your submission id
submission_id = ''
get_submission = jotform_api_client.get_submission(submission_id)
get report
# your report id
report_id = ''
get_report = jotform_api_client.get_report(report_id)
get folder
# your folder id
folder_id = ''
get_folder = jotform_api_client.get_folder(folder_id)
Requirement
- install ruby (v2.7)
- install gem
- install bundle
Testing and run
// install ruby dependencies
$ bundle install
// build executable
$ gem build jotform_api_client.gemspec
// remove gem version in rubygems
$ gem yank jotform_api_client -v <version>
// publish new version to rubygems
$ gem push jotform_api_client-<version>.gem
// run test
$ bundle exec rspec
// rubocop
$ rubocop --auto-correct
$ rubocop -A
// reek
$ reek