Exemple #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)
Exemple #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
Exemple #3
0
def getResourcestByAnnouncements():
    return AnnouncementHandler().getResourcesByAnnouncements()
Exemple #4
0
def getAllAvailableResources():
    if request.args:
        return AnnouncementHandler().searchAvailableResources(request.args)
    else:
        return AnnouncementHandler().getAllAvailableResources()
Exemple #5
0
def getAvailableAnnouncements():
    return AnnouncementHandler().getAvailableAnnouncements()
Exemple #6
0
def getSellerByAnnouncementId(a_id):
    return AnnouncementHandler().getSellerByAnnouncementId(a_id)
Exemple #7
0
def getResourcesByAnnouncementId(a_id):
    return AnnouncementHandler().getResourcesByAnnouncementId(a_id)