#!/usr/bin/env python
# -*- coding: utf-8 -*-

from flask_restful import Resource, reqparse
from flask_security import auth_token_required


"""
Parsers
=======
one can extend from another
"""
searchParser = reqparse.RequestParser()
searchParser.add_argument('age_range', type=list, required=False)
searchParser.add_argument('nationality', type=str, required=False)
searchParser.add_argument('teach_langs', type=list, required=True)
searchParser.add_argument('learn_langs', type=list, required=True)
searchParser.add_argument('has_bio', type=bool, required=False)


class SearchResource(Resource):
    @auth_token_required
    def post(self):
        # parse arguments
        args = searchParser.parse_args()


@@ -350,33 +350,50 @@
  required=False)
+ # list of string
 %0A
-
 searchParser.add
@@ -575,16 +575,93 @@
 False)%0A%0A
+# in database: teach_langs i want to teach ..., learn_langs is want to learn%0A
 %0Aclass S
@@ -756,16 +756,16 @@
 guments%0A
-
         
@@ -798,8 +798,115 @@
 args()%0A%0A
+        # response: list:%0A        # /users/%3Cuserid%3E get%0A        # 20 users per page%0A        # skip, limit%0A%0A

add some comments