├── .ruby-version ├── .rspec ├── Rakefile ├── lib ├── formstack-api.rb └── formstack │ ├── api │ └── version.rb │ └── api.rb ├── spec ├── fs-logo.png ├── spec_helper.rb ├── vcr │ └── Formstack_API │ │ ├── _request │ │ └── raises_an_exception_with_a_bad_token.yml │ │ ├── _copy_form │ │ └── raises_an_error_if_form_id_is_invalid.yml │ │ ├── _form_details │ │ ├── responds_with_an_error_if_form_id_doesnt_exist.yml │ │ ├── responds_with_an_error_if_you_dont_have_access_to_form.yml │ │ └── reads_a_form_name.yml │ │ ├── _form_fields │ │ └── retrieves_all_the_fields_from_a_form.yml │ │ ├── _create_field │ │ ├── creates_a_field_with_embeded_code.yml │ │ └── creates_a_text_field.yml │ │ ├── _get_submission_details │ │ └── gets_the_right_submission_from_the_right_form.yml │ │ ├── _submit_form │ │ ├── creates_a_submission_into_a_form.yml │ │ └── uploads_an_image.yml │ │ ├── _form_submissions │ │ ├── raises_an_error_if_page_number_is_not_working.yml │ │ ├── returns_no_data_by_default.yml │ │ └── returns_data_if_specified.yml │ │ ├── _forms │ │ ├── gets_folders_when_asked.yml │ │ └── responds_with_no_folders_by_default.yml │ │ ├── _edit_submission_data │ │ ├── raises_an_exception_with_a_bad_timestamp.yml │ │ ├── raises_an_exception_if_fields_are_non_numeric.yml │ │ ├── raises_an_exception_when_data_array_and_ids_don_t_match.yml │ │ ├── raises_an_exception_when_data_array_and_ids_don_t_match_reversed.yml │ │ └── edits_a_submission_succesfully.yml │ │ └── _delete_submission │ │ └── deletes_a_submission.yml ├── support │ └── vcr.rb └── wrapper_spec.rb ├── Gemfile ├── .gitignore ├── README.md ├── LICENSE.txt ├── formstack-api.gemspec ├── Guardfile └── Gemfile.lock /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.7.0 2 | -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | --require spec_helper 3 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require "bundler/gem_tasks" 2 | 3 | -------------------------------------------------------------------------------- /lib/formstack-api.rb: -------------------------------------------------------------------------------- 1 | require 'formstack/api' 2 | -------------------------------------------------------------------------------- /spec/fs-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/envato/formstack-api/master/spec/fs-logo.png -------------------------------------------------------------------------------- /lib/formstack/api/version.rb: -------------------------------------------------------------------------------- 1 | module Formstack 2 | module Api 3 | VERSION = "0.0.8" 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # Specify your gem's dependencies in formstack-api.gemspec 4 | gemspec 5 | -------------------------------------------------------------------------------- /spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | Dir["./spec/support/**/*.rb"].sort.each { |f| require f} 2 | 3 | RSpec.configure do |config| 4 | config.disable_monkey_patching! 5 | end 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.gem 2 | *.rbc 3 | .bundle 4 | .config 5 | .yardoc 6 | # Gemfile.lock 7 | InstalledFiles 8 | _yardoc 9 | coverage 10 | doc/ 11 | lib/bundler/man 12 | pkg 13 | rdoc 14 | spec/reports 15 | test/tmp 16 | test/version_tmp 17 | tmp 18 | *.bundle 19 | *.so 20 | *.o 21 | *.a 22 | mkmf.log 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Codeship Status for LAS-IT/formstack-api](https://app.codeship.com/projects/0bddff20-3ec1-0138-e879-06fe3f45f76c/status?branch=master)](https://app.codeship.com/projects/387490) 2 | 3 | # Formstack::Api 4 | 5 | This is a Ruby Wrapper for the Formstack API V2. Be aware that it's still under 6 | development so methods can be changed or deprecated. As soon as the project is 7 | stable the version number will be bumped to 1.0.0 8 | 9 | Please open up an issue if you have any question or requests. 10 | 11 | ## Installation 12 | 13 | Add this line to your application's Gemfile: 14 | 15 | gem 'formstack-api' 16 | 17 | And then execute: 18 | 19 | $ bundle 20 | 21 | Or install it yourself as: 22 | 23 | $ gem install formstack-api 24 | 25 | ## Usage 26 | 27 | require 'formstack-api' 28 | 29 | ## Contributing 30 | 31 | 1. Fork it ( https://github.com/LAS-IT/formstack-api/fork ) 32 | 2. Create your feature branch (`git checkout -b my-new-feature`) 33 | 3. Commit your changes (`git commit -am 'Add some feature'`) 34 | 4. Push to the branch (`git push origin my-new-feature`) 35 | 5. Create a new Pull Request 36 | -------------------------------------------------------------------------------- /spec/vcr/Formstack_API/_request/raises_an_exception_with_a_bad_token.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: https://www.formstack.com/api/v2/form.json 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: 10 | Authorization: 11 | - Bearer fail 12 | response: 13 | status: 14 | code: 401 15 | message: Unauthorized 16 | headers: 17 | Server: 18 | - nginx 19 | Date: 20 | - Wed, 05 Nov 2014 15:13:27 GMT 21 | Content-Type: 22 | - text/html; charset=UTF-8 23 | Content-Length: 24 | - '0' 25 | Connection: 26 | - keep-alive 27 | P3p: 28 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 29 | DSP COR" 30 | Set-Cookie: 31 | - FormstackAdmin=iceg9r39uau2mt7gr6m8u2gph1; path=/api/; secure; HttpOnly 32 | Www-Authenticate: 33 | - Bearer realm='Service', error='invalid_token' 34 | body: 35 | encoding: UTF-8 36 | string: '' 37 | http_version: 38 | recorded_at: Wed, 05 Nov 2014 15:13:26 GMT 39 | recorded_with: VCR 2.9.3 40 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Mauro Morales 2 | 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /spec/vcr/Formstack_API/_copy_form/raises_an_error_if_form_id_is_invalid.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: https://www.formstack.com/api/v2/form/1234/copy 6 | body: 7 | encoding: UTF-8 8 | string: '' 9 | headers: 10 | Authorization: 11 | - Bearer 12 | response: 13 | status: 14 | code: 200 15 | message: OK 16 | headers: 17 | Server: 18 | - nginx 19 | Date: 20 | - Wed, 05 Nov 2014 15:13:33 GMT 21 | Content-Type: 22 | - application/json 23 | Content-Length: 24 | - '61' 25 | Connection: 26 | - keep-alive 27 | P3p: 28 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 29 | DSP COR" 30 | Set-Cookie: 31 | - FormstackAdmin=9atv6r9l2v3otdd7i5f4n08k52; path=/api/; secure; HttpOnly 32 | Cache-Control: 33 | - no-cache 34 | body: 35 | encoding: UTF-8 36 | string: '{"status":"error","error":"A valid form id was not supplied"}' 37 | http_version: 38 | recorded_at: Wed, 05 Nov 2014 15:13:32 GMT 39 | recorded_with: VCR 2.9.3 40 | -------------------------------------------------------------------------------- /spec/vcr/Formstack_API/_form_details/responds_with_an_error_if_form_id_doesnt_exist.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: https://www.formstack.com/api/v2/form/1234 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: 10 | Authorization: 11 | - Bearer 12 | response: 13 | status: 14 | code: 200 15 | message: OK 16 | headers: 17 | Server: 18 | - nginx 19 | Date: 20 | - Wed, 05 Nov 2014 15:13:30 GMT 21 | Content-Type: 22 | - application/json 23 | Content-Length: 24 | - '51' 25 | Connection: 26 | - keep-alive 27 | P3p: 28 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 29 | DSP COR" 30 | Set-Cookie: 31 | - FormstackAdmin=psqkk3dh0ftpk2behqd9nu4hk6; path=/api/; secure; HttpOnly 32 | Cache-Control: 33 | - no-cache 34 | body: 35 | encoding: UTF-8 36 | string: '{"status":"error","error":"The form was not found"}' 37 | http_version: 38 | recorded_at: Wed, 05 Nov 2014 15:13:29 GMT 39 | recorded_with: VCR 2.9.3 40 | -------------------------------------------------------------------------------- /spec/vcr/Formstack_API/_form_details/responds_with_an_error_if_you_dont_have_access_to_form.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: https://www.formstack.com/api/v2/form/ 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: 10 | Authorization: 11 | - Bearer 12 | response: 13 | status: 14 | code: 200 15 | message: OK 16 | headers: 17 | Server: 18 | - nginx 19 | Date: 20 | - Wed, 05 Nov 2014 15:13:30 GMT 21 | Content-Type: 22 | - application/json 23 | Content-Length: 24 | - '83' 25 | Connection: 26 | - keep-alive 27 | P3p: 28 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 29 | DSP COR" 30 | Set-Cookie: 31 | - FormstackAdmin=80r1kkq15gg4pnlce847rk3o83; path=/api/; secure; HttpOnly 32 | Cache-Control: 33 | - no-cache 34 | body: 35 | encoding: UTF-8 36 | string: '{"status":"error","error":"You do not have high enough permissions 37 | for this form."}' 38 | http_version: 39 | recorded_at: Wed, 05 Nov 2014 15:13:30 GMT 40 | recorded_with: VCR 2.9.3 41 | -------------------------------------------------------------------------------- /spec/vcr/Formstack_API/_form_fields/retrieves_all_the_fields_from_a_form.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: https://www.formstack.com/api/v2/form//field.json 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: 10 | Authorization: 11 | - Bearer 12 | response: 13 | status: 14 | code: 200 15 | message: OK 16 | headers: 17 | Server: 18 | - nginx 19 | Date: 20 | - Mon, 24 Nov 2014 13:17:26 GMT 21 | Content-Type: 22 | - application/json; charset=UTF-8 23 | Content-Length: 24 | - '234' 25 | Connection: 26 | - keep-alive 27 | P3p: 28 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 29 | DSP COR" 30 | Set-Cookie: 31 | - FormstackAdmin=4ln4vl6k68mk99a528o61400t4; path=/api/; secure; HttpOnly 32 | Cache-Control: 33 | - no-cache 34 | X-Robots-Tag: 35 | - noindex, nofollow 36 | body: 37 | encoding: UTF-8 38 | string: '[{"id":"28906371","label":"Short Answer","hide_label":"0","description":null,"name":"short_answer","type":"text","options":"","default":"","required":"0","uniq":"0","hidden":"0","readonly":"0","colspan":"1","sort":"0","text_size":50}]' 39 | http_version: 40 | recorded_at: Mon, 24 Nov 2014 13:17:25 GMT 41 | recorded_with: VCR 2.9.3 42 | -------------------------------------------------------------------------------- /spec/vcr/Formstack_API/_create_field/creates_a_field_with_embeded_code.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: https://www.formstack.com/api/v2/form//field 6 | body: 7 | encoding: UTF-8 8 | string: field_type=embed 9 | headers: 10 | Authorization: 11 | - Bearer 12 | response: 13 | status: 14 | code: 200 15 | message: OK 16 | headers: 17 | Server: 18 | - nginx 19 | Date: 20 | - Fri, 14 Nov 2014 14:18:21 GMT 21 | Content-Type: 22 | - application/json 23 | Content-Length: 24 | - '214' 25 | Connection: 26 | - keep-alive 27 | P3p: 28 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 29 | DSP COR" 30 | Set-Cookie: 31 | - FormstackAdmin=vetdqcahfosv78v5lluuie0lg4; path=/api/; secure; HttpOnly 32 | Location: 33 | - https://www.formstack.com/api/v2/form//field/28731004.json 34 | Cache-Control: 35 | - no-cache 36 | X-Robots-Tag: 37 | - noindex, nofollow 38 | body: 39 | encoding: UTF-8 40 | string: '{"id":"28731004","label":"","hide_label":"0","description":null,"name":"","type":"embed","options":"","default":"","required":"0","uniq":"0","hidden":"0","readonly":"0","colspan":"1","sort":"14","section_text":"a"}' 41 | http_version: 42 | recorded_at: Fri, 14 Nov 2014 14:18:20 GMT 43 | recorded_with: VCR 2.9.3 44 | -------------------------------------------------------------------------------- /spec/vcr/Formstack_API/_create_field/creates_a_text_field.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: https://www.formstack.com/api/v2/form//field 6 | body: 7 | encoding: UTF-8 8 | string: field_type=text&label=Test%20Field%202014-11-14%2015%3A18%3A19%20%2B0100 9 | headers: 10 | Authorization: 11 | - Bearer 12 | response: 13 | status: 14 | code: 200 15 | message: OK 16 | headers: 17 | Server: 18 | - nginx 19 | Date: 20 | - Fri, 14 Nov 2014 14:18:20 GMT 21 | Content-Type: 22 | - application/json 23 | Content-Length: 24 | - '277' 25 | Connection: 26 | - keep-alive 27 | P3p: 28 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 29 | DSP COR" 30 | Set-Cookie: 31 | - FormstackAdmin=qken3fl9lj64pkqcu7t7dv8513; path=/api/; secure; HttpOnly 32 | Location: 33 | - https://www.formstack.com/api/v2/form//field/28731003.json 34 | Cache-Control: 35 | - no-cache 36 | X-Robots-Tag: 37 | - noindex, nofollow 38 | body: 39 | encoding: UTF-8 40 | string: '{"id":"28731003","label":"Test Field 2014-11-14 15:18:19 +0100","hide_label":"0","description":null,"name":"test_field_20141114_151819_0100","type":"text","options":"","default":"","required":"0","uniq":"0","hidden":"0","readonly":"0","colspan":"1","sort":"13","text_size":"a"}' 41 | http_version: 42 | recorded_at: Fri, 14 Nov 2014 14:18:19 GMT 43 | recorded_with: VCR 2.9.3 44 | -------------------------------------------------------------------------------- /spec/vcr/Formstack_API/_get_submission_details/gets_the_right_submission_from_the_right_form.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: https://www.formstack.com/api/v2/submission/.json 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: 10 | Authorization: 11 | - Bearer 12 | response: 13 | status: 14 | code: 200 15 | message: OK 16 | headers: 17 | Server: 18 | - nginx 19 | Date: 20 | - Fri, 14 Nov 2014 10:33:04 GMT 21 | Content-Type: 22 | - application/json 23 | Content-Length: 24 | - '385' 25 | Connection: 26 | - keep-alive 27 | P3p: 28 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 29 | DSP COR" 30 | Set-Cookie: 31 | - FormstackAdmin=mbgis5r0lu9olmkb2e51p8t7a1; path=/api/; secure; HttpOnly 32 | Cache-Control: 33 | - no-cache 34 | X-Robots-Tag: 35 | - noindex, nofollow 36 | body: 37 | encoding: UTF-8 38 | string: '{"id":"","timestamp":"2014-11-14 08:56:33","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","form":"","latitude":null,"longitude":null,"data":[{"field":"28705506","value":"short-answer-test"},{"field":"28706107","value":"first 39 | = first-test\nlast = last-test\n"},{"field":"28706112","value":"this is a 40 | long answer field"}],"pretty_field_id":"28706107"}' 41 | http_version: 42 | recorded_at: Fri, 14 Nov 2014 10:33:03 GMT 43 | recorded_with: VCR 2.9.3 44 | -------------------------------------------------------------------------------- /formstack-api.gemspec: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | lib = File.expand_path('../lib', __FILE__) 3 | $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) 4 | require 'formstack/api/version' 5 | 6 | Gem::Specification.new do |spec| 7 | spec.name = "formstack-api" 8 | spec.version = Formstack::Api::VERSION 9 | spec.authors = ["Mauro Morales"] 10 | spec.email = ["contact@mauromorales.com"] 11 | spec.summary = %q{Formstack API V2 Ruby Wrapper.} 12 | spec.description = %q{Ruby Formstack API V2 Ruby Wrapper based on https://github.com/formstack/formstack-api/tree/master/php.} 13 | spec.homepage = "https://github.com/LAS-IT/formstack-api" 14 | spec.license = "MIT" 15 | 16 | spec.files = `git ls-files -z`.split("\x0") 17 | spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } 18 | spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) 19 | spec.require_paths = ["lib"] 20 | 21 | spec.add_dependency 'httparty', '~> 0.15' 22 | 23 | spec.add_development_dependency 'bundler', '~> 2.0' 24 | # spec.add_development_dependency 'bundler', '~> 1.16' 25 | spec.add_development_dependency 'rake', '~> 13.0' 26 | # spec.add_development_dependency 'rake', '~> 12.3' 27 | spec.add_development_dependency 'rspec', '~> 3.9' 28 | # spec.add_development_dependency 'rspec', '~> 3.7' 29 | spec.add_development_dependency 'guard', '~> 2.16' 30 | # spec.add_development_dependency 'guard', '~> 2.14' 31 | spec.add_development_dependency 'guard-rspec', '~> 4.7' 32 | spec.add_development_dependency 'vcr', '~> 5.1' 33 | # spec.add_development_dependency 'vcr', '~> 4.0' 34 | spec.add_development_dependency 'webmock', '~> 3.8' 35 | # spec.add_development_dependency 'webmock', '~> 3.2' 36 | end 37 | -------------------------------------------------------------------------------- /spec/support/vcr.rb: -------------------------------------------------------------------------------- 1 | require 'vcr' 2 | require 'rspec' 3 | 4 | ACCESS_TOKEN = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' 5 | FORM_ID = 0000000 6 | INACCESSIBLE_FORM_ID = 0000001 7 | DELETE_SUBMISSION_FORM = 0000000 8 | UPLOAD_FORM_ID = 0000000 9 | UPLOAD_FIELD_IDS = 00000000 10 | LOGO_PATH = File.join(File.dirname(__FILE__), '../fs-logo.png') 11 | SUBMIT_FORM_ID = DELETE_SUBMISSION_FORM 12 | CREATE_FIELD_FORM_ID = DELETE_SUBMISSION_FORM 13 | SUBMISSION_DETAILS_ID = 000000000 14 | SUBMISSION_DETAILS_FORM_ID = 0000000 15 | EDIT_SUBMISSION_FIELD_ID = 00000000 16 | EDIT_SUBMISSION_ARRAY_FIELD_ID = 00000000 17 | FORM_FIELDS_ID = 0000000 18 | 19 | VCR.configure do |c| 20 | c.cassette_library_dir = 'spec/vcr' 21 | c.hook_into :webmock # or :fakeweb 22 | c.filter_sensitive_data('') { ACCESS_TOKEN } 23 | c.filter_sensitive_data('') { SUBMIT_FORM_ID } 24 | c.filter_sensitive_data('') { FORM_FIELDS_ID } 25 | c.filter_sensitive_data('') { INACCESSIBLE_FORM_ID } 26 | c.filter_sensitive_data('') { SUBMISSION_DETAILS_ID } 27 | c.filter_sensitive_data('') { UPLOAD_FORM_ID } 28 | c.filter_sensitive_data('') { UPLOAD_FIELD_IDS } 29 | c.filter_sensitive_data('') { LOGO_PATH } 30 | c.filter_sensitive_data('') { SUBMISSION_DETAILS_FORM_ID } 31 | c.filter_sensitive_data('') { DELETE_SUBMISSION_FORM } 32 | c.filter_sensitive_data('') { EDIT_SUBMISSION_FIELD_ID } 33 | c.filter_sensitive_data('') { EDIT_SUBMISSION_ARRAY_FIELD_ID } 34 | c.default_cassette_options = { record: :new_episodes } 35 | c.configure_rspec_metadata! 36 | end 37 | -------------------------------------------------------------------------------- /spec/vcr/Formstack_API/_submit_form/creates_a_submission_into_a_form.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: https://www.formstack.com/api/v2/form//submission.json 6 | body: 7 | encoding: UTF-8 8 | string: read=0&field_28705506=short-answer-test&field_28706107[first]=first-test&field_28706107[last]=last-test&field_28706112=this%20is%20a%20long%20answer%20field 9 | headers: 10 | Authorization: 11 | - Bearer 12 | response: 13 | status: 14 | code: 200 15 | message: OK 16 | headers: 17 | Server: 18 | - nginx 19 | Date: 20 | - Fri, 14 Nov 2014 09:51:14 GMT 21 | Content-Type: 22 | - application/json 23 | Content-Length: 24 | - '442' 25 | Connection: 26 | - keep-alive 27 | P3p: 28 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 29 | DSP COR" 30 | Set-Cookie: 31 | - FormstackAdmin=tnl1ed1ttf34nrfeggemndrq64; path=/api/; secure; HttpOnly 32 | Location: 33 | - https://www.formstack.com/api/v2/form//submission/171943139.json 34 | Cache-Control: 35 | - no-cache 36 | X-Robots-Tag: 37 | - noindex, nofollow 38 | body: 39 | encoding: UTF-8 40 | string: '{"id":"171943139","message":"

The form was submitted successfully.<\/p>","timestamp":"2014-11-14 41 | 10:51:14","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","form":"","latitude":null,"longitude":null,"data":[{"field":"28705506","value":"short-answer-test"},{"field":"28706107","value":"first 42 | = first-test\nlast = last-test\n"},{"field":"28706112","value":"this is a 43 | long answer field"}],"pretty_field_id":"28706107"}' 44 | http_version: 45 | recorded_at: Fri, 14 Nov 2014 09:51:14 GMT 46 | recorded_with: VCR 2.9.3 47 | -------------------------------------------------------------------------------- /Guardfile: -------------------------------------------------------------------------------- 1 | # A sample Guardfile 2 | # More info at https://github.com/guard/guard#readme 3 | 4 | # Note: The cmd option is now required due to the increasing number of ways 5 | # rspec may be run, below are examples of the most common uses. 6 | # * bundler: 'bundle exec rspec' 7 | # * bundler binstubs: 'bin/rspec' 8 | # * spring: 'bin/rsspec' (This will use spring if running and you have 9 | # installed the spring binstubs per the docs) 10 | # * zeus: 'zeus rspec' (requires the server to be started separetly) 11 | # * 'just' rspec: 'rspec' 12 | guard :rspec, cmd: 'bundle exec rspec' do 13 | watch(%r{^spec/.+_spec\.rb$}) 14 | watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } 15 | watch('spec/spec_helper.rb') { "spec" } 16 | 17 | # Rails example 18 | watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } 19 | watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" } 20 | watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] } 21 | watch(%r{^spec/support/(.+)\.rb$}) { "spec" } 22 | watch('config/routes.rb') { "spec/routing" } 23 | watch('app/controllers/application_controller.rb') { "spec/controllers" } 24 | watch('spec/rails_helper.rb') { "spec" } 25 | 26 | # Capybara features specs 27 | watch(%r{^app/views/(.+)/.*\.(erb|haml|slim)$}) { |m| "spec/features/#{m[1]}_spec.rb" } 28 | 29 | # Turnip features and steps 30 | watch(%r{^spec/acceptance/(.+)\.feature$}) 31 | watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' } 32 | end 33 | 34 | notification :tmux, 35 | display_message: true, 36 | timeout: 5, # in seconds 37 | default_message_format: '%s >> %s', 38 | # the first %s will show the title, the second the message 39 | # Alternately you can also configure *success_message_format*, 40 | # *pending_message_format*, *failed_message_format* 41 | line_separator: ' > ', # since we are single line we need a separator 42 | color_location: 'status-left-bg' # to customize which tmux el 43 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | PATH 2 | remote: . 3 | specs: 4 | formstack-api (0.0.8) 5 | httparty (~> 0.15) 6 | 7 | GEM 8 | remote: https://rubygems.org/ 9 | specs: 10 | addressable (2.7.0) 11 | public_suffix (>= 2.0.2, < 5.0) 12 | coderay (1.1.2) 13 | crack (0.4.3) 14 | safe_yaml (~> 1.0.0) 15 | diff-lcs (1.3) 16 | ffi (1.12.2) 17 | formatador (0.2.5) 18 | guard (2.16.1) 19 | formatador (>= 0.2.4) 20 | listen (>= 2.7, < 4.0) 21 | lumberjack (>= 1.0.12, < 2.0) 22 | nenv (~> 0.1) 23 | notiffany (~> 0.0) 24 | pry (>= 0.9.12) 25 | shellany (~> 0.0) 26 | thor (>= 0.18.1) 27 | guard-compat (1.2.1) 28 | guard-rspec (4.7.3) 29 | guard (~> 2.1) 30 | guard-compat (~> 1.1) 31 | rspec (>= 2.99.0, < 4.0) 32 | hashdiff (1.0.1) 33 | httparty (0.18.0) 34 | mime-types (~> 3.0) 35 | multi_xml (>= 0.5.2) 36 | listen (3.2.1) 37 | rb-fsevent (~> 0.10, >= 0.10.3) 38 | rb-inotify (~> 0.9, >= 0.9.10) 39 | lumberjack (1.2.4) 40 | method_source (0.9.2) 41 | mime-types (3.3.1) 42 | mime-types-data (~> 3.2015) 43 | mime-types-data (3.2019.1009) 44 | multi_xml (0.6.0) 45 | nenv (0.3.0) 46 | notiffany (0.1.3) 47 | nenv (~> 0.1) 48 | shellany (~> 0.0) 49 | pry (0.12.2) 50 | coderay (~> 1.1.0) 51 | method_source (~> 0.9.0) 52 | public_suffix (4.0.3) 53 | rake (13.0.1) 54 | rb-fsevent (0.10.3) 55 | rb-inotify (0.10.1) 56 | ffi (~> 1.0) 57 | rspec (3.9.0) 58 | rspec-core (~> 3.9.0) 59 | rspec-expectations (~> 3.9.0) 60 | rspec-mocks (~> 3.9.0) 61 | rspec-core (3.9.1) 62 | rspec-support (~> 3.9.1) 63 | rspec-expectations (3.9.0) 64 | diff-lcs (>= 1.2.0, < 2.0) 65 | rspec-support (~> 3.9.0) 66 | rspec-mocks (3.9.1) 67 | diff-lcs (>= 1.2.0, < 2.0) 68 | rspec-support (~> 3.9.0) 69 | rspec-support (3.9.2) 70 | safe_yaml (1.0.5) 71 | shellany (0.0.1) 72 | thor (1.0.1) 73 | vcr (5.1.0) 74 | webmock (3.8.2) 75 | addressable (>= 2.3.6) 76 | crack (>= 0.3.2) 77 | hashdiff (>= 0.4.0, < 2.0.0) 78 | 79 | PLATFORMS 80 | ruby 81 | 82 | DEPENDENCIES 83 | bundler (~> 2.0) 84 | formstack-api! 85 | guard (~> 2.16) 86 | guard-rspec (~> 4.7) 87 | rake (~> 13.0) 88 | rspec (~> 3.9) 89 | vcr (~> 5.1) 90 | webmock (~> 3.8) 91 | 92 | BUNDLED WITH 93 | 2.0.2 94 | -------------------------------------------------------------------------------- /spec/vcr/Formstack_API/_form_submissions/raises_an_error_if_page_number_is_not_working.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: https://www.formstack.com/api/v2/form//submission.json 6 | body: 7 | encoding: UTF-8 8 | string: page=1&per_page=1&sort=DESC 9 | headers: 10 | Authorization: 11 | - Bearer 12 | response: 13 | status: 14 | code: 200 15 | message: OK 16 | headers: 17 | Server: 18 | - nginx 19 | Date: 20 | - Mon, 17 Nov 2014 09:42:17 GMT 21 | Content-Type: 22 | - application/json 23 | Content-Length: 24 | - '246' 25 | Connection: 26 | - keep-alive 27 | P3p: 28 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 29 | DSP COR" 30 | Set-Cookie: 31 | - FormstackAdmin=iii6d3dvi95unqghf4pfek1on0; path=/api/; secure; HttpOnly 32 | Cache-Control: 33 | - no-cache 34 | X-Robots-Tag: 35 | - noindex, nofollow 36 | body: 37 | encoding: UTF-8 38 | string: '{"submissions":[{"id":"172234315","timestamp":"2014-11-17 09:14:34","user_agent":"curl\/7.37.1","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"}],"total":"79","pages":79,"pretty_field_id":"28706107"}' 39 | http_version: 40 | recorded_at: Mon, 17 Nov 2014 09:42:16 GMT 41 | - request: 42 | method: get 43 | uri: https://www.formstack.com/api/v2/form//submission.json 44 | body: 45 | encoding: UTF-8 46 | string: page=2&per_page=1&sort=DESC 47 | headers: 48 | Authorization: 49 | - Bearer 50 | response: 51 | status: 52 | code: 200 53 | message: OK 54 | headers: 55 | Server: 56 | - nginx 57 | Date: 58 | - Mon, 17 Nov 2014 09:42:17 GMT 59 | Content-Type: 60 | - application/json 61 | Content-Length: 62 | - '246' 63 | Connection: 64 | - keep-alive 65 | P3p: 66 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 67 | DSP COR" 68 | Set-Cookie: 69 | - FormstackAdmin=0iv2gmuvjemmfr50a62spdtqn3; path=/api/; secure; HttpOnly 70 | Cache-Control: 71 | - no-cache 72 | X-Robots-Tag: 73 | - noindex, nofollow 74 | body: 75 | encoding: UTF-8 76 | string: '{"submissions":[{"id":"172234312","timestamp":"2014-11-17 09:14:27","user_agent":"curl\/7.37.1","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"}],"total":"79","pages":79,"pretty_field_id":"28706107"}' 77 | http_version: 78 | recorded_at: Mon, 17 Nov 2014 09:42:17 GMT 79 | recorded_with: VCR 2.9.3 80 | -------------------------------------------------------------------------------- /spec/vcr/Formstack_API/_forms/gets_folders_when_asked.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: https://www.formstack.com/api/v2/form.json?folders=1 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: 10 | Authorization: 11 | - Bearer 12 | response: 13 | status: 14 | code: 200 15 | message: OK 16 | headers: 17 | Server: 18 | - nginx 19 | Date: 20 | - Wed, 05 Nov 2014 15:13:28 GMT 21 | Content-Type: 22 | - application/json 23 | Content-Length: 24 | - '3600' 25 | Connection: 26 | - keep-alive 27 | P3p: 28 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 29 | DSP COR" 30 | Set-Cookie: 31 | - FormstackAdmin=mcshn9sthp8p5uund424ar99m7; path=/api/; secure; HttpOnly 32 | Cache-Control: 33 | - no-cache 34 | body: 35 | encoding: UTF-8 36 | string: '{"forms":{"none":[{"id":"","name":"Test Form","viewkey":"ex3qBur1AS","views":"4","created":"2014-09-17 37 | 19:44:47","updated":"2014-11-05 09:37:02","deleted":"0","submissions":"0","submissions_unread":"0","submissions_today":0,"url":"http:\/\/www.formstack.com\/forms\/?-ex3qBur1AS","data_url":"","summary_url":"","rss_url":"","encrypted":false,"thumbnail_url":"https:\/\/s3.amazonaws.com\/files.formstack.com\/admin\/","submit_button_title":null,"inactive":false,"timezone":"US\/Eastern","permissions":"full"},{"id":"1867858","name":"Test 38 | Form - COPY","viewkey":"ex3qBur1AS","views":"0","created":"2014-11-05 15:38:45","updated":"2014-11-05 39 | 09:55:04","deleted":"0","submissions":"0","submissions_unread":"0","submissions_today":0,"url":"http:\/\/www.formstack.com\/forms\/?1867858-ex3qBur1AS","data_url":"","summary_url":"","rss_url":"","encrypted":false,"thumbnail_url":"https:\/\/s3.amazonaws.com\/files.formstack.com\/admin\/","submit_button_title":null,"inactive":false,"timezone":"US\/Eastern","permissions":"full"},{"id":"1867867","name":"Test 40 | Form - COPY 2","viewkey":"ex3qBur1AS","views":"0","created":"2014-11-05 15:58:27","updated":"2014-11-05 41 | 09:58:27","deleted":"0","submissions":"0","submissions_unread":"0","submissions_today":0,"url":"http:\/\/www.formstack.com\/forms\/?1867867-ex3qBur1AS","data_url":"","summary_url":"","rss_url":"","encrypted":false,"thumbnail_url":"https:\/\/s3.amazonaws.com\/files.formstack.com\/admin\/","submit_button_title":null,"inactive":false,"timezone":"US\/Eastern","permissions":"full"},{"id":"1867869","name":"Test 42 | Form - COPY 3","viewkey":"ex3qBur1AS","views":"0","created":"2014-11-05 16:00:16","updated":"2014-11-05 43 | 10:00:16","deleted":"0","submissions":"0","submissions_unread":"0","submissions_today":0,"url":"http:\/\/www.formstack.com\/forms\/?1867869-ex3qBur1AS","data_url":"","summary_url":"","rss_url":"","encrypted":false,"thumbnail_url":"https:\/\/s3.amazonaws.com\/files.formstack.com\/admin\/","submit_button_title":null,"inactive":false,"timezone":"US\/Eastern","permissions":"full"},{"id":"1867872","name":"Test 44 | Form - COPY 4","viewkey":"ex3qBur1AS","views":"0","created":"2014-11-05 16:01:47","updated":"2014-11-05 45 | 10:01:47","deleted":"0","submissions":"0","submissions_unread":"0","submissions_today":0,"url":"http:\/\/www.formstack.com\/forms\/?1867872-ex3qBur1AS","data_url":"","summary_url":"","rss_url":"","encrypted":false,"thumbnail_url":"https:\/\/s3.amazonaws.com\/files.formstack.com\/admin\/","submit_button_title":null,"inactive":false,"timezone":"US\/Eastern","permissions":"full"},{"id":"1867873","name":"Test 46 | Form - COPY 5","viewkey":"ex3qBur1AS","views":"0","created":"2014-11-05 16:03:03","updated":"2014-11-05 47 | 10:03:03","deleted":"0","submissions":"0","submissions_unread":"0","submissions_today":0,"url":"http:\/\/www.formstack.com\/forms\/?1867873-ex3qBur1AS","data_url":"","summary_url":"","rss_url":"","encrypted":false,"thumbnail_url":"https:\/\/s3.amazonaws.com\/files.formstack.com\/admin\/","submit_button_title":null,"inactive":false,"timezone":"US\/Eastern","permissions":"full"},{"id":"1867884","name":"Test 48 | Form - COPY 6","viewkey":"ex3qBur1AS","views":"0","created":"2014-11-05 16:10:09","updated":"2014-11-05 49 | 10:10:09","deleted":"0","submissions":"0","submissions_unread":"0","submissions_today":0,"url":"http:\/\/www.formstack.com\/forms\/?1867884-ex3qBur1AS","data_url":"","summary_url":"","rss_url":"","encrypted":false,"thumbnail_url":"https:\/\/s3.amazonaws.com\/files.formstack.com\/admin\/","submit_button_title":null,"inactive":false,"timezone":"US\/Eastern","permissions":"full"}]}}' 50 | http_version: 51 | recorded_at: Wed, 05 Nov 2014 15:13:28 GMT 52 | recorded_with: VCR 2.9.3 53 | -------------------------------------------------------------------------------- /spec/vcr/Formstack_API/_forms/responds_with_no_folders_by_default.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: https://www.formstack.com/api/v2/form.json?folders=0 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: 10 | Authorization: 11 | - Bearer 12 | response: 13 | status: 14 | code: 200 15 | message: OK 16 | headers: 17 | Server: 18 | - nginx 19 | Date: 20 | - Wed, 05 Nov 2014 15:13:28 GMT 21 | Content-Type: 22 | - application/json 23 | Content-Length: 24 | - '3591' 25 | Connection: 26 | - keep-alive 27 | P3p: 28 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 29 | DSP COR" 30 | Set-Cookie: 31 | - FormstackAdmin=5p2bifivcmja3qi69mi7ei7j24; path=/api/; secure; HttpOnly 32 | Cache-Control: 33 | - no-cache 34 | body: 35 | encoding: UTF-8 36 | string: '{"forms":[{"id":"","name":"Test Form","viewkey":"ex3qBur1AS","views":"4","created":"2014-09-17 37 | 19:44:47","updated":"2014-11-05 09:37:02","deleted":"0","submissions":"0","submissions_unread":"0","submissions_today":0,"url":"http:\/\/www.formstack.com\/forms\/?-ex3qBur1AS","data_url":"","summary_url":"","rss_url":"","encrypted":false,"thumbnail_url":"https:\/\/s3.amazonaws.com\/files.formstack.com\/admin\/","submit_button_title":null,"inactive":false,"timezone":"US\/Eastern","permissions":"full"},{"id":"1867858","name":"Test 38 | Form - COPY","viewkey":"ex3qBur1AS","views":"0","created":"2014-11-05 15:38:45","updated":"2014-11-05 39 | 09:55:04","deleted":"0","submissions":"0","submissions_unread":"0","submissions_today":0,"url":"http:\/\/www.formstack.com\/forms\/?1867858-ex3qBur1AS","data_url":"","summary_url":"","rss_url":"","encrypted":false,"thumbnail_url":"https:\/\/s3.amazonaws.com\/files.formstack.com\/admin\/","submit_button_title":null,"inactive":false,"timezone":"US\/Eastern","permissions":"full"},{"id":"1867867","name":"Test 40 | Form - COPY 2","viewkey":"ex3qBur1AS","views":"0","created":"2014-11-05 15:58:27","updated":"2014-11-05 41 | 09:58:27","deleted":"0","submissions":"0","submissions_unread":"0","submissions_today":0,"url":"http:\/\/www.formstack.com\/forms\/?1867867-ex3qBur1AS","data_url":"","summary_url":"","rss_url":"","encrypted":false,"thumbnail_url":"https:\/\/s3.amazonaws.com\/files.formstack.com\/admin\/","submit_button_title":null,"inactive":false,"timezone":"US\/Eastern","permissions":"full"},{"id":"1867869","name":"Test 42 | Form - COPY 3","viewkey":"ex3qBur1AS","views":"0","created":"2014-11-05 16:00:16","updated":"2014-11-05 43 | 10:00:16","deleted":"0","submissions":"0","submissions_unread":"0","submissions_today":0,"url":"http:\/\/www.formstack.com\/forms\/?1867869-ex3qBur1AS","data_url":"","summary_url":"","rss_url":"","encrypted":false,"thumbnail_url":"https:\/\/s3.amazonaws.com\/files.formstack.com\/admin\/","submit_button_title":null,"inactive":false,"timezone":"US\/Eastern","permissions":"full"},{"id":"1867872","name":"Test 44 | Form - COPY 4","viewkey":"ex3qBur1AS","views":"0","created":"2014-11-05 16:01:47","updated":"2014-11-05 45 | 10:01:47","deleted":"0","submissions":"0","submissions_unread":"0","submissions_today":0,"url":"http:\/\/www.formstack.com\/forms\/?1867872-ex3qBur1AS","data_url":"","summary_url":"","rss_url":"","encrypted":false,"thumbnail_url":"https:\/\/s3.amazonaws.com\/files.formstack.com\/admin\/","submit_button_title":null,"inactive":false,"timezone":"US\/Eastern","permissions":"full"},{"id":"1867873","name":"Test 46 | Form - COPY 5","viewkey":"ex3qBur1AS","views":"0","created":"2014-11-05 16:03:03","updated":"2014-11-05 47 | 10:03:03","deleted":"0","submissions":"0","submissions_unread":"0","submissions_today":0,"url":"http:\/\/www.formstack.com\/forms\/?1867873-ex3qBur1AS","data_url":"","summary_url":"","rss_url":"","encrypted":false,"thumbnail_url":"https:\/\/s3.amazonaws.com\/files.formstack.com\/admin\/","submit_button_title":null,"inactive":false,"timezone":"US\/Eastern","permissions":"full"},{"id":"1867884","name":"Test 48 | Form - COPY 6","viewkey":"ex3qBur1AS","views":"0","created":"2014-11-05 16:10:09","updated":"2014-11-05 49 | 10:10:09","deleted":"0","submissions":"0","submissions_unread":"0","submissions_today":0,"url":"http:\/\/www.formstack.com\/forms\/?1867884-ex3qBur1AS","data_url":"","summary_url":"","rss_url":"","encrypted":false,"thumbnail_url":"https:\/\/s3.amazonaws.com\/files.formstack.com\/admin\/","submit_button_title":null,"inactive":false,"timezone":"US\/Eastern","permissions":"full"}]}' 50 | http_version: 51 | recorded_at: Wed, 05 Nov 2014 15:13:27 GMT 52 | recorded_with: VCR 2.9.3 53 | -------------------------------------------------------------------------------- /spec/vcr/Formstack_API/_form_submissions/returns_no_data_by_default.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: https://www.formstack.com/api/v2/form//submission.json 6 | body: 7 | encoding: UTF-8 8 | string: page=1&per_page=25&sort=DESC 9 | headers: 10 | Authorization: 11 | - Bearer 12 | response: 13 | status: 14 | code: 200 15 | message: OK 16 | headers: 17 | Server: 18 | - nginx 19 | Date: 20 | - Fri, 14 Nov 2014 15:12:38 GMT 21 | Content-Type: 22 | - application/json 23 | Content-Length: 24 | - '4169' 25 | Connection: 26 | - keep-alive 27 | P3p: 28 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 29 | DSP COR" 30 | Set-Cookie: 31 | - FormstackAdmin=0jqf2nqcdib3o0cl2kqfnfdqa2; path=/api/; secure; HttpOnly 32 | Cache-Control: 33 | - no-cache 34 | X-Robots-Tag: 35 | - noindex, nofollow 36 | body: 37 | encoding: UTF-8 38 | string: '{"submissions":[{"id":"171943139","timestamp":"2014-11-14 10:51:14","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171943131","timestamp":"2014-11-14 39 | 10:51:03","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171943088","timestamp":"2014-11-14 40 | 10:50:03","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171943075","timestamp":"2014-11-14 41 | 10:49:50","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"","timestamp":"2014-11-14 42 | 08:56:33","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171836337","timestamp":"2014-11-13 43 | 16:06:12","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171835825","timestamp":"2014-11-13 44 | 16:02:35","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171835746","timestamp":"2014-11-13 45 | 16:02:02","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171835284","timestamp":"2014-11-13 46 | 15:58:42","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171834791","timestamp":"2014-11-13 47 | 15:54:53","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171833957","timestamp":"2014-11-13 48 | 15:49:19","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171833937","timestamp":"2014-11-13 49 | 15:49:06","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171833903","timestamp":"2014-11-13 50 | 15:48:50","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171833858","timestamp":"2014-11-13 51 | 15:48:30","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171833785","timestamp":"2014-11-13 52 | 15:48:01","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171833715","timestamp":"2014-11-13 53 | 15:47:25","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171833676","timestamp":"2014-11-13 54 | 15:47:08","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171833650","timestamp":"2014-11-13 55 | 15:46:57","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171833601","timestamp":"2014-11-13 56 | 15:46:32","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171833560","timestamp":"2014-11-13 57 | 15:46:13","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171833521","timestamp":"2014-11-13 58 | 15:45:57","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171832897","timestamp":"2014-11-13 59 | 15:41:01","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171832869","timestamp":"2014-11-13 60 | 15:40:49","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171832827","timestamp":"2014-11-13 61 | 15:40:31","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171832788","timestamp":"2014-11-13 62 | 15:40:15","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"}],"total":"75","pages":3,"pretty_field_id":"28706107"}' 63 | http_version: 64 | recorded_at: Fri, 14 Nov 2014 15:12:37 GMT 65 | recorded_with: VCR 2.9.3 66 | -------------------------------------------------------------------------------- /spec/vcr/Formstack_API/_edit_submission_data/raises_an_exception_with_a_bad_timestamp.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: https://www.formstack.com/api/v2/form//submission.json 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: 10 | Authorization: 11 | - Bearer 12 | response: 13 | status: 14 | code: 200 15 | message: OK 16 | headers: 17 | Server: 18 | - nginx 19 | Date: 20 | - Fri, 14 Nov 2014 13:43:32 GMT 21 | Content-Type: 22 | - application/json 23 | Content-Length: 24 | - '4293' 25 | Connection: 26 | - keep-alive 27 | P3p: 28 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 29 | DSP COR" 30 | Set-Cookie: 31 | - FormstackAdmin=rovfuid2a5srnjr0c8ko7bn045; path=/api/; secure; HttpOnly 32 | Cache-Control: 33 | - no-cache 34 | X-Robots-Tag: 35 | - noindex, nofollow 36 | body: 37 | encoding: UTF-8 38 | string: '{"submissions":[{"id":"171821388","timestamp":"2014-11-13 13:44:07","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171821406","timestamp":"2014-11-13 39 | 13:44:21","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171822918","timestamp":"2014-11-13 40 | 14:05:06","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171823092","timestamp":"2014-11-13 41 | 14:07:17","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171823107","timestamp":"2014-11-13 42 | 14:07:28","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171823163","timestamp":"2014-11-13 43 | 14:08:11","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824009","timestamp":"2014-11-13 44 | 14:18:50","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824066","timestamp":"2014-11-13 45 | 14:19:28","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824379","timestamp":"2014-11-13 46 | 14:23:00","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824395","timestamp":"2014-11-13 47 | 14:23:09","user_agent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit\/537.36 48 | (KHTML, like Gecko) Chrome\/38.0.2125.111 Safari\/537.36","remote_addr":"89.202.154.170","payment_status":"","latitude":"47","longitude":"8","read":"1"},{"id":"171824436","timestamp":"2014-11-13 49 | 14:23:43","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824500","timestamp":"2014-11-13 50 | 14:24:34","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824576","timestamp":"2014-11-13 51 | 14:25:33","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824682","timestamp":"2014-11-13 52 | 14:26:30","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824794","timestamp":"2014-11-13 53 | 14:27:45","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824845","timestamp":"2014-11-13 54 | 14:28:18","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824938","timestamp":"2014-11-13 55 | 14:29:04","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171825201","timestamp":"2014-11-13 56 | 14:32:20","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171825451","timestamp":"2014-11-13 57 | 14:34:48","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826184","timestamp":"2014-11-13 58 | 14:42:23","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826216","timestamp":"2014-11-13 59 | 14:42:44","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826235","timestamp":"2014-11-13 60 | 14:42:56","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826254","timestamp":"2014-11-13 61 | 14:43:09","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826404","timestamp":"2014-11-13 62 | 14:44:43","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826640","timestamp":"2014-11-13 63 | 14:47:27","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"}],"total":"75","pages":3,"pretty_field_id":"28706107"}' 64 | http_version: 65 | recorded_at: Fri, 14 Nov 2014 13:43:31 GMT 66 | recorded_with: VCR 2.9.3 67 | -------------------------------------------------------------------------------- /spec/vcr/Formstack_API/_edit_submission_data/raises_an_exception_if_fields_are_non_numeric.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: https://www.formstack.com/api/v2/form//submission.json 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: 10 | Authorization: 11 | - Bearer 12 | response: 13 | status: 14 | code: 200 15 | message: OK 16 | headers: 17 | Server: 18 | - nginx 19 | Date: 20 | - Fri, 14 Nov 2014 13:43:33 GMT 21 | Content-Type: 22 | - application/json 23 | Content-Length: 24 | - '4293' 25 | Connection: 26 | - keep-alive 27 | P3p: 28 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 29 | DSP COR" 30 | Set-Cookie: 31 | - FormstackAdmin=butofevt5c01d5hgaasvrvdqv0; path=/api/; secure; HttpOnly 32 | Cache-Control: 33 | - no-cache 34 | X-Robots-Tag: 35 | - noindex, nofollow 36 | body: 37 | encoding: UTF-8 38 | string: '{"submissions":[{"id":"171821388","timestamp":"2014-11-13 13:44:07","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171821406","timestamp":"2014-11-13 39 | 13:44:21","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171822918","timestamp":"2014-11-13 40 | 14:05:06","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171823092","timestamp":"2014-11-13 41 | 14:07:17","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171823107","timestamp":"2014-11-13 42 | 14:07:28","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171823163","timestamp":"2014-11-13 43 | 14:08:11","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824009","timestamp":"2014-11-13 44 | 14:18:50","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824066","timestamp":"2014-11-13 45 | 14:19:28","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824379","timestamp":"2014-11-13 46 | 14:23:00","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824395","timestamp":"2014-11-13 47 | 14:23:09","user_agent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit\/537.36 48 | (KHTML, like Gecko) Chrome\/38.0.2125.111 Safari\/537.36","remote_addr":"89.202.154.170","payment_status":"","latitude":"47","longitude":"8","read":"1"},{"id":"171824436","timestamp":"2014-11-13 49 | 14:23:43","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824500","timestamp":"2014-11-13 50 | 14:24:34","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824576","timestamp":"2014-11-13 51 | 14:25:33","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824682","timestamp":"2014-11-13 52 | 14:26:30","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824794","timestamp":"2014-11-13 53 | 14:27:45","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824845","timestamp":"2014-11-13 54 | 14:28:18","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824938","timestamp":"2014-11-13 55 | 14:29:04","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171825201","timestamp":"2014-11-13 56 | 14:32:20","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171825451","timestamp":"2014-11-13 57 | 14:34:48","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826184","timestamp":"2014-11-13 58 | 14:42:23","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826216","timestamp":"2014-11-13 59 | 14:42:44","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826235","timestamp":"2014-11-13 60 | 14:42:56","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826254","timestamp":"2014-11-13 61 | 14:43:09","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826404","timestamp":"2014-11-13 62 | 14:44:43","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826640","timestamp":"2014-11-13 63 | 14:47:27","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"}],"total":"75","pages":3,"pretty_field_id":"28706107"}' 64 | http_version: 65 | recorded_at: Fri, 14 Nov 2014 13:43:33 GMT 66 | recorded_with: VCR 2.9.3 67 | -------------------------------------------------------------------------------- /spec/vcr/Formstack_API/_edit_submission_data/raises_an_exception_when_data_array_and_ids_don_t_match.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: https://www.formstack.com/api/v2/form//submission.json 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: 10 | Authorization: 11 | - Bearer 12 | response: 13 | status: 14 | code: 200 15 | message: OK 16 | headers: 17 | Server: 18 | - nginx 19 | Date: 20 | - Fri, 14 Nov 2014 13:43:32 GMT 21 | Content-Type: 22 | - application/json 23 | Content-Length: 24 | - '4293' 25 | Connection: 26 | - keep-alive 27 | P3p: 28 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 29 | DSP COR" 30 | Set-Cookie: 31 | - FormstackAdmin=qusi5c8l2pl1q15u23v30q8m14; path=/api/; secure; HttpOnly 32 | Cache-Control: 33 | - no-cache 34 | X-Robots-Tag: 35 | - noindex, nofollow 36 | body: 37 | encoding: UTF-8 38 | string: '{"submissions":[{"id":"171821388","timestamp":"2014-11-13 13:44:07","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171821406","timestamp":"2014-11-13 39 | 13:44:21","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171822918","timestamp":"2014-11-13 40 | 14:05:06","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171823092","timestamp":"2014-11-13 41 | 14:07:17","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171823107","timestamp":"2014-11-13 42 | 14:07:28","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171823163","timestamp":"2014-11-13 43 | 14:08:11","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824009","timestamp":"2014-11-13 44 | 14:18:50","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824066","timestamp":"2014-11-13 45 | 14:19:28","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824379","timestamp":"2014-11-13 46 | 14:23:00","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824395","timestamp":"2014-11-13 47 | 14:23:09","user_agent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit\/537.36 48 | (KHTML, like Gecko) Chrome\/38.0.2125.111 Safari\/537.36","remote_addr":"89.202.154.170","payment_status":"","latitude":"47","longitude":"8","read":"1"},{"id":"171824436","timestamp":"2014-11-13 49 | 14:23:43","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824500","timestamp":"2014-11-13 50 | 14:24:34","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824576","timestamp":"2014-11-13 51 | 14:25:33","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824682","timestamp":"2014-11-13 52 | 14:26:30","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824794","timestamp":"2014-11-13 53 | 14:27:45","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824845","timestamp":"2014-11-13 54 | 14:28:18","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824938","timestamp":"2014-11-13 55 | 14:29:04","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171825201","timestamp":"2014-11-13 56 | 14:32:20","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171825451","timestamp":"2014-11-13 57 | 14:34:48","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826184","timestamp":"2014-11-13 58 | 14:42:23","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826216","timestamp":"2014-11-13 59 | 14:42:44","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826235","timestamp":"2014-11-13 60 | 14:42:56","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826254","timestamp":"2014-11-13 61 | 14:43:09","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826404","timestamp":"2014-11-13 62 | 14:44:43","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826640","timestamp":"2014-11-13 63 | 14:47:27","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"}],"total":"75","pages":3,"pretty_field_id":"28706107"}' 64 | http_version: 65 | recorded_at: Fri, 14 Nov 2014 13:43:32 GMT 66 | recorded_with: VCR 2.9.3 67 | -------------------------------------------------------------------------------- /spec/vcr/Formstack_API/_edit_submission_data/raises_an_exception_when_data_array_and_ids_don_t_match_reversed.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: https://www.formstack.com/api/v2/form//submission.json 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: 10 | Authorization: 11 | - Bearer 12 | response: 13 | status: 14 | code: 200 15 | message: OK 16 | headers: 17 | Server: 18 | - nginx 19 | Date: 20 | - Fri, 14 Nov 2014 13:43:33 GMT 21 | Content-Type: 22 | - application/json 23 | Content-Length: 24 | - '4293' 25 | Connection: 26 | - keep-alive 27 | P3p: 28 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 29 | DSP COR" 30 | Set-Cookie: 31 | - FormstackAdmin=lmq7c7iuu3pflu3gl5l808ig47; path=/api/; secure; HttpOnly 32 | Cache-Control: 33 | - no-cache 34 | X-Robots-Tag: 35 | - noindex, nofollow 36 | body: 37 | encoding: UTF-8 38 | string: '{"submissions":[{"id":"171821388","timestamp":"2014-11-13 13:44:07","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171821406","timestamp":"2014-11-13 39 | 13:44:21","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171822918","timestamp":"2014-11-13 40 | 14:05:06","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171823092","timestamp":"2014-11-13 41 | 14:07:17","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171823107","timestamp":"2014-11-13 42 | 14:07:28","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171823163","timestamp":"2014-11-13 43 | 14:08:11","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824009","timestamp":"2014-11-13 44 | 14:18:50","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824066","timestamp":"2014-11-13 45 | 14:19:28","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824379","timestamp":"2014-11-13 46 | 14:23:00","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824395","timestamp":"2014-11-13 47 | 14:23:09","user_agent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit\/537.36 48 | (KHTML, like Gecko) Chrome\/38.0.2125.111 Safari\/537.36","remote_addr":"89.202.154.170","payment_status":"","latitude":"47","longitude":"8","read":"1"},{"id":"171824436","timestamp":"2014-11-13 49 | 14:23:43","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824500","timestamp":"2014-11-13 50 | 14:24:34","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824576","timestamp":"2014-11-13 51 | 14:25:33","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824682","timestamp":"2014-11-13 52 | 14:26:30","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824794","timestamp":"2014-11-13 53 | 14:27:45","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824845","timestamp":"2014-11-13 54 | 14:28:18","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824938","timestamp":"2014-11-13 55 | 14:29:04","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171825201","timestamp":"2014-11-13 56 | 14:32:20","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171825451","timestamp":"2014-11-13 57 | 14:34:48","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826184","timestamp":"2014-11-13 58 | 14:42:23","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826216","timestamp":"2014-11-13 59 | 14:42:44","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826235","timestamp":"2014-11-13 60 | 14:42:56","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826254","timestamp":"2014-11-13 61 | 14:43:09","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826404","timestamp":"2014-11-13 62 | 14:44:43","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826640","timestamp":"2014-11-13 63 | 14:47:27","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"}],"total":"75","pages":3,"pretty_field_id":"28706107"}' 64 | http_version: 65 | recorded_at: Fri, 14 Nov 2014 13:43:32 GMT 66 | recorded_with: VCR 2.9.3 67 | -------------------------------------------------------------------------------- /spec/vcr/Formstack_API/_delete_submission/deletes_a_submission.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: delete 5 | uri: https://www.formstack.com/api/v2/submission/171821341 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: 10 | Authorization: 11 | - Bearer 12 | response: 13 | status: 14 | code: 200 15 | message: OK 16 | headers: 17 | Server: 18 | - nginx 19 | Date: 20 | - Fri, 14 Nov 2014 13:41:56 GMT 21 | Content-Type: 22 | - application/json 23 | Content-Length: 24 | - '32' 25 | Connection: 26 | - keep-alive 27 | P3p: 28 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 29 | DSP COR" 30 | Set-Cookie: 31 | - FormstackAdmin=eqftcqlhq6n906gem17ki3pn02; path=/api/; secure; HttpOnly 32 | Cache-Control: 33 | - no-cache 34 | X-Robots-Tag: 35 | - noindex, nofollow 36 | body: 37 | encoding: UTF-8 38 | string: '{"success":"1","id":"171821341"}' 39 | http_version: 40 | recorded_at: Fri, 14 Nov 2014 13:41:56 GMT 41 | - request: 42 | method: get 43 | uri: https://www.formstack.com/api/v2/form//submission.json 44 | body: 45 | encoding: US-ASCII 46 | string: '' 47 | headers: 48 | Authorization: 49 | - Bearer 50 | response: 51 | status: 52 | code: 200 53 | message: OK 54 | headers: 55 | Server: 56 | - nginx 57 | Date: 58 | - Fri, 14 Nov 2014 13:42:35 GMT 59 | Content-Type: 60 | - application/json 61 | Content-Length: 62 | - '4293' 63 | Connection: 64 | - keep-alive 65 | P3p: 66 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 67 | DSP COR" 68 | Set-Cookie: 69 | - FormstackAdmin=siu478k4v07ijjlhfg9h03r0c1; path=/api/; secure; HttpOnly 70 | Cache-Control: 71 | - no-cache 72 | X-Robots-Tag: 73 | - noindex, nofollow 74 | body: 75 | encoding: UTF-8 76 | string: '{"submissions":[{"id":"171821364","timestamp":"2014-11-13 13:43:44","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171821388","timestamp":"2014-11-13 77 | 13:44:07","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171821406","timestamp":"2014-11-13 78 | 13:44:21","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171822918","timestamp":"2014-11-13 79 | 14:05:06","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171823092","timestamp":"2014-11-13 80 | 14:07:17","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171823107","timestamp":"2014-11-13 81 | 14:07:28","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171823163","timestamp":"2014-11-13 82 | 14:08:11","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824009","timestamp":"2014-11-13 83 | 14:18:50","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824066","timestamp":"2014-11-13 84 | 14:19:28","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824379","timestamp":"2014-11-13 85 | 14:23:00","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824395","timestamp":"2014-11-13 86 | 14:23:09","user_agent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit\/537.36 87 | (KHTML, like Gecko) Chrome\/38.0.2125.111 Safari\/537.36","remote_addr":"89.202.154.170","payment_status":"","latitude":"47","longitude":"8","read":"1"},{"id":"171824436","timestamp":"2014-11-13 88 | 14:23:43","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824500","timestamp":"2014-11-13 89 | 14:24:34","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824576","timestamp":"2014-11-13 90 | 14:25:33","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824682","timestamp":"2014-11-13 91 | 14:26:30","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824794","timestamp":"2014-11-13 92 | 14:27:45","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824845","timestamp":"2014-11-13 93 | 14:28:18","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824938","timestamp":"2014-11-13 94 | 14:29:04","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171825201","timestamp":"2014-11-13 95 | 14:32:20","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171825451","timestamp":"2014-11-13 96 | 14:34:48","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826184","timestamp":"2014-11-13 97 | 14:42:23","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826216","timestamp":"2014-11-13 98 | 14:42:44","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826235","timestamp":"2014-11-13 99 | 14:42:56","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826254","timestamp":"2014-11-13 100 | 14:43:09","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826404","timestamp":"2014-11-13 101 | 14:44:43","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"}],"total":"76","pages":4,"pretty_field_id":"28706107"}' 102 | http_version: 103 | recorded_at: Fri, 14 Nov 2014 13:42:34 GMT 104 | - request: 105 | method: delete 106 | uri: https://www.formstack.com/api/v2/submission/171821364 107 | body: 108 | encoding: US-ASCII 109 | string: '' 110 | headers: 111 | Authorization: 112 | - Bearer 113 | response: 114 | status: 115 | code: 200 116 | message: OK 117 | headers: 118 | Server: 119 | - nginx 120 | Date: 121 | - Fri, 14 Nov 2014 13:42:35 GMT 122 | Content-Type: 123 | - application/json 124 | Content-Length: 125 | - '32' 126 | Connection: 127 | - keep-alive 128 | P3p: 129 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 130 | DSP COR" 131 | Set-Cookie: 132 | - FormstackAdmin=6mecp8fp1baaemils2vj2qvmm7; path=/api/; secure; HttpOnly 133 | Cache-Control: 134 | - no-cache 135 | X-Robots-Tag: 136 | - noindex, nofollow 137 | body: 138 | encoding: UTF-8 139 | string: '{"success":"1","id":"171821364"}' 140 | http_version: 141 | recorded_at: Fri, 14 Nov 2014 13:42:35 GMT 142 | recorded_with: VCR 2.9.3 143 | -------------------------------------------------------------------------------- /lib/formstack/api.rb: -------------------------------------------------------------------------------- 1 | require "formstack/api/version" 2 | 3 | module Formstack 4 | class API 5 | require 'httparty' 6 | require 'json' 7 | require 'uri' 8 | 9 | include HTTParty 10 | logger Rails.logger, :debug 11 | 12 | FIELD_TYPES = [ 13 | 'text', 14 | 'textarea', 15 | 'name', 16 | 'address', 17 | 'email', 18 | 'phone', 19 | 'creditcard', 20 | 'datetime', 21 | 'file', 22 | 'number', 23 | 'select', 24 | 'radio', 25 | 'checkbox', 26 | 'matrix', 27 | 'richtext', 28 | 'embed', 29 | 'product', 30 | 'section', 31 | ] 32 | 33 | def initialize(access_token) 34 | @access_token = access_token 35 | @api_url = 'https://www.formstack.com/api/v2/' 36 | end 37 | 38 | def request(end_point, verb='GET', arguments={}) 39 | arguments.merge!(headers: { "Authorization" => "Bearer #{@access_token }"}) 40 | 41 | valid_verbs = %w(GET PUT POST DELETE) 42 | 43 | if end_point.empty? 44 | raise 'Missing End Point' 45 | end 46 | 47 | verb.upcase! 48 | 49 | unless valid_verbs.include?(verb) 50 | raise 'Wrong verb' 51 | end 52 | 53 | url = "#{@api_url}#{end_point}" 54 | 55 | case verb 56 | when 'GET' 57 | response = self.class.get(url, arguments ) 58 | when 'POST' 59 | response = self.class.post(url, arguments ) 60 | when 'PUT' 61 | response = self.class.put(url, arguments ) 62 | when 'DELETE' 63 | response = self.class.delete(url, arguments ) 64 | end 65 | 66 | if response.code < 200 || response.code >= 300 67 | raise 'Bad token' 68 | end 69 | 70 | body = JSON.parse(response.body) 71 | return body 72 | end 73 | 74 | def forms(organized_folders=false) 75 | organized_folders = organized_folders ? 1 : 0 76 | response = request("form.json#{query(folders: organized_folders)}", 'GET') 77 | response['forms'] 78 | end 79 | 80 | def form_details(form_id) 81 | is_numeric?(form_id) 82 | 83 | request("form/#{form_id}", 'GET'); 84 | end 85 | 86 | def form_fields(form_id) 87 | is_numeric?(form_id) 88 | 89 | request("form/#{form_id}/field.json", 'GET'); 90 | end 91 | 92 | def copy_form(form_id) 93 | is_numeric?(form_id) 94 | 95 | request("form/#{form_id}/copy", 'POST'); 96 | end 97 | 98 | def form_submissions(form_id, encryption_password='', min_time='', 99 | max_time='', search_fields=[], search_fields_values=[], 100 | page_number=1, per_page=25, sort='DESC', data=false, 101 | expand_data=false) 102 | 103 | is_numeric?(form_id) 104 | 105 | unless min_time.empty? 106 | begin 107 | Time.parse(min_time) 108 | rescue Exception => e 109 | raise 'Invalid value for minTime parameter' 110 | end 111 | end 112 | 113 | unless max_time.empty? 114 | begin 115 | Time.parse(max_time) 116 | rescue Exception => e 117 | raise 'Invalid value for maxTime parameter' 118 | end 119 | end 120 | 121 | raise 'You must have a one to one relationship' unless search_fields.size == search_fields_values.size 122 | 123 | search_fields.each do |id| 124 | raise 'Field IDs must be numeric' unless id.is_a? Numeric 125 | end 126 | 127 | if !per_page.is_a? Numeric 128 | raise 'The perPage value must be numeric' 129 | elsif per_page < 1 || per_page > 100 130 | raise 'You can only retrieve a minimum of 1 and maximum of 100 submissions per request' 131 | end 132 | 133 | raise 'The pageNumber value must be numeric' unless page_number.is_a? Numeric 134 | 135 | raise 'The sort parameter must be ASC or DESC' unless sort == 'ASC' || sort == 'DESC' 136 | 137 | 138 | end_point = "form/#{form_id}/submission.json" 139 | 140 | sort.upcase! 141 | 142 | arguments = { 143 | 'encryption_password' => encryption_password, 144 | 'min_time' => min_time, 145 | 'max_time' => max_time, 146 | 'page' => page_number, 147 | 'per_page' => per_page, 148 | 'sort' => sort, 149 | 'data' => data, 150 | 'expand_data' => expand_data, 151 | } 152 | 153 | arguments.delete('data') unless data 154 | arguments.delete('expand_data') unless expand_data 155 | 156 | arguments = API.clean_arguments(arguments) 157 | 158 | search_fields.each_with_index do |field, idx| 159 | arguments["search_field_#{idx}"] = search_fields[idx] 160 | arguments["search_value_#{idx}"] = search_fields_values[idx] 161 | end 162 | 163 | response = request(end_point, 'GET', {query: arguments} ) 164 | response['submissions'] 165 | end 166 | 167 | def submit_form(form_id, 168 | field_ids = [], 169 | field_values = [], 170 | timestamp = '', 171 | user_agent = '', 172 | ip_address = '', 173 | payment_status = '', 174 | read = false) 175 | 176 | arguments = { 177 | 'timestamp' => timestamp, 178 | 'user_agent' => user_agent, 179 | 'remote_addr' => ip_address, 180 | 'payment_status' => payment_status, 181 | 'read' => read ? 1 : 0 182 | } 183 | 184 | is_numeric?(form_id) 185 | 186 | unless timestamp.empty? 187 | begin 188 | Time.parse(timestamp) 189 | rescue Exception => e 190 | raise 'You must use a valid Date/Time string formatted in YYYY-MM-DD HH:MM:SS' 191 | end 192 | end 193 | 194 | raise 'There must be a one-to-one relationship between Field IDs and their values' unless field_ids.size == field_values.size 195 | 196 | arguments = API.clean_arguments(arguments) 197 | arguments = API.add_field_data(arguments, field_ids, field_values) 198 | 199 | response = request("form/#{form_id}/submission.json", 'POST', { body: arguments } ) 200 | end 201 | 202 | def get_submission_details(submission_id, encryption_password = '') 203 | arguments = {} 204 | arguments['encryption_password'] = encryption_password unless encryption_password.empty? 205 | 206 | raise 'Submission ID must be numeric' unless submission_id.is_a? Numeric 207 | 208 | response = request("submission/#{submission_id}.json", 'GET', arguments) 209 | end 210 | 211 | def edit_submission_data(submission_id, 212 | field_ids = [], 213 | field_values = [], 214 | timestamp = '', 215 | user_agent = '', 216 | ip_address = '', 217 | payment_status = '', 218 | read = false) 219 | 220 | arguments = { 221 | 'timestamp' => timestamp, 222 | 'user_agent' => user_agent, 223 | 'remote_addr' => ip_address, 224 | 'payment_status' => payment_status, 225 | 'read' => read ? 1 : 0 226 | } 227 | 228 | raise 'Submission ID must be numeric' unless submission_id.is_a? Numeric 229 | 230 | unless timestamp.empty? 231 | begin 232 | Time.parse(timestamp) 233 | rescue Exception => e 234 | raise 'You must use a valid Date/Time string formatted in YYYY-MM-DD HH:MM:SS' 235 | end 236 | end 237 | 238 | arguments = API.clean_arguments(arguments) 239 | arguments = API.add_field_data(arguments, field_ids, field_values) 240 | 241 | request("submission/#{submission_id}.json", 'PUT', { body: arguments } ) 242 | end 243 | 244 | def delete_submission(submission_id) 245 | raise 'Submission ID must be numeric' unless submission_id.is_a? Numeric 246 | 247 | request("submission/#{submission_id}", 'DELETE' ) 248 | end 249 | 250 | def create_field(form_id, field_type = '', label = '', hide_label = false, 251 | description = '', use_callout = false, 252 | field_specific_attributes = [], default_value = '', 253 | options = [], options_values = [], required = false, 254 | read_only = false, hidden = false, unique = false, 255 | column_span = nil, sort = nil) 256 | 257 | is_numeric?(form_id) 258 | 259 | raise 'Provided Field Type is not in the list of known Field types' unless FIELD_TYPES.include? field_type 260 | 261 | arguments = {} 262 | 263 | arguments['field_type'] = field_type 264 | arguments['label'] = label unless label.empty? 265 | arguments['hide_label'] = 1 if hide_label 266 | arguments['description'] = description unless description.empty? 267 | arguments['description_callout'] = 1 if use_callout 268 | arguments['default_value'] = default_value unless default_value.empty? 269 | arguments['options'] = options unless options.empty? 270 | arguments['options_values'] = options_values unless options_values.empty? 271 | arguments['required'] = 1 if required 272 | arguments['read_only'] = 1 if read_only 273 | arguments['hidden'] = 1 if hidden 274 | arguments['unique'] = 1 if unique 275 | arguments['colspan'] = column_span unless column_span.nil? 276 | arguments['sort'] = sort unless sort.nil? 277 | 278 | request("form/#{form_id}/field", 'POST', { body: arguments } ) 279 | end 280 | 281 | private 282 | 283 | def self.add_field_data(arguments, field_ids, field_values) 284 | 285 | if field_ids.empty? 286 | raise 'There must be a one-to-one relationship between Field IDs and their values' if field_ids.size != field_values.size 287 | end 288 | 289 | field_ids.each_with_index do |id, i| 290 | raise 'Field IDs must be numeric' unless id.is_a? Numeric 291 | arguments["field_#{field_ids[i]}"] = field_values[i] 292 | end 293 | 294 | arguments 295 | end 296 | 297 | def self.clean_arguments(args) 298 | arguments = {} 299 | 300 | args.each_pair do |key, value| 301 | arguments[key] = value unless value == '' 302 | end 303 | 304 | arguments 305 | end 306 | 307 | def is_numeric?(form_id) 308 | unless form_id.is_a? Numeric 309 | raise 'Form ID must be numeric' 310 | end 311 | end 312 | 313 | def query(args) 314 | query = URI.encode_www_form(args) 315 | "?#{query}" 316 | end 317 | end 318 | end 319 | -------------------------------------------------------------------------------- /spec/wrapper_spec.rb: -------------------------------------------------------------------------------- 1 | require_relative '../lib/formstack/api' 2 | require "base64" 3 | 4 | RSpec.describe Formstack::API do 5 | 6 | let(:access_token) { ACCESS_TOKEN } 7 | let(:invalid_form_id) { 1234 } 8 | let(:inaccessible_form_id) { INACCESSIBLE_FORM_ID } 9 | let(:delete_submission_form) { DELETE_SUBMISSION_FORM } 10 | let(:submit_form_id) { SUBMIT_FORM_ID } 11 | let(:upload_form_id) { UPLOAD_FORM_ID } 12 | let(:upload_field_ids) { [UPLOAD_FIELD_IDS] } 13 | let(:logo_path) { LOGO_PATH } 14 | let(:create_field_form_id) { CREATE_FIELD_FORM_ID } 15 | let(:submission_details_id) { SUBMISSION_DETAILS_ID } 16 | let(:submission_details_form_id) { SUBMISSION_DETAILS_FORM_ID } 17 | let(:edit_submission_field_id) { EDIT_SUBMISSION_FIELD_ID } 18 | let(:edit_submission_array_field_id) { EDIT_SUBMISSION_ARRAY_FIELD_ID } 19 | let(:form_fields_id) { FORM_FIELDS_ID } 20 | 21 | subject(:wrapper) { Formstack::API.new(access_token) } 22 | 23 | describe '#request', :vcr do 24 | 25 | it 'raises an exception when endpoint is empty' do 26 | expect{wrapper.request('')}.to raise_exception('Missing End Point') 27 | end 28 | 29 | it 'raises an exception with a bad verb' do 30 | expect{wrapper.request('/test/endpoint', 'FAIL')}.to raise_exception('Wrong verb') 31 | end 32 | 33 | let(:access_token) { 'fail' } 34 | it 'raises an exception with a bad token' do 35 | expect{wrapper.request('form.json')}.to raise_exception('Bad token') 36 | end 37 | end 38 | 39 | describe '#forms', :vcr do 40 | it 'responds with no folders by default' do 41 | forms = wrapper.forms 42 | expect(forms.class).to eq(Array) 43 | end 44 | 45 | it 'gets folders when asked' do 46 | folders = wrapper.forms(true) 47 | expect(folders.class).to eq(Hash) 48 | end 49 | end 50 | 51 | describe '#form_details', :vcr do 52 | it 'reads a form name' do 53 | form = wrapper.form_details(submit_form_id) 54 | expect(form['name']).to eq('Test Form') 55 | end 56 | 57 | it 'raises an error if form id is not a number' do 58 | expect{wrapper.form_details('TEXT')}.to raise_exception('Form ID must be numeric') 59 | end 60 | 61 | it 'responds with an error if form id doesnt exist' do 62 | response = wrapper.form_details(invalid_form_id) 63 | expect(response['status']).to eq('error') 64 | expect(response['error']).to eq('The form was not found') 65 | end 66 | 67 | it 'responds with an error if you dont have access to form' do 68 | response = wrapper.form_details(inaccessible_form_id) 69 | expect(response['status']).to eq('error') 70 | expect(response['error']).to eq('You do not have high enough permissions for this form.') 71 | end 72 | end 73 | 74 | describe '#copy_form', :vcr do 75 | it 'adds COPY at the end of the form name' do 76 | form = wrapper.form_details(submit_form_id) 77 | copied_form = wrapper.copy_form(submit_form_id) 78 | expect(copied_form['name']).to match(/^#{form['name']} - COPY/) 79 | end 80 | 81 | it 'raises an error if form id is not a number' do 82 | expect{wrapper.copy_form('TEXT')}.to raise_exception('Form ID must be numeric') 83 | end 84 | 85 | it 'raises an error if form id is invalid' do 86 | response = wrapper.copy_form(invalid_form_id) 87 | expect(response['status']).to eq('error') 88 | expect(response['error']).to eq('A valid form id was not supplied') 89 | end 90 | end 91 | 92 | describe '#form_submissions', :vcr do 93 | it 'gets submissions default' do 94 | form = wrapper.form_details(submit_form_id) 95 | submissions_count = form['submissions'].to_i > 25 ? 25 : form['submissions'].to_i 96 | 97 | submissions = wrapper.form_submissions(submit_form_id) 98 | expect(submissions_count).to eq(submissions.count) 99 | end 100 | 101 | it 'raises an error if form id isnt numeric' do 102 | expect{wrapper.form_submissions('TEXT')}.to raise_exception('Form ID must be numeric') 103 | end 104 | 105 | it 'raises an error if min time is invalid' do 106 | expect{wrapper.form_submissions(submit_form_id, '', 'BAD')}.to raise_exception('Invalid value for minTime parameter') 107 | end 108 | 109 | it 'raises an error if max time is invalid' do 110 | expect{wrapper.form_submissions(submit_form_id, '', '', 'BAD')}.to raise_exception('Invalid value for maxTime parameter') 111 | end 112 | 113 | it 'raises an error for a search mismatch' do 114 | field_ids = [1, 2, 3] 115 | field_values = ['test-1', 'test-2'] 116 | expect{wrapper.form_submissions(submit_form_id, '', '', '', field_ids, field_values)}.to raise_exception('You must have a one to one relationship') 117 | end 118 | 119 | it 'raises an error for a search mismatch reversed' do 120 | field_ids = [1, 2] 121 | field_values = ['test-1', 'test-2', 'test-3'] 122 | expect{wrapper.form_submissions(submit_form_id, '', '', '', field_ids, field_values)}.to raise_exception('You must have a one to one relationship') 123 | end 124 | 125 | it 'raises an error if field ids are not numeric' do 126 | field_ids = [1, 'two'] 127 | field_values = ['test-1', 'test-2'] 128 | expect{wrapper.form_submissions(submit_form_id, '', '', '', field_ids, field_values)}.to raise_exception('Field IDs must be numeric') 129 | end 130 | 131 | it 'raises an error if per_page is not numeric' do 132 | expect{wrapper.form_submissions(submit_form_id, '', '', '', [], [], 1, 'fail')}.to raise_exception('The perPage value must be numeric') 133 | end 134 | 135 | it 'raises an error if requests per page are less than 1' do 136 | expect{wrapper.form_submissions(submit_form_id, '', '', '', [], [], 1, 0)}.to raise_exception('You can only retrieve a minimum of 1 and maximum of 100 submissions per request') 137 | end 138 | 139 | it 'raises an error if requests per page are more than 100' do 140 | expect{wrapper.form_submissions(submit_form_id, '', '', '', [], [], 1, 101)}.to raise_exception('You can only retrieve a minimum of 1 and maximum of 100 submissions per request') 141 | end 142 | 143 | it 'raises an error if page_number is not numeric' do 144 | expect{wrapper.form_submissions(submit_form_id, '', '', '', [], [], 'fail')}.to raise_exception('The pageNumber value must be numeric') 145 | end 146 | 147 | it 'raises an error if page number is not working' do 148 | page1 = wrapper.form_submissions(submit_form_id, '', '', '', [], [], 1, 1, 'DESC') 149 | page2 = wrapper.form_submissions(submit_form_id, '', '', '', [], [], 2, 1, 'DESC') 150 | 151 | expect(page1).not_to eq(page2) 152 | end 153 | 154 | it 'raises an error if the sort parameter is invalid' do 155 | expect{wrapper.form_submissions(submit_form_id, '', '', '', [], [], 1, 100, 'fail')}.to raise_exception('The sort parameter must be ASC or DESC') 156 | end 157 | 158 | it 'returns no data by default' do 159 | submission = wrapper.form_submissions(submit_form_id).first 160 | 161 | expect(submission.include?('data')).to eq(false) 162 | end 163 | 164 | it 'returns data if specified' do 165 | submission = wrapper.form_submissions(submit_form_id, '', '', '', [], [], 1, 100, 'DESC', true).first 166 | 167 | expect(submission.include?('data')).to eq(true) 168 | end 169 | 170 | end 171 | 172 | describe '#submit_form', :vcr do 173 | let(:submit_form_field_ids) { [28705506, 28706107, 28706112] } 174 | let(:submit_form_field_values) { ['short-answer-test', {'first' => 'first-test', 'last' => 'last-test'}, 'this is a long answer field'] } 175 | 176 | it 'creates a submission into a form' do 177 | response = wrapper.submit_form(submit_form_id, submit_form_field_ids, submit_form_field_values) 178 | expect(response['form'].to_i).to eq(submit_form_id) 179 | 180 | response['data'].each do |row| 181 | value = submit_form_field_values.to_a[submit_form_field_ids.index(row['field'].to_i)] 182 | if value.class == Hash 183 | clean_hash = {} 184 | row['value'].to_s.split(/\n/).each do |a| 185 | key, val = a.split(' = ') 186 | clean_hash[key] = val 187 | end 188 | expect(clean_hash).to eq(value) 189 | else 190 | expect(row['value']).to eq(value) 191 | end 192 | end 193 | end 194 | 195 | it 'raises an error if the form id is non numeric' do 196 | expect{wrapper.submit_form('fail')}.to raise_exception('Form ID must be numeric') 197 | end 198 | 199 | it 'raises an eror if the timestamp format is invalid' do 200 | expect{wrapper.submit_form(submit_form_id, [], [], 'this is not a valid date/time string')}.to raise_exception('You must use a valid Date/Time string formatted in YYYY-MM-DD HH:MM:SS') 201 | end 202 | 203 | it 'raises an error for a data array mismatch' do 204 | field_ids = [1, 2, 3] 205 | field_values = ['a', 'b'] 206 | expect{wrapper.submit_form(submit_form_id, field_ids, field_values)}.to raise_exception('There must be a one-to-one relationship between Field IDs and their values') 207 | end 208 | 209 | it 'raises an error for a data array mismatch reversed' do 210 | field_ids = [1, 2] 211 | field_values = ['a', 'b', 'c'] 212 | expect{wrapper.submit_form(submit_form_id, field_ids, field_values)}.to raise_exception('There must be a one-to-one relationship between Field IDs and their values') 213 | end 214 | 215 | it 'raises an error if field ids are not numeric' do 216 | field_ids = ['one'] 217 | field_values = ['a'] 218 | expect{wrapper.submit_form(submit_form_id, field_ids, field_values)}.to raise_exception('Field IDs must be numeric') 219 | end 220 | 221 | it 'uploads an image' do 222 | logo_data = File.open(logo_path, 'rb') { |file| file.read } 223 | upload_field_values = [[logo_data, 'fs-logo.png']] 224 | 225 | upload_field_values.each_with_index do |field, idx| 226 | upload_field_values[idx] = "#{upload_field_values[idx][1]};#{Base64.encode64(field[0])}" 227 | end 228 | 229 | response = wrapper.submit_form(upload_form_id, upload_field_ids, upload_field_values) 230 | 231 | expect(response['data']).not_to be_empty 232 | 233 | response['data'].each_with_index do |row, idx| 234 | expect(row['field'].to_i).to eq(upload_field_ids[idx]) 235 | expect(row['value']).not_to be_empty 236 | end 237 | end 238 | end 239 | 240 | describe '#get_submission_details', :vcr do 241 | 242 | it 'gets the right submission from the right form' do 243 | submission = wrapper.get_submission_details(submission_details_id) 244 | expect(submission['form'].to_i).to eq(submission_details_form_id) 245 | end 246 | 247 | it 'raises an error if submission id is not numeric' do 248 | expect{wrapper.get_submission_details('FAIL')}.to raise_exception('Submission ID must be numeric') 249 | end 250 | end 251 | 252 | describe '#edit_submission_data', :vcr do 253 | 254 | let(:value) { "test#{Time.now}" } 255 | let(:hash_value) { { 'first' => "#{value}-first", 'last' => "#{value}-last" } } 256 | let(:edit_submission_id) { get_editable_submission_id } 257 | 258 | it 'edits a submission succesfully' do 259 | 260 | response = wrapper.edit_submission_data(edit_submission_id, 261 | [edit_submission_field_id, edit_submission_array_field_id], 262 | [value, hash_value]) 263 | 264 | expect(response['success'].to_i).to eq(1) 265 | expect(response['id'].to_i).to eq(edit_submission_id) 266 | 267 | submission = wrapper.get_submission_details(edit_submission_id) 268 | 269 | submission['data'].each do |row| 270 | if row['field'] == edit_submission_field_id 271 | expect(row['value']).to eq(value) 272 | elsif row['field'] == edit_submission_array_field_id 273 | expect(row['value']).to eq(hash_value) 274 | end 275 | end 276 | end 277 | 278 | it 'raises an exception when the submission id is non numeric' do 279 | expect{ wrapper.edit_submission_data('FAIL') }.to raise_exception('Submission ID must be numeric') 280 | end 281 | 282 | it 'raises an exception with a bad timestamp' do 283 | expect{ 284 | wrapper.edit_submission_data(edit_submission_id, [], [], 'Bad Date String') 285 | }.to raise_exception('You must use a valid Date/Time string formatted in YYYY-MM-DD HH:MM:SS') 286 | end 287 | 288 | it 'raises an exception when data array and ids don\'t match' do 289 | expect{ 290 | wrapper.edit_submission_data(edit_submission_id, [1,2,3], ['test-1', 'test-2'], 'Bad Date String') 291 | }.to raise_exception('You must use a valid Date/Time string formatted in YYYY-MM-DD HH:MM:SS') 292 | end 293 | 294 | it 'raises an exception when data array and ids don\'t match reversed' do 295 | expect{ 296 | wrapper.edit_submission_data(edit_submission_id, [1,2], ['test-1', 'test-2', 'test-3'], 'Bad Date String') 297 | }.to raise_exception('You must use a valid Date/Time string formatted in YYYY-MM-DD HH:MM:SS') 298 | end 299 | 300 | it 'raises an exception if fields are non numeric' do 301 | expect{ 302 | wrapper.edit_submission_data(edit_submission_id, ['fail'], ['test-1']) 303 | }.to raise_exception('Field IDs must be numeric') 304 | end 305 | end 306 | 307 | describe '#delete_submission', :vcr do 308 | it 'deletes a submission' do 309 | submission_to_delete = get_editable_submission_id 310 | response = wrapper.delete_submission(submission_to_delete) 311 | expect(response['success'].to_i).to eq(1) 312 | expect(response['id'].to_i).to eq(submission_to_delete) 313 | end 314 | 315 | it 'raises an exception with a non numeric id' do 316 | expect{wrapper.delete_submission('FAIL')}.to raise_exception('Submission ID must be numeric') 317 | end 318 | end 319 | 320 | describe '#create_field', :vcr do 321 | it 'creates a text field' do 322 | field_name = "Test Field #{Time.now}" 323 | field = wrapper.create_field(create_field_form_id, 'text', field_name) 324 | 325 | expect(field['label']).to match(/Test Field/) 326 | expect(field['type']).to eq('text') 327 | end 328 | 329 | it 'creates a field with embeded code' do 330 | attributes = { 'text' => '' } 331 | 332 | field = wrapper.create_field(create_field_form_id, 'embed', '', false, '', false, attributes) 333 | 334 | expect(field['type']).to eq('embed') 335 | end 336 | end 337 | 338 | describe '#form_fields', :vcr do 339 | let(:form_fields) { [{"id"=>"28906371", 340 | "label"=>"Short Answer", 341 | "hide_label"=>"0", 342 | "description"=>nil, 343 | "name"=>"short_answer", 344 | "type"=>"text", 345 | "options"=>"", 346 | "default"=>"", 347 | "required"=>"0", 348 | "uniq"=>"0", 349 | "hidden"=>"0", 350 | "readonly"=>"0", 351 | "colspan"=>"1", 352 | "sort"=>"0", 353 | "text_size"=>50}] } 354 | 355 | it 'retrieves all the fields from a form' do 356 | fields = wrapper.form_fields(form_fields_id) 357 | expect(fields).to eq(form_fields) 358 | end 359 | 360 | it 'raises an exception if form id is not numeric' do 361 | expect{wrapper.form_fields('fail')}.to raise_exception('Form ID must be numeric') 362 | end 363 | end 364 | # describe '#', :vcr => { :record => :all } do 365 | 366 | def get_editable_submission_id 367 | wrapper.form_submissions(delete_submission_form, '', '', '', [], [], 1, 100, 'ASC').first['id'].to_i 368 | end 369 | end 370 | -------------------------------------------------------------------------------- /spec/vcr/Formstack_API/_edit_submission_data/edits_a_submission_succesfully.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: https://www.formstack.com/api/v2/submission/.json 6 | body: 7 | encoding: UTF-8 8 | string: read=0&field_=test2014-11-14%2013%3A23%3A04%20%2B0100&field_[first]=test2014-11-14%2013%3A23%3A04%20%2B0100-first&field_[last]=test2014-11-14%2013%3A23%3A04%20%2B0100-last 9 | headers: 10 | Authorization: 11 | - Bearer 12 | response: 13 | status: 14 | code: 200 15 | message: OK 16 | headers: 17 | Server: 18 | - nginx 19 | Date: 20 | - Fri, 14 Nov 2014 12:23:05 GMT 21 | Content-Type: 22 | - application/json 23 | Content-Length: 24 | - '77' 25 | Connection: 26 | - keep-alive 27 | P3p: 28 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 29 | DSP COR" 30 | Set-Cookie: 31 | - FormstackAdmin=hec8bqhlpuqa51eosrh1s0t5a1; path=/api/; secure; HttpOnly 32 | Cache-Control: 33 | - no-cache 34 | X-Robots-Tag: 35 | - noindex, nofollow 36 | body: 37 | encoding: UTF-8 38 | string: '{"status":"error","error":"Creating a submission is not currently supported"}' 39 | http_version: 40 | recorded_at: Fri, 14 Nov 2014 12:23:05 GMT 41 | - request: 42 | method: post 43 | uri: https://www.formstack.com/api/v2/submission/171821341.json 44 | body: 45 | encoding: UTF-8 46 | string: read=0&field_[first]=test2014-11-14%2013%3A35%3A52%20%2B0100-first&field_[last]=test2014-11-14%2013%3A35%3A52%20%2B0100-last 47 | headers: 48 | Authorization: 49 | - Bearer 50 | response: 51 | status: 52 | code: 200 53 | message: OK 54 | headers: 55 | Server: 56 | - nginx 57 | Date: 58 | - Fri, 14 Nov 2014 12:35:53 GMT 59 | Content-Type: 60 | - application/json 61 | Content-Length: 62 | - '77' 63 | Connection: 64 | - keep-alive 65 | P3p: 66 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 67 | DSP COR" 68 | Set-Cookie: 69 | - FormstackAdmin=4jcmnn31v29vgcclu5igrjas56; path=/api/; secure; HttpOnly 70 | Cache-Control: 71 | - no-cache 72 | X-Robots-Tag: 73 | - noindex, nofollow 74 | body: 75 | encoding: UTF-8 76 | string: '{"status":"error","error":"Creating a submission is not currently supported"}' 77 | http_version: 78 | recorded_at: Fri, 14 Nov 2014 12:35:53 GMT 79 | - request: 80 | method: put 81 | uri: https://www.formstack.com/api/v2/submission/171821341.json 82 | body: 83 | encoding: UTF-8 84 | string: read=0&field_[first]=test2014-11-14%2014%3A41%3A52%20%2B0100-first&field_[last]=test2014-11-14%2014%3A41%3A52%20%2B0100-last 85 | headers: 86 | Authorization: 87 | - Bearer 88 | response: 89 | status: 90 | code: 200 91 | message: OK 92 | headers: 93 | Server: 94 | - nginx 95 | Date: 96 | - Fri, 14 Nov 2014 13:41:53 GMT 97 | Content-Type: 98 | - application/json 99 | Content-Length: 100 | - '32' 101 | Connection: 102 | - keep-alive 103 | P3p: 104 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 105 | DSP COR" 106 | Set-Cookie: 107 | - FormstackAdmin=scri11n1hg7bf8aigtsu3lhac5; path=/api/; secure; HttpOnly 108 | Cache-Control: 109 | - no-cache 110 | X-Robots-Tag: 111 | - noindex, nofollow 112 | body: 113 | encoding: UTF-8 114 | string: '{"success":"1","id":"171821341"}' 115 | http_version: 116 | recorded_at: Fri, 14 Nov 2014 13:41:52 GMT 117 | - request: 118 | method: get 119 | uri: https://www.formstack.com/api/v2/submission/171821341.json 120 | body: 121 | encoding: US-ASCII 122 | string: '' 123 | headers: 124 | Authorization: 125 | - Bearer 126 | response: 127 | status: 128 | code: 200 129 | message: OK 130 | headers: 131 | Server: 132 | - nginx 133 | Date: 134 | - Fri, 14 Nov 2014 13:41:53 GMT 135 | Content-Type: 136 | - application/json 137 | Content-Length: 138 | - '327' 139 | Connection: 140 | - keep-alive 141 | P3p: 142 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 143 | DSP COR" 144 | Set-Cookie: 145 | - FormstackAdmin=niqt6s1bm80o9ldl87toic3vf7; path=/api/; secure; HttpOnly 146 | Cache-Control: 147 | - no-cache 148 | X-Robots-Tag: 149 | - noindex, nofollow 150 | body: 151 | encoding: UTF-8 152 | string: '{"id":"171821341","timestamp":"2014-11-13 13:43:25","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","form":"","latitude":null,"longitude":null,"data":[{"field":"","value":"first 153 | = test2014-11-14 14:41:52 +0100-first\nlast = test2014-11-14 14:41:52 +0100-last\n"}],"pretty_field_id":"28706107"}' 154 | http_version: 155 | recorded_at: Fri, 14 Nov 2014 13:41:53 GMT 156 | - request: 157 | method: put 158 | uri: https://www.formstack.com/api/v2/submission/171821364.json 159 | body: 160 | encoding: UTF-8 161 | string: read=0&field_[first]=test2014-11-14%2014%3A42%3A30%20%2B0100-first&field_[last]=test2014-11-14%2014%3A42%3A30%20%2B0100-last 162 | headers: 163 | Authorization: 164 | - Bearer 165 | response: 166 | status: 167 | code: 200 168 | message: OK 169 | headers: 170 | Server: 171 | - nginx 172 | Date: 173 | - Fri, 14 Nov 2014 13:42:32 GMT 174 | Content-Type: 175 | - application/json 176 | Content-Length: 177 | - '32' 178 | Connection: 179 | - keep-alive 180 | P3p: 181 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 182 | DSP COR" 183 | Set-Cookie: 184 | - FormstackAdmin=fm6iiij37cgarmc0d247v0slq1; path=/api/; secure; HttpOnly 185 | Cache-Control: 186 | - no-cache 187 | X-Robots-Tag: 188 | - noindex, nofollow 189 | body: 190 | encoding: UTF-8 191 | string: '{"success":"1","id":"171821364"}' 192 | http_version: 193 | recorded_at: Fri, 14 Nov 2014 13:42:31 GMT 194 | - request: 195 | method: get 196 | uri: https://www.formstack.com/api/v2/submission/171821364.json 197 | body: 198 | encoding: US-ASCII 199 | string: '' 200 | headers: 201 | Authorization: 202 | - Bearer 203 | response: 204 | status: 205 | code: 200 206 | message: OK 207 | headers: 208 | Server: 209 | - nginx 210 | Date: 211 | - Fri, 14 Nov 2014 13:42:32 GMT 212 | Content-Type: 213 | - application/json 214 | Content-Length: 215 | - '327' 216 | Connection: 217 | - keep-alive 218 | P3p: 219 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 220 | DSP COR" 221 | Set-Cookie: 222 | - FormstackAdmin=lbuppjro7dsuevjbfd1lim62r2; path=/api/; secure; HttpOnly 223 | Cache-Control: 224 | - no-cache 225 | X-Robots-Tag: 226 | - noindex, nofollow 227 | body: 228 | encoding: UTF-8 229 | string: '{"id":"171821364","timestamp":"2014-11-13 13:43:44","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","form":"","latitude":null,"longitude":null,"data":[{"field":"","value":"first 230 | = test2014-11-14 14:42:30 +0100-first\nlast = test2014-11-14 14:42:30 +0100-last\n"}],"pretty_field_id":"28706107"}' 231 | http_version: 232 | recorded_at: Fri, 14 Nov 2014 13:42:32 GMT 233 | - request: 234 | method: get 235 | uri: https://www.formstack.com/api/v2/form//submission.json 236 | body: 237 | encoding: US-ASCII 238 | string: '' 239 | headers: 240 | Authorization: 241 | - Bearer 242 | response: 243 | status: 244 | code: 200 245 | message: OK 246 | headers: 247 | Server: 248 | - nginx 249 | Date: 250 | - Fri, 14 Nov 2014 13:43:30 GMT 251 | Content-Type: 252 | - application/json 253 | Content-Length: 254 | - '4293' 255 | Connection: 256 | - keep-alive 257 | P3p: 258 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 259 | DSP COR" 260 | Set-Cookie: 261 | - FormstackAdmin=qpqocs6pm4tmb9q9l087eu3hr5; path=/api/; secure; HttpOnly 262 | Cache-Control: 263 | - no-cache 264 | X-Robots-Tag: 265 | - noindex, nofollow 266 | body: 267 | encoding: UTF-8 268 | string: '{"submissions":[{"id":"171821388","timestamp":"2014-11-13 13:44:07","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171821406","timestamp":"2014-11-13 269 | 13:44:21","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171822918","timestamp":"2014-11-13 270 | 14:05:06","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171823092","timestamp":"2014-11-13 271 | 14:07:17","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171823107","timestamp":"2014-11-13 272 | 14:07:28","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171823163","timestamp":"2014-11-13 273 | 14:08:11","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824009","timestamp":"2014-11-13 274 | 14:18:50","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824066","timestamp":"2014-11-13 275 | 14:19:28","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824379","timestamp":"2014-11-13 276 | 14:23:00","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824395","timestamp":"2014-11-13 277 | 14:23:09","user_agent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit\/537.36 278 | (KHTML, like Gecko) Chrome\/38.0.2125.111 Safari\/537.36","remote_addr":"89.202.154.170","payment_status":"","latitude":"47","longitude":"8","read":"1"},{"id":"171824436","timestamp":"2014-11-13 279 | 14:23:43","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824500","timestamp":"2014-11-13 280 | 14:24:34","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824576","timestamp":"2014-11-13 281 | 14:25:33","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824682","timestamp":"2014-11-13 282 | 14:26:30","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824794","timestamp":"2014-11-13 283 | 14:27:45","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824845","timestamp":"2014-11-13 284 | 14:28:18","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171824938","timestamp":"2014-11-13 285 | 14:29:04","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171825201","timestamp":"2014-11-13 286 | 14:32:20","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171825451","timestamp":"2014-11-13 287 | 14:34:48","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826184","timestamp":"2014-11-13 288 | 14:42:23","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826216","timestamp":"2014-11-13 289 | 14:42:44","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826235","timestamp":"2014-11-13 290 | 14:42:56","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826254","timestamp":"2014-11-13 291 | 14:43:09","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826404","timestamp":"2014-11-13 292 | 14:44:43","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"},{"id":"171826640","timestamp":"2014-11-13 293 | 14:47:27","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1"}],"total":"75","pages":3,"pretty_field_id":"28706107"}' 294 | http_version: 295 | recorded_at: Fri, 14 Nov 2014 13:43:29 GMT 296 | - request: 297 | method: put 298 | uri: https://www.formstack.com/api/v2/submission/171821388.json 299 | body: 300 | encoding: UTF-8 301 | string: read=0&field_[first]=test2014-11-14%2014%3A43%3A29%20%2B0100-first&field_[last]=test2014-11-14%2014%3A43%3A29%20%2B0100-last 302 | headers: 303 | Authorization: 304 | - Bearer 305 | response: 306 | status: 307 | code: 200 308 | message: OK 309 | headers: 310 | Server: 311 | - nginx 312 | Date: 313 | - Fri, 14 Nov 2014 13:43:31 GMT 314 | Content-Type: 315 | - application/json 316 | Content-Length: 317 | - '32' 318 | Connection: 319 | - keep-alive 320 | P3p: 321 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 322 | DSP COR" 323 | Set-Cookie: 324 | - FormstackAdmin=vsejkq2i8em7buh7q1eg1ucpl7; path=/api/; secure; HttpOnly 325 | Cache-Control: 326 | - no-cache 327 | X-Robots-Tag: 328 | - noindex, nofollow 329 | body: 330 | encoding: UTF-8 331 | string: '{"success":"1","id":"171821388"}' 332 | http_version: 333 | recorded_at: Fri, 14 Nov 2014 13:43:30 GMT 334 | - request: 335 | method: get 336 | uri: https://www.formstack.com/api/v2/submission/171821388.json 337 | body: 338 | encoding: US-ASCII 339 | string: '' 340 | headers: 341 | Authorization: 342 | - Bearer 343 | response: 344 | status: 345 | code: 200 346 | message: OK 347 | headers: 348 | Server: 349 | - nginx 350 | Date: 351 | - Fri, 14 Nov 2014 13:43:31 GMT 352 | Content-Type: 353 | - application/json 354 | Content-Length: 355 | - '327' 356 | Connection: 357 | - keep-alive 358 | P3p: 359 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 360 | DSP COR" 361 | Set-Cookie: 362 | - FormstackAdmin=bcn43h2uarodqau0esofvgtfp4; path=/api/; secure; HttpOnly 363 | Cache-Control: 364 | - no-cache 365 | X-Robots-Tag: 366 | - noindex, nofollow 367 | body: 368 | encoding: UTF-8 369 | string: '{"id":"171821388","timestamp":"2014-11-13 13:44:07","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","form":"","latitude":null,"longitude":null,"data":[{"field":"","value":"first 370 | = test2014-11-14 14:43:29 +0100-first\nlast = test2014-11-14 14:43:29 +0100-last\n"}],"pretty_field_id":"28706107"}' 371 | http_version: 372 | recorded_at: Fri, 14 Nov 2014 13:43:30 GMT 373 | recorded_with: VCR 2.9.3 374 | -------------------------------------------------------------------------------- /spec/vcr/Formstack_API/_submit_form/uploads_an_image.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: https://www.formstack.com/api/v2/form//submission.json 6 | body: 7 | encoding: UTF-8 8 | string: read=0&field_=fs-logo.png%3BiVBORw0KGgoAAAANSUhEUgAAANcAAAAnCAIAAAFkinptAAAAGXRFWHRTb2Z0%0Ad2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9i%0AZS54bXAAAAAAADw%2FeHBhY2tldCBiZWdpbj0i77u%2FIiBpZD0iVzVNME1wQ2Vo%0AaUh6cmVTek5UY3prYzlkIj8%2BIDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6%0AbnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2%0ALjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpS%0AREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJk%0AZi1zeW50YXgt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kzWVmdtLQxyDKzlrKJ%0ArgVJeTJ0SkgzVNzbB1bEyOJwdvBD6YwC%2FpVVVV1DOsroqbiW6E3FujI9nXJv%0AV7ovLicTWrrfTHf1h1VOemjyTeOLJmBgT5rckFJHnZSzmuwJQTFddZQTTFhi%0AXTPbR820YrKvEg5aiz1gjtkOpabVGwfloVhk%2FRy%2FMmkbppxOOE9pQ8Lw7Ils%0AWp1TGCtCR%2FkazWwza8QOoMgBdf9AuTteUeI1jayuxlJ10C3LUQ3bSZpw0HwV%0Am5c5sCogBpQZZDeZFj%2BFfb1JSSG6MegmNwjjnetylJUjMNZOpDNOXReipaUm%0AO0haxuQVWlm7hpS1mnSXUgXDgEyJMms46W0NiQw0Sx6TL%2F8F2ymy%2F16GGhUA%0AAAAASUVORK5CYII%3D%0A 9 | headers: 10 | Authorization: 11 | - Bearer 12 | response: 13 | status: 14 | code: 200 15 | message: OK 16 | headers: 17 | Server: 18 | - nginx 19 | Date: 20 | - Mon, 17 Nov 2014 15:34:19 GMT 21 | Content-Type: 22 | - application/json 23 | Content-Length: 24 | - '366' 25 | Connection: 26 | - keep-alive 27 | P3p: 28 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 29 | DSP COR" 30 | Set-Cookie: 31 | - FormstackAdmin=u1kjhtlil4iugt0t7quu889ic5; path=/api/; secure; HttpOnly 32 | Location: 33 | - https://www.formstack.com/api/v2/form//submission/172271098.json 34 | Cache-Control: 35 | - no-cache 36 | X-Robots-Tag: 37 | - noindex, nofollow 38 | body: 39 | encoding: UTF-8 40 | string: '{"id":"172271098","message":"

The form was submitted successfully.<\/p>","timestamp":"2014-11-17 41 | 16:34:18","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","form":"","latitude":null,"longitude":null,"data":[{"field":"","value":"https:\/\/s3.amazonaws.com\/files.formstack.com\/uploads\/\/\/172271098\/fs-logo.png"}]}' 42 | http_version: 43 | recorded_at: Mon, 17 Nov 2014 15:34:18 GMT 44 | recorded_with: VCR 2.9.3 45 | -------------------------------------------------------------------------------- /spec/vcr/Formstack_API/_form_submissions/returns_data_if_specified.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: https://www.formstack.com/api/v2/form//submission.json 6 | body: 7 | encoding: UTF-8 8 | string: page=1&per_page=100&sort=DESC&data=true 9 | headers: 10 | Authorization: 11 | - Bearer 12 | response: 13 | status: 14 | code: 200 15 | message: OK 16 | headers: 17 | Server: 18 | - nginx 19 | Date: 20 | - Fri, 14 Nov 2014 15:12:39 GMT 21 | Content-Type: 22 | - application/json 23 | Transfer-Encoding: 24 | - chunked 25 | Connection: 26 | - keep-alive 27 | P3p: 28 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 29 | DSP COR" 30 | Set-Cookie: 31 | - FormstackAdmin=bdcf1bns4neh7bq8i5gthiu5b3; path=/api/; secure; HttpOnly 32 | Cache-Control: 33 | - no-cache 34 | X-Robots-Tag: 35 | - noindex, nofollow 36 | body: 37 | encoding: UTF-8 38 | string: '{"submissions":[{"id":"171943139","timestamp":"2014-11-14 10:51:14","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 39 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 40 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 41 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171943131","timestamp":"2014-11-14 42 | 10:51:03","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 43 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 44 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 45 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171943088","timestamp":"2014-11-14 46 | 10:50:03","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 47 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 48 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 49 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171943075","timestamp":"2014-11-14 50 | 10:49:50","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 51 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 52 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 53 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"","timestamp":"2014-11-14 54 | 08:56:33","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 55 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 56 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 57 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171836337","timestamp":"2014-11-13 58 | 16:06:12","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 59 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 60 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 61 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171835825","timestamp":"2014-11-13 62 | 16:02:35","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 63 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 64 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 65 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171835746","timestamp":"2014-11-13 66 | 16:02:02","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 67 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 68 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 69 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171835284","timestamp":"2014-11-13 70 | 15:58:42","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 71 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 72 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 73 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171834791","timestamp":"2014-11-13 74 | 15:54:53","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 75 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 76 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 77 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171833957","timestamp":"2014-11-13 78 | 15:49:19","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 79 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 80 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 81 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171833937","timestamp":"2014-11-13 82 | 15:49:06","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 83 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 84 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 85 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171833903","timestamp":"2014-11-13 86 | 15:48:50","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 87 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 88 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 89 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171833858","timestamp":"2014-11-13 90 | 15:48:30","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 91 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 92 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 93 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171833785","timestamp":"2014-11-13 94 | 15:48:01","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 95 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 96 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 97 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171833715","timestamp":"2014-11-13 98 | 15:47:25","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 99 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 100 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 101 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171833676","timestamp":"2014-11-13 102 | 15:47:08","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 103 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 104 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 105 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171833650","timestamp":"2014-11-13 106 | 15:46:57","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 107 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 108 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 109 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171833601","timestamp":"2014-11-13 110 | 15:46:32","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 111 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 112 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 113 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171833560","timestamp":"2014-11-13 114 | 15:46:13","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 115 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 116 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 117 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171833521","timestamp":"2014-11-13 118 | 15:45:57","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 119 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 120 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 121 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171832897","timestamp":"2014-11-13 122 | 15:41:01","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 123 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 124 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 125 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171832869","timestamp":"2014-11-13 126 | 15:40:49","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 127 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 128 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 129 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171832827","timestamp":"2014-11-13 130 | 15:40:31","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 131 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 132 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 133 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171832788","timestamp":"2014-11-13 134 | 15:40:15","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 135 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 136 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 137 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171832736","timestamp":"2014-11-13 138 | 15:39:42","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 139 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 140 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 141 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171832712","timestamp":"2014-11-13 142 | 15:39:33","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 143 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 144 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 145 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171832691","timestamp":"2014-11-13 146 | 15:39:24","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 147 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 148 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 149 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171832641","timestamp":"2014-11-13 150 | 15:38:53","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 151 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 152 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 153 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171832523","timestamp":"2014-11-13 154 | 15:37:55","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 155 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 156 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 157 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171832467","timestamp":"2014-11-13 158 | 15:37:28","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 159 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 160 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 161 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171832356","timestamp":"2014-11-13 162 | 15:36:30","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 163 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 164 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 165 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171832331","timestamp":"2014-11-13 166 | 15:36:14","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 167 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 168 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 169 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171832290","timestamp":"2014-11-13 170 | 15:35:57","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 171 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 172 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 173 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171832214","timestamp":"2014-11-13 174 | 15:35:18","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 175 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 176 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 177 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171832180","timestamp":"2014-11-13 178 | 15:35:05","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 179 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 180 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 181 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171831918","timestamp":"2014-11-13 182 | 15:33:00","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 183 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 184 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 185 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171831885","timestamp":"2014-11-13 186 | 15:32:45","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 187 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 188 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 189 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171831685","timestamp":"2014-11-13 190 | 15:31:11","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 191 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 192 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 193 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171831649","timestamp":"2014-11-13 194 | 15:30:56","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 195 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 196 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 197 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171831515","timestamp":"2014-11-13 198 | 15:29:50","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 199 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 200 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 201 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171830939","timestamp":"2014-11-13 202 | 15:25:48","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 203 | Answer","type":"text","value":"short-answer-test"},"28706107":{"field":28706107,"label":"Name","type":"name","value":"first 204 | = first-test\nlast = last-test\n"},"28706112":{"field":28706112,"label":"Long 205 | Answer","type":"textarea","value":"this is a long answer field"}}},{"id":"171829414","timestamp":"2014-11-13 206 | 15:13:22","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171829376","timestamp":"2014-11-13 207 | 15:13:06","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171828982","timestamp":"2014-11-13 208 | 15:09:46","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171828933","timestamp":"2014-11-13 209 | 15:09:26","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171828897","timestamp":"2014-11-13 210 | 15:09:11","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171828842","timestamp":"2014-11-13 211 | 15:08:38","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171828038","timestamp":"2014-11-13 212 | 15:01:25","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171828000","timestamp":"2014-11-13 213 | 15:01:05","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171826640","timestamp":"2014-11-13 214 | 14:47:27","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171826404","timestamp":"2014-11-13 215 | 14:44:43","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171826254","timestamp":"2014-11-13 216 | 14:43:09","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171826235","timestamp":"2014-11-13 217 | 14:42:56","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171826216","timestamp":"2014-11-13 218 | 14:42:44","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171826184","timestamp":"2014-11-13 219 | 14:42:23","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171825451","timestamp":"2014-11-13 220 | 14:34:48","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171825201","timestamp":"2014-11-13 221 | 14:32:20","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171824938","timestamp":"2014-11-13 222 | 14:29:04","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171824845","timestamp":"2014-11-13 223 | 14:28:18","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171824794","timestamp":"2014-11-13 224 | 14:27:45","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171824682","timestamp":"2014-11-13 225 | 14:26:30","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171824576","timestamp":"2014-11-13 226 | 14:25:33","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171824500","timestamp":"2014-11-13 227 | 14:24:34","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171824436","timestamp":"2014-11-13 228 | 14:23:43","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171824395","timestamp":"2014-11-13 229 | 14:23:09","user_agent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit\/537.36 230 | (KHTML, like Gecko) Chrome\/38.0.2125.111 Safari\/537.36","remote_addr":"89.202.154.170","payment_status":"","latitude":"47","longitude":"8","read":"1","data":{"":{"field":,"label":"Short 231 | Answer","type":"text","value":"manual test"}}},{"id":"171824379","timestamp":"2014-11-13 232 | 14:23:00","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171824066","timestamp":"2014-11-13 233 | 14:19:28","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171824009","timestamp":"2014-11-13 234 | 14:18:50","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171823163","timestamp":"2014-11-13 235 | 14:08:11","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171823107","timestamp":"2014-11-13 236 | 14:07:28","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171823092","timestamp":"2014-11-13 237 | 14:07:17","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171822918","timestamp":"2014-11-13 238 | 14:05:06","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171821406","timestamp":"2014-11-13 239 | 13:44:21","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":[]},{"id":"171821388","timestamp":"2014-11-13 240 | 13:44:07","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","latitude":null,"longitude":null,"read":"1","data":{"":{"field":,"label":"Short 241 | Answer","type":"text","value":"first = test2014-11-14 14:43:29 +0100-first\nlast 242 | = test2014-11-14 14:43:29 +0100-last\n"}}}],"total":"75","pages":1,"pretty_field_id":"28706107"}' 243 | http_version: 244 | recorded_at: Fri, 14 Nov 2014 15:12:38 GMT 245 | recorded_with: VCR 2.9.3 246 | -------------------------------------------------------------------------------- /spec/vcr/Formstack_API/_form_details/reads_a_form_name.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: https://www.formstack.com/api/v2/form/ 6 | body: 7 | encoding: US-ASCII 8 | string: '' 9 | headers: 10 | Authorization: 11 | - Bearer 12 | response: 13 | status: 14 | code: 200 15 | message: OK 16 | headers: 17 | Server: 18 | - nginx 19 | Date: 20 | - Wed, 05 Nov 2014 15:13:29 GMT 21 | Content-Type: 22 | - application/json 23 | Transfer-Encoding: 24 | - chunked 25 | Connection: 26 | - keep-alive 27 | P3p: 28 | - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI 29 | DSP COR" 30 | Set-Cookie: 31 | - FormstackAdmin=q3jc6e6ioo5i06l4ju64s85gv6; path=/api/; secure; HttpOnly 32 | Cache-Control: 33 | - no-cache 34 | body: 35 | encoding: UTF-8 36 | string: '{"id":"","name":"Test Form","viewkey":"ex3qBur1AS","views":"4","created":"2014-09-17 37 | 13:44:47","updated":"2014-11-05 09:37:02","deleted":"0","submissions":"0","submissions_unread":"0","submissions_today":0,"url":"http:\/\/www.formstack.com\/forms\/?-ex3qBur1AS","data_url":"","summary_url":"","rss_url":"","encrypted":false,"thumbnail_url":"https:\/\/s3.amazonaws.com\/files.formstack.com\/admin\/","submit_button_title":null,"inactive":false,"timezone":"US\/Eastern","permissions":"full","folder":"none","javascript":"