コード例 #1
0
def delete_all_reservations_for_user(user_id):
    reservation_api = ReservationApi()
    response = reservation_api.delete_all_reservations_for_users(user_id)
    return app_response(response)
コード例 #2
0
def delete_all_reservations_for_book(book_id):
    reservation_api = ReservationApi()
    response = reservation_api.delete_all_reservation_for_book(book_id)
    return app_response(response)
コード例 #3
0
def update_reservation_for_user_and_book(user_id, book_id):
    reservation = request.get_json(force=True)
    reservation_api = ReservationApi()
    response = reservation_api.update_reservation(
        user_id=user_id, book_id=book_id, reservation_payload=reservation)
    return app_response(response)
コード例 #4
0
def delete_reservation_for_user_and_book(user_id, book_id):
    reservation_api = ReservationApi()
    response = reservation_api.delete_reservation(user_id, book_id)
    return app_response(response)
コード例 #5
0
def get_reservation_by_user_id_and_book_id(user_id, book_id):
    reservation_api = ReservationApi()
    response = reservation_api.get_reservation_by_user_id_and_book_id(
        user_id=user_id, book_id=book_id)
    return app_response(response)
コード例 #6
0
def get_reservation_for_book(book_id):
    reservation_api = ReservationApi()
    response = reservation_api.get_reservation_by_book_id(book_id)
    return app_response(response)
コード例 #7
0
def get_reservation_for_user(user_id):
    reservation_api = ReservationApi()
    response = reservation_api.get_reservation_by_user_id(user_id)
    return app_response(response)
コード例 #8
0
def add_reservation():
    reservation = request.get_json(force=True)
    reservation_api = ReservationApi()
    response = reservation_api.add_reservation(reservation)
    return app_response(response)
コード例 #9
0
def get_reservations():
    reservation_api = ReservationApi()
    response = reservation_api.get_reservations()
    return app_response(response)