switch to "api" branch before edit README.md
-
- 抽取本日人物
GET /human/daily - 用戶擁有的表演者清單
GET /human/list - 取得某表演者資料
GET /human/performer-id:
- 抽取本日人物
URL : /rest-auth/login/
Method : POST
Parameter :
username
password
Data constraints :
{
"key" : ""
}URL : /rest-auth/logout/
Method : POST
Data constraints :
Note :
ACCOUNT_LOGOUT_ON_GET = True to allow logout using GET - this is the exact same configuration from allauth. NOT recommended, see: http://django-allauth.readthedocs.io/en/latest/views.html#logout
URL : /rest-auth/password/reset/
Method : POST
Parameter :
Data constraints :
URL : /rest-auth/password/reset/confirm/
Method : POST
Parameter :
uid token new_password1 new_password2
Data constraints :
Note :
uid and token are sent in email after calling /rest-auth/password/reset/
URL : /rest-auth/password/change/
Method : POST
Parameter :
new_password1 new_password2 old_password
Data constraints :
Note :
OLD_PASSWORD_FIELD_ENABLED = True to use old_password.
LOGOUT_ON_PASSWORD_CHANGE = False to keep the user logged in after password change
URL : /rest-auth/user/
Method : GET, PUT, PATCH
Parameter :
username first_name last_name
Data constraints :
Returns pk, username, email, first_name, last_nameURL : /rest-auth/registration/
Method : POST
Parameter :
username password1 password2 email
Data constraints :
URL : /rest-auth/registration/verify-email/
Method : POST
Parameter :
key
Data constraints :
URL : /rest-auth/facebook/
Method : POST
Parameter :
access_token code
Data constraints :
Note :
access_token OR code can be used as standalone arguments, see https://github.com/Tivix/django-rest-auth/blob/master/rest_auth/registration/views.py
URL : /socail-auth/facebook/login/
Method : GET
URL : /users/self
Method : GET
Auth Require : YES
Data constraints :
{
"data":{
用戶資料
}
}URL : /users/user-id:
Method : GET
Auth Require : YES
Data constraints :
{
"data":{
用戶資料
}
}URL : /human/list
Method : GET
Auth Require : YES
Data constraints :
{
"data":{
表演者資料
}
}if 當天抽的人 == null:
抽一個人
把他加到表演者清單
更新當天狀態
return 當天表演者URL : /human/list
Method : GET
Auth Require : YES
Data constraints :
{
"data":[
{
表演者資料
},
{
表演者資料
}
]
}表演者清單 = client.db.col.find
return 表演者清單URL : /human/performer-id:
Method : GET
Auth Require : YES
Data constraints :
{
"data":{
表演者資料
}
}