added documentation

This commit is contained in:
Aran Zaiger 2015-06-15 19:06:45 +03:00
parent 7f1b912b36
commit 4d49e93d8c

View file

@ -29,11 +29,11 @@ auto = Autodoc()
@user_routes.route('/api/users/getUserByToken/<string:token>', methods=["GET"]) @user_routes.route('/api/users/getUserByToken/<string:token>', methods=["GET"])
@auto.doc() @auto.doc()
def getUserByToken(token): def getUserByToken(token):
''' """
<span class="card-title">This Function is will Activate a user and add tha campus to it</span> <span class="card-title">>This Call will return a user by a given token</span>
<br> <br>
<b>Route Parameters</b><br> <b>Route Parameters</b><br>
- validation_token: 'seToken|email_suffix' - seToken: 'seToken'
<br> <br>
<br> <br>
<b>Payload</b><br> <b>Payload</b><br>
@ -45,20 +45,20 @@ def getUserByToken(token):
200 - JSON Example:<br> 200 - JSON Example:<br>
<code> <code>
{<br> {<br>
'username' : 'github_username',<br> 'username': 'DarkLord',<br>
'name' : 'Bob Dylan',<br> 'name': 'Darth Vader',<br>
'email' : 'email@domain.com',<br> 'email': 'darkLord@death.planet,<br>
'isLecturer' : true,<br> 'isLecturer': 'True',<br>
'seToken' : 'dds2d-sfvvsf-qqq-fdf33-sfaa',<br> 'seToken': 'xxxxxx-xxxxx-xxxxx-xxxxxx',<br>
'avatar_url' : 'http://location.domain.com/image.jpg',<br> 'avatar_url': 'http://location.git.com/somthing'<br>
'isFirstLogin' : false,<br> 'isFirstLogin': False,<br>
'campuses_id_list': ['22314','243512',...,'356'],<br> 'campuses_id_list': ['JCA','JCB','JCC'],<br>
'classes_id_list': ['22314','243512',...,'356']<br> 'classes_id_list': ['a','b','c']<br>
} }
</code> </code>
<br> <br>
403 - Invalid Token 403 - No User Found
''' """
query = User.all() query = User.all()
query.filter("seToken = ", token) query.filter("seToken = ", token)