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. ReadCoach now supports spanish, english and italian.
All you need to configure ReadCoach API is do:
bundle install
and have the secrets.yml available
To create the database just do:
rake db:setup
To run all test do:
rspec
git clone git@github.com:Waasi/readcoach-api.git
bundle install
heroku login
=> with respective credentialsheroku create
git push heroku master
heroku run rake db:migrate
heroku ps:scale web=1
http://readcoach.herokuapp.com
All request must include:
- Content-Type: application/json
- Accept: application/json
-
Method:
POST
-
Endpoint:
users/sign_in
-
Parameters:
{ email: email_here, password: password_here }
-
Response:
{ user: { name: name_here, email: email_here, password: password_here, password_confirmation: password_confirmation_here, age: age_here, language: 'es', token: 'atokenhere' } }
-
Method:
POST
-
Endpoint:
users
-
Parameters:
{ user: { name: name_here, email: email_here, password: password_here, password_confirmation: password_confirmation_here, age: age_here, language: 'es' } }
-
Response:
{ user: { name: name_here, email: email_here, password: password_here, password_confirmation: password_confirmation_here, age: age_here, language: 'es', token: 'atokenhere' } }
-
Method:
GET
-
Endpoint:
/training
-
Parameters:
{ email: email_here, token: token_here }
-
Response:
{ training: [{ word: word_here, image: image_url_here }, ....] }
** Response will be in the selected language
-
Method:
GET
-
Endpoint:
/test
-
Parameters:
{ email: email_here, token: token_here }
-
Response:
{ test: [ word_here, word_here, ....] }
** Response will be in the selected language
-
Method:
GET
-
Endpoint:
/training
-
Parameters:
{ email: email_here, token: token_here }
-
Response:
{ training: [ phrase_here, phrase_here, ....] }
** Response will be in the selected language
-
Method:
GET
-
Endpoint:
/test
-
Parameters:
{ email: email_here, token: token_here }
-
Response:
{ test: [ phrase_here, phrase_here, ....] }
** Response will be in the selected language
-
Method:
POST
-
Endpoint:
/results
-
Parameters:
{ email: email_here, token: token_here, words_read: word_count_here, phrase_count: phrase_count_here }
-
Response:
{ user: { name: name_here, email: email_here, password: password_here, password_confirmation: password_confirmation_here, age: age_here, language: 'es', evaluations: [ { id: id_here, user_id: user_id_here, words_read: words_read_here, phrase_read: phrase_read_here }, ... ] } }
-
Method:
GET
-
Endpoint:
/profile
-
Parameters:
{ email: email_here, token: token_here }
-
Response:
{ user: { name: name_here, email: email_here, password: password_here, password_confirmation: password_confirmation_here, age: age_here, language: 'es', evaluations: [ { id: id_here, user_id: user_id_here, words_read: words_read_here, phrase_read: phrase_read_here }, ... ] } }
- Fork it ( https://github.com/[my-github-username]/readcoach-api/fork )
- Create your feature branch (
git checkout -b feature/my_new_feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
- Jonah Ruiz (jonahoffline)
- Pedro Melendez (lazychino)