Beispiel #1
0
def add_api_resource(plural_name, resource, list_resource):
    prefix = get_prefix(plural_name)
    api.add_resource(list_resource, prefix)
    api.add_resource(resource, '%s/<string:_id>' % prefix)
Beispiel #2
0
def add_task_resource(plural_name, resource):
    prefix = get_prefix(plural_name)
    api.add_resource(resource, '%s/<string:object_id>/tasks' % prefix,
                     endpoint=plural_name)
Beispiel #3
0
def add_tasks_resource(resource):
    api.add_resource(resource, get_prefix('tasks'))
Beispiel #4
0
def add_api_resource(plural_name, resource, list_resource):
    prefix = get_prefix(plural_name)
    api.add_resource(list_resource, prefix)
    api.add_resource(resource, '%s/<string:_id>' % prefix)
Beispiel #5
0
def add_task_resource(plural_name, resource):
    prefix = get_prefix(plural_name)
    api.add_resource(resource,
                     '%s/<string:object_id>/tasks' % prefix,
                     endpoint=plural_name)
Beispiel #6
0
def add_tasks_resource(resource):
    api.add_resource(resource, get_prefix('tasks'))