<commit_before># Fulcrum

Fulcrum API Gem

## Requirements

ruby 1.9.x

## Installation

Add this line to your application's Gemfile:

    gem 'fulcrum'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install fulcrum

## Configuration

    Fulcrum::Api.configure do |config|
      config.uri = 'http://web.fulcrumapp.com/api/v2'
      config.key = 'your_api_key'
    end

## Forms

    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)

## Records

    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)

## Photos

    Fulcrum::Photo.find(access_key, opts)
    # opts = { 'format' => 'json|image' }

    Fulcrum::Photo.thumbnail(access_key, opts)
    # opts = { 'format' => 'json|image' }

    Fulcrum::Photo.create(photo)
    # photo = { 'photo' => {  'access_key' => unique_key, 'file' => file } }

    Fulcrum::Photo.delete(access_key)


## Choice Lists<commit_msg>correct photo api section<commit_after># Fulcrum

Fulcrum API Gem

## Requirements

ruby 1.9.x

## Installation

Add this line to your application's Gemfile:

    gem 'fulcrum'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install fulcrum

## Configuration

    Fulcrum::Api.configure do |config|
      config.uri = 'http://web.fulcrumapp.com/api/v2'
      config.key = 'your_api_key'
    end

## Forms

    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)

## Records

    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)

## Photos

    Fulcrum::Photo.find(access_key, opts)
    # opts = { 'format' => 'json|image' }

    Fulcrum::Photo.thumbnail(access_key, opts)
    # opts = { 'format' => 'json|image' }

    Fulcrum::Photo.create(photo, content_type, unique_id, label)

    Fulcrum::Photo.delete(access_key)


## Choice Lists
{'fraction_non_alphanumeric': 0.16429699842022116, 'fraction_numerical': 0.0018957345971563982, 'mean_word_length': 2.846901579586877, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 32, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '844534', 'n_tokens_mistral': 1231, 'n_tokens_neox': 1180, 'n_words': 199}