From 4d49e93d8cac6bad758a29a8d85ed7bbccc35a65 Mon Sep 17 00:00:00 2001 From: aranzaiger Date: Mon, 15 Jun 2015 19:06:45 +0300 Subject: [PATCH] added documentation --- SE_API/UserRoutes.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/SE_API/UserRoutes.py b/SE_API/UserRoutes.py index ddb5202..e487f2a 100644 --- a/SE_API/UserRoutes.py +++ b/SE_API/UserRoutes.py @@ -29,11 +29,11 @@ auto = Autodoc() @user_routes.route('/api/users/getUserByToken/', methods=["GET"]) @auto.doc() def getUserByToken(token): - ''' - This Function is will Activate a user and add tha campus to it + """ + >This Call will return a user by a given token
Route Parameters
- - validation_token: 'seToken|email_suffix' + - seToken: 'seToken'

Payload
@@ -45,20 +45,20 @@ def getUserByToken(token): 200 - JSON Example:
{
- 'username' : 'github_username',
- 'name' : 'Bob Dylan',
- 'email' : 'email@domain.com',
- 'isLecturer' : true,
- 'seToken' : 'dds2d-sfvvsf-qqq-fdf33-sfaa',
- 'avatar_url' : 'http://location.domain.com/image.jpg',
- 'isFirstLogin' : false,
- 'campuses_id_list': ['22314','243512',...,'356'],
- 'classes_id_list': ['22314','243512',...,'356']
+ 'username': 'DarkLord',
+ 'name': 'Darth Vader',
+ 'email': 'darkLord@death.planet,
+ 'isLecturer': 'True',
+ 'seToken': 'xxxxxx-xxxxx-xxxxx-xxxxxx',
+ 'avatar_url': 'http://location.git.com/somthing'
+ 'isFirstLogin': False,
+ 'campuses_id_list': ['JCA','JCB','JCC'],
+ 'classes_id_list': ['a','b','c']
}

- 403 - Invalid Token - ''' + 403 - No User Found + """ query = User.all() query.filter("seToken = ", token)