Fulcrum API Gem
- Ruby 1.9
- Fulcrum user account
Add this line to your application's Gemfile:
gem 'fulcrum'
And then execute:
bundle
Or install it yourself as:
gem install fulcrum
Fulcrum::Api.configure do |config|
config.uri = 'https://api.fulcrumapp.com/api/v2'
config.key = 'your_api_key'
end
Fulcrum::Project.all(opts)
# opts = { 'page' => page_number,
# 'updated_since' => date_time }
Fulcrum::Form.all(opts)
# opts = { 'page' => page_number,
# 'schema' => true_or_false }
Fulcrum::Form.find(id, opts)
# opts = { 'include_foreign_elements' => true_or_false }
Fulcrum::Form.create(form)
# form = { 'form' => { ... } }
Fulcrum::Form.update(id, form)
# form = { 'form' => { ... } }
Fulcrum::Form.delete(id)
Fulcrum::Record.all(opts)
# opts = { 'page' => page_number,
# 'form_id' => form_id,
# 'bounding_box' => 'lat_bottom,lng_left,lat_top,lng_right',
# 'updated_since' => date_since_epoch_in_seconds }
Fulcrum::Record.find(id)
Fulcrum::Record.create(record)
# record = { 'record' => { ... } }
Fulcrum::Record.update(id, record)
# record = { 'record' => { ... } }
Fulcrum::Record.delete(id)
Fulcrum::Photo.find(access_key, opts)
# opts = { 'format' => 'json|jpg' }, defaults to 'json'
Fulcrum::Photo.thumbnail(access_key, opts)
# opts = { 'format' => 'json|jpg' }, defaults to 'json'
Fulcrum::Photo.create(photo, content_type, unique_id, label)
Fulcrum::Photo.delete(access_key)
Fulcrum::ChoiceList.all(opts)
# opts = { 'page' => page_number }
Fulcrum::ChoiceList.find(id)
Fulcrum::ChoiceList.create(choice_list)
# choice_list = { 'choice_list' => { ... } }
Fulcrum::ChoiceList.update(id, choice_list)
# choice_list = { 'choice_list' => { ... } }
Fulcrum::ChoiceList.delete(id)
Fulcrum::ClassificationSet.all(opts)
# opts = { 'page' => page_number }
Fulcrum::ClassificationSet.find(id)
Fulcrum::ClassificationSet.create(classification_set)
# classification_set = { 'classification_set' => { ... } }
Fulcrum::ClassificationSet.update(id, classification_set)
# classification_set = { 'classification_set' => { ... } }
Fulcrum::ClassificationSet.delete(id)
Fulcrum::Member.all(opts)
# opts = { 'page' => page_number }
Fulcrum::Member.find(id)
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request