tomekbielaszewski / Ogame

Ogame clone created for coding practice
0 stars 1 forks source link

REST API implementation #22

Open tomekbielaszewski opened 8 years ago

tomekbielaszewski commented 8 years ago

When implementing - keep in mind that building list is fetched per planet not per user.

Endpoints:

GET /{planet_id}/

returns planet object with building list

POST /login

user logs in with credentials. { login: string, pass: string }

GET /logout

logs out user

PUT /players

updates user - changes password { login: string, pass: string } where login act as an ID and pass is a new password

tomekbielaszewski commented 8 years ago

Basic API providing planet resource is commited 9e9c340ad5809ead753638856807a39be74a06bb

tomekbielaszewski commented 8 years ago

PUT /players is possible only when user is logged in so there is no need to have login in request model. Just old pass and new pass.