Example #1
0
def get_external_books():
    request_args = request.args
    book_service = BookService()
    return book_service.get_books_by_external_api(request_args)
Example #2
0
def get_books():
    request_args = request.args
    book_service = BookService()
    return book_service.get_books(request_args)
Example #3
0
def delete(id):
    #add schema validation for validating json_request
    book_service = BookService()
    return book_service.delete(id)
Example #4
0
def update_book(id):
    request_json = request.get_json()
    book_service = BookService()
    return book_service.update_book(request_json, id)
Example #5
0
def post_book():
    request_json = request.get_json()
    book_service = BookService()
    return book_service.create_book(request_json)
Example #6
0
def get_book_by_id(id):
    book_service = BookService()
    return book_service.get_book_by_id(id)