예제 #1
0
def get_books():
    start, count = paginate()
    q = request.args.get('q', '')
    books = Book.get_books(q, start, count)
    return jsonify(books)
예제 #2
0
파일: book.py 프로젝트: gcc-gm/FLASK_API
def recent():
    page = request.args.get('page', 1, type=int)
    books = Book.get_books(page)
    return books