Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User Module API #2

Open
hayespan opened this issue Mar 4, 2015 · 0 comments
Open

User Module API #2

hayespan opened this issue Mar 4, 2015 · 0 comments

Comments

@hayespan
Copy link
Owner

hayespan commented Mar 4, 2015

user

id
(use `session` to store default location information)

3.1 create_user

POST /user/choose_location


input:
building_id

ouput:
{
'code': 0,
'data': {'_csrf_token': 'xxx'} // 写localstorage,伴随着用户终身
}

0
1
-1 Building does not exist.

3.2 get_user_location_Info

POST /user/location_info


input:
csrf_token: str
ouput:
{
'code': 0,
'data': {
'school': {'id': x, 'name': 'xxx'}, 
'building': {'id': x, 'name': 'xxx'}}
}

0
1
2
-1 Location info does not exist.
-3 User should choose location to init account.

3.3 get_contact_info

POST /user/contact_info


input:
csrf_token: str
ouput:
{
'code': 0,
'data': {'name': 'xxx', 'phone':'xxx', 'addr': 'xxx'}
}

0
1
2
-2
-4 Contact info does not exist.
@hayespan hayespan mentioned this issue Mar 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant