def get_lists(board_id): """ Purpose: Return All Lists Based on Board Args: board_id (string) """ trello_object = Trello() lists =\ trello_object.get_lists(board_id) return_payload = {'data': {'lists': lists}} return Response(json.dumps(return_payload), mimetype='application/json; charset=UTF-8')
def get_board_details(board_id): """ Purpose: Return All Board Details Based on Board Id Args: board_id (string) """ trello_object = Trello() board_details =\ trello_object.get_board_details(board_id) return_payload = {'data': {'board_details': board_details}} return Response(json.dumps(return_payload), mimetype='application/json; charset=UTF-8')
def get_boards(): """ Purpose: Return All Boards Available to Pull Args: N/A """ trello_object = Trello() available_boards =\ trello_object.get_boards() return_payload = {'data': {'available_boards': available_boards}} return Response(json.dumps(return_payload), mimetype='application/json; charset=UTF-8')
def get_cards(list_id): """ Purpose: Return All Cards Based on List ID Args: list_id (string) """ trello_object = Trello() cards =\ trello_object.get_cards( board_id=None, list_id=list_id) return_payload = {'data': {'cards': cards}} return Response(json.dumps(return_payload), mimetype='application/json; charset=UTF-8')
def test_endpoint(): """ """ trello_object = Trello() import pdb pdb.set_trace() return_payload = {} return Response(json.dumps(return_payload), mimetype='application/json; charset=UTF-8')