<commit_before>BitsOnTheRun
==============

BitsOnTheRun is an implementation of [bitsontherun.com](bitsontherun.com) API in Ruby.

## Install

    gem install bitsontherun

Gemfile:

    gem 'bitsontherun', :git => 'http://github.com/adriandulic/bitsontherun.git'

      or

    gem 'bitsontherun'

Setup:

    BitsOnTheRun::Configuration.key = "your api key"
    BitsOnTheRun::Configuration.secret = "your api secret"

## Usage

Basic:

    BitsOnTheRun::call('version') => {:status => "ok", :version => "X.X.X"}
    
    BitsOnTheRun::store('videos/create', 'video.mp4') => {:status => "ok", ...}
    
    BitsOnTheRun::call('videos/update', :video_key => 'your video key', :title => 'New title for video').ok? => true

Extended:

    call = BitsOnTheRun::API.new(:call)
    call.method('videos/list')<commit_msg>Updated readme for rails app<commit_after>BitsOnTheRun
==============

BitsOnTheRun is an implementation of [bitsontherun.com](bitsontherun.com) API in Ruby.

## Install

Gemfile:

    gem 'bitsontherun'

Run:

    bundle install

Add in _config/initializers/bitsontherun.rb_ file:

    # Bitsonthrun configuration
    BitsOnTheRun::Configuration.key = "your api key"
    BitsOnTheRun::Configuration.secret = "your api secret"

## Usage

Basic:

    BitsOnTheRun::call('version') => {:status => "ok", :version => "X.X.X"}
    
    BitsOnTheRun::store('videos/create', 'video.mp4') => {:status => "ok", ...}
    
    BitsOnTheRun::call('videos/update', :video_key => 'your video key', :title => 'New title for video').ok? => true

Extended:

    call = BitsOnTheRun::API.new(:call)
    call.method('videos/list')
{'fraction_non_alphanumeric': 0.17086662569145666, 'fraction_numerical': 0.001229256299938537, 'mean_word_length': 4.009230769230769, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 20, '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': '2511733', 'n_tokens_mistral': 590, 'n_tokens_neox': 549, 'n_words': 117}