-
To create new User using API
curl -v -H “Accept: application/json” -H “Content-type: application/json” -X POST -d ‘ {“user”:{“email”:“[email protected]”,“password”:“password”,“password_confirmation”:“password”}}’ localhost:3000/api/v1/users
-
Login Using API curl -X POST -H “Content-type: application/json” -d ‘{“email”:“[email protected]”,“password”:“password”}’ localhost:3000/api/v1/sessions
-
To create new Player
curl -v -H “Accept: application/json” -H “Content-type: application/json” -X POST -d ‘{“player”:{“first_name”:“ffffff”,“last_name”:“lllll”,“age”:“22”,“user_attributes”:{“email”:“[email protected]”,“password”:“password”,“password_confirmation”:“password”}},“sports”:}’ localhost:3000/api/v1/players
-
To update Player
curl -X PUT -H “Content-type: application/json” -H “token:<auth_token>” -d ‘{“player”:{“first_name”:“firstname”,“last_name”:“lastname”,“age”:“33”},“sports”:}’ localhost:3000/api/v1/players/4
-
Get All Players
curl -X GET -H “Content-type: application/json” localhost:3000/api/v1/players
-
Destroy a player recored.
curl -X DELETE localhost:3000/api/v1/players/<id>