You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 2, 2018. It is now read-only.
Draveness edited this page Jul 29, 2017
·
8 revisions
所有的接口都严格遵循 RESTful
User
users POST /api/users(.:format) users#create
user GET /api/users/:id(.:format) users#show
PATCH /api/users/:id(.:format) users#update
PUT /api/users/:id(.:format) users#update
{"id"=>1,
"avatar"=>nil,
"nickname"=>"jeyca",
"wechat"=>"frederick",
"name"=>"Miss Molly Kilback",
"gender"=>"male", // female, male
"school"=>" Technical College",
"grade"=>"Freshman",
"major"=>"Master of Business",
"completed"=>true,
"created_at"=>Sat, 29 Jul 2017 06:48:46 UTC +00:00,
"updated_at"=>Sat, 29 Jul 2017 06:48:46 UTC +00:00,
"mobile"=>"35575214995", // 13 位
"admin"=>false
}
不可修改参数 id wechat completed created_at updated_at admin
Tag
tags GET /api/tags(.:format) tags#index
POST /api/tags(.:format) tags#create
tag GET /api/tags/:id(.:format) tags#show
PATCH /api/tags/:id(.:format) tags#update
PUT /api/tags/:id(.:format) tags#update
{"id"=>1,
"name"=>"ntbvwq7cad",
"created_at"=>Sat, 29 Jul 2017 06:50:59 UTC +00:00,
"updated_at"=>Sat, 29 Jul 2017 06:50:59 UTC +00:00}