This repository has been archived by the owner on Nov 2, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
API Document
Draveness edited this page Jul 29, 2017
·
8 revisions
所有的接口都严格遵循 RESTful
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
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}