<commit_before># ReadCoach API
### About ReadCoach

This is an API created to serve data to ReadCoach Front End EmberJS APP. ReadCoach
is a web app designed to help people learning to read or people that want to improve
their reading skills. The user can practice all he/she desires and then put their skills
to the test and see their improvement over time.

### Configuration

All you need to configure ReadCoach API is do:

```ruby
bundle install
```
and have the secrets.yml available

### Database creation

To create the database just do:

```ruby
rake db:setup
```

### Tests Suite

To run all test do:

```ruby
rspec
```

### Deployment

- ```git clone <EMAIL>.com:Waasi/readcoach-api.git```
- ```bundle install```
- ```heroku login``` => with respective credentials
- ```heroku create```
- ```git push heroku master```
- ```heroku run rake db:migrate```
- ```heroku ps:scale web=1```

## Access to the ReadCoach API

## Endpoints

##### Sign In
- Method: ```POST```

- Endpoint: ```users/sign_in```

- Parameters: ```{ email: email_here, password: <PASSWORD> }```

- Response: ```{ user: { name: name_here, email: email_here, password: <PASSWORD>, password_confirmation: <PASSWORD>, age: age_here, language: 'es', token: 'ato<PASSWORD>' } }```

##### Sign Up
- Method: ```POST```

- Endpoint: ```users```

- Parameters: ```{ user: { name: name_here, email: email_here, password: <PASSWORD>, password_confirmation: <PASSWORD>, age: age_here, language: 'es' } }```

- Response: ```{ user: { name: name_here, email: email_here, password: <PASSWORD>, password_confirmation: <PASSWORD>, age: age_here, language: 'es', token: 'ato<PASSWORD>' } }```

##### Training
- Method: ```GET```

- Endpoint: ```/training```

- Parameters: ```{ email: email_here, token: token_here }```<commit_msg>Final touches to documentation<commit_after># ReadCoach API
### About ReadCoach

This is an API created to serve data to ReadCoach Front End EmberJS APP. ReadCoach
is a web app designed to help people learning to read or people that want to improve
their reading skills. The user can practice all he/she desires and then put their skills
to the test and see their improvement over time.

### Configuration

All you need to configure ReadCoach API is do:

```ruby
bundle install
```
and have the secrets.yml available

### Database creation

To create the database just do:

```ruby
rake db:setup
```

### Tests Suite

To run all test do:

```ruby
rspec
```

### Deployment

- ```git clone <EMAIL>:Waasi/readcoach-api.git```
- ```bundle install```
- ```heroku login``` => with respective credentials
- ```heroku create```
- ```git push heroku master```
- ```heroku run rake db:migrate```
- ```heroku ps:scale web=1```

## Access to the ReadCoach API

http://readcoach.herokuapp.com

All request must include:

- Content-Type: application/json
- Accept: application/json

## Endpoints

##### Sign In
- Method: ```POST```

- Endpoint: ```users/sign_in```

- Parameters: ```{ email: email_here, password: <PASSWORD> }```

- Response: ```{ user: { name: name_here, email: email_here, password: <PASSWORD>, password_confirmation: <PASSWORD>, age: age_here, language: 'es', token: '<PASSWORD>' } }```

##### Sign Up
- Method: ```POST```

- Endpoint: ```users```

- Parameters: ```{ user: { name: name_here, email: email_here, password: <PASSWORD>, password_confirmation: <PASSWORD>, age: age_here, language: 'es' } }```

- Response: ```{ user: { name: name_here, email: email_here, password: <PASSWORD>, password_confirmation: <PASSWORD>, age: age_here, language: 'es', token: '<PASSWORD>' } }```

##### Training
- Method: ```GET```

- Endpoint: ```/training```

- Parameters: ```{ email: email_here, token: token_here }```
{'fraction_non_alphanumeric': 0.16842105263157894, 'fraction_numerical': 0.0005398110661268556, 'mean_word_length': 4.863924050632911, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 25, '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': '3239607', 'n_tokens_mistral': 1205, 'n_tokens_neox': 1174, 'n_words': 416}