This is an application where you can manage users and create pets for an epic combat between them.
Visit http://localhost:3000/admin for manage users
First time could be necessary create an Admin:
rails c
AdminUser.create!(:email => '[email protected]', :password => 'password', :password_confirmation => 'password')
Type | URL | Params | Explanation |
---|---|---|---|
POST | /api/pets |
name,age,gender,kind | Create a pet |
GET | /api/pets/:id |
:id | Returns a pet by id |
PUT | /api/pets/:id |
name,age,gender,kind | Update a pet |
DELETE | /api/pets/:id |
:id | Delete a pet by id |
POST | /api/combat |
pet1_id,pet2_id,datetime | Create a combat |
POST, PUT and DELETE methods need an additional parameter access_token
which is the token generated by system first time an user is registered. You can display its value from Active Admin
All test runs with: rake test
It is pending to create a batch process that determines the result of the fighting and update ratios pets.