- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1
 
Url Desgin
        haides99 edited this page Apr 15, 2013 
        ·
        7 revisions
      
    Resource url are like above, all urls will return json format data
| Uri | Mothod | Function | Parameters | 
/category | 
  GET | 
  list all categories | 
   | 
 
 | 
  PUT | 
  unused | 
   | 
 
 | 
  POST | 
  create a new category | 
   | 
 
 | 
  DELETE | 
  unused | 
   | 
 
/category/{id} | 
  GET | 
  get a category's info | 
   | 
 
 | 
  PUT | 
  update a category's info | 
   | 
 
 | 
  POST | 
  unused | 
   | 
 
 | 
  DELETE | 
  delete a category | 
   | 
 
/category/{id}/{num1}/{num2} | 
  GET | 
  list topics in category {id}, offset num1, num2 | 
   | 
 
 | 
  PUT | 
  unused | 
   | 
 
 | 
  POST | 
  unused | 
   | 
 
 | 
  DELETE | 
  unused | 
   | 
 
/topic | 
  GET | 
  list top topics in erery category | 
   | 
 
 | 
  PUT | 
  unused | 
   | 
 
 | 
  POST | 
  create a topic | 
   | 
 
 | 
  DELETE | 
  unused | 
   | 
 
/topic/{id} | 
  GET | 
  unused | 
   | 
 
 | 
  PUT | 
  update a topic | 
   | 
 
 | 
  POST | 
  unused | 
   | 
 
 | 
  DELETE | 
  delete a topic | 
   | 
 
/topic/{id}/{num1}/{num2}/ | 
  GET | 
  get posts in topic {id}, offset num1, num2 | 
   | 
 
 | 
  PUT | 
  unused | 
   | 
 
 | 
  POST | 
  unused | 
   | 
 
 | 
  DELETE | 
  unused | 
   | 
 
/post | 
  GET | 
  unused | 
   | 
 
 | 
  PUT | 
  unused | 
   | 
 
 | 
  POST | 
  create a post | 
   | 
 
 | 
  DELETE | 
  unused | 
   | 
 
/post/{id} | 
  GET | 
  unused | 
   | 
 
 | 
  PUT | 
  update a post | 
   | 
 
 | 
  POST | 
  unused | 
   | 
 
 | 
  DELETE | 
  delete a post | 
   | 
 
/user | 
  GET | 
  unused | 
   | 
 
 | 
  PUT | 
  unused | 
   | 
 
 | 
  POST | 
  create a user | 
   | 
 
 | 
  DELETE | 
  unused | 
   | 
 
/user/{id} | 
  GET | 
  get user info of {id} | 
   | 
 
 | 
  PUT | 
  update a user's info | 
   | 
 
 | 
  POST | 
  unused | 
   | 
 
 | 
  DELETE | 
  delete a user | 
   |