商城系统RESTful API设计
接口设计
我认为一个好的接口,就算是单独取出其中一个来看,也能明白它的用途
通用接口
POST /api/v1/tokens/ DELETE /api/v1/tokens/:id/ GET /api/v1/search/
客人模式接口
POST /api/v1/users/ GET /api/v1/guest/goods/ GET /api/v1/guest/goods/:id/ GET /api/v1/guest/goods/:id/comments/ GET /api/v1/guest/goods/:id/comments/:id/
用户模式接口
GET /api/v1/users/me/ PATCH /api/v1/users/me/ PUT /api/v1/users/me/password/ GET /api/v1/user/goods/ GET /api/v1/user/goods/:id/ GET /api/v1/user/goods/:id/comments/ GET /api/v1/user/goods/:id/comments/:id/ POST /api/v1/user/orders/ GET /api/v1/user/orders/ GET /api/v1/user/orders/:id/ POST /api/v1/shopping_cart/goods/ GET /api/v1/shopping_cart/goods/ DELETE /api/v1/shopping_cart/goods/:id/ PATCH /api/v1/shopping_cart/goods/:id/
后台模式接口
GET /api/v1/admin/users/ GET /api/v1/admin/users/:id/ PATCH /api/v1/admin/users/:id/ GET /api/v1/admin/users/me/ PATCH /api/v1/admin/users/me/ PUT /api/v1/admin/users/me/password/ GET /api/v1/admin/goods/ GET /api/v1/admin/goods/:id/ POST /api/v1/admin/goods/ PUT /api/v1/admin/goods/:id/ PATCH /api/v1/admin/goods/:id/ DELETE /api/v1/admin/goods/:id/ GET /api/v1/admin/orders/ GET /api/v1/admin/orders/:id/
相关推荐
Eiceblue 2020-08-02
ahnjwj 2020-07-28
playis 2020-06-28
playis 2020-06-16
ahnjwj 2020-06-12
84560296 2020-06-10
84560296 2020-06-09
84560296 2020-06-08
84560296 2020-05-30
81901836 2020-05-26
beibeijia 2020-05-16
85291545 2020-05-01
84560296 2020-04-10
fanix 2020-04-09
bapinggaitianli 2020-04-07
84560296 2020-03-27
85291545 2020-03-26
82911731 2020-03-25