eicnam / Toggle-Play

Android Store Style Web Application, allowing the publication of Android Apps
1 stars 1 forks source link

API #41

Open blablanumerodeux opened 10 years ago

blablanumerodeux commented 10 years ago

I think it's a good idea to define what gonna do our API, like this : apifunctions

ghost commented 10 years ago

Applications

Routes (Done ?) HTTP Verb Description Comments
/api/application :+1: GET Get all apps Research will operate in this path
/api/application/:app_name :+1: GET Get an app thanks to its _appname
/api/application/add :+1: POST Add an app check if the details of the app are valids
/api/application/delete/:app_id :+1: DELETE Delete an app check if the current user is the owner of the app
/api/application/update/:app_id :+1: PUT Update the details of an app check if the current user is the owner of the app

User

Routes (Done ?) HTTP Verb Description Comments
/api/user/:user_name GET Get user profile thanks to its _username check if the _username corresponds to connected user (user cannot look at other user profile)
/api/user/create PUT Create an user check if user not already exists
/api/user/delete/user_id DELETE Delete an user check if user exists
/api/user/user_name/update POST Update the details of an user

Comment & Rate

Comment

Routes (Done ?) HTTP Verb Description Comments
api/application/:app_name/comments GET Get comments on App Get the X first comments (?)
api/application/:app_name/comments/add POST Add a comment Check if user is connected
api/application/:app_name/comments/delete DELETE Delete a comment Check if the connected user is the owner of the comment
api/application/:app_name/comments/update/:comment_id PUT Update a comment Check if the connected user is the owner of the comment

Rate

Routes (Done ?) HTTP Verb Description Comments
api/application/:app_name/rate GET Get average rate of App
api/application/:app_name/rate/add/:value POST Add a rate Check if user is connected
blablanumerodeux commented 10 years ago

:+1: