コード例 #1
0
def getAllAnnouncements():
    if request.method == 'POST':
        return AnnouncementHandler().insertAnnouncement(request.form)
    else:
        if not request.args:
            return AnnouncementHandler().getAllAnnouncements()
        else:
            return AnnouncementHandler().searchAnnouncements(request.args)
コード例 #2
0
def getAnnouncementByID(a_id):
    if request.method == 'GET':
        return AnnouncementHandler().getAnnouncementByID(a_id)
    elif request.method == 'PUT':
        return AnnouncementHandler().putAnnouncementByID(request.form, a_id)
    elif request.method == 'DELETE':
        return AnnouncementHandler().deleteAnnouncementByID(a_id)
    else:
        return jsonify(Error="Method not allowed"), 405
コード例 #3
0
def getResourcestByAnnouncements():
    return AnnouncementHandler().getResourcesByAnnouncements()
コード例 #4
0
def getAllAvailableResources():
    if request.args:
        return AnnouncementHandler().searchAvailableResources(request.args)
    else:
        return AnnouncementHandler().getAllAvailableResources()
コード例 #5
0
def getAvailableAnnouncements():
    return AnnouncementHandler().getAvailableAnnouncements()
コード例 #6
0
def getSellerByAnnouncementId(a_id):
    return AnnouncementHandler().getSellerByAnnouncementId(a_id)
コード例 #7
0
def getResourcesByAnnouncementId(a_id):
    return AnnouncementHandler().getResourcesByAnnouncementId(a_id)