<commit_before># Liverail API

## Purpose

This provides a gem client library to use the Liverail API.

[Liverail]: http://liverail.com/

Created by <NAME>.

## Installation

edit your Gemfile
```ruby
gem 'liverails_api', '~> 0.0.3'
```
install gem
```ruby
bundle install
```

update gem
```ruby
bundle update live-rails-api
```

## Demo

manual authentication
```ruby
require('liverails_api');
response = LiverailsApi.instance.login "username","password"
response = LiverailsApi.instance.partner_list
```

ENV authentication (automatic login)
```
export LIVE_RAIL_USERNAME=<EMAIL>
export LIVE_RAIL_PASSWORD=<PASSWORD>
```
```ruby
require('liverails_api');
response = LiverailsApi.instance.partner_list
```

## API

### All endpoints exposed by http://test.api.liverail.com/
Replace the route / with _ to get your method name.
like: "/partner/add" => LiverailsApi.instance.partner_add
Args need to be a HASH like LiverailsApi.instance.partner_list { name:"my_partner_name" }
<commit_msg>edit README<commit_after># Liverail API

## Purpose

This provides a gem client library to use the Liverail API.

[Liverail]: http://liverail.com/

Created by <NAME>.

## Installation

edit your Gemfile
```ruby
gem 'liverails_api', '~> 0.0.3'
```
install gem
```ruby
bundle install
```

update gem
```ruby
bundle update live-rails-api
```

## Demo

manual authentication
```ruby
require('liverails_api');
response = LiverailsApi.instance.login "username","password"
response = LiverailsApi.instance.partner_list
```

ENV authentication (automatic login)
```
export LIVE_RAIL_USERNAME=<EMAIL>
export LIVE_RAIL_PASSWORD=myaccountpassword
```
```ruby
require('liverails_api');
LiverailsApi.instance.login
response = LiverailsApi.instance.partner_list
```

## API

### All endpoints exposed by http://test.api.liverail.com/
Replace the route / with _ to get your method name.
like: "/partner/add" => LiverailsApi.instance.partner_add
Args need to be a HASH like LiverailsApi.instance.partner_list { name:"my_partner_name" }

{'fraction_non_alphanumeric': 0.13054309915296464, 'fraction_numerical': 0.0029895366218236174, 'mean_word_length': 5.54071661237785, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 12, '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': '3154351', 'n_tokens_mistral': 691, 'n_tokens_neox': 644, 'n_words': 178}