예제 #1
0
def getTrends():
    if request.method == 'GET':
        return HashtagHandler().getTrendingTopics()
    else:
        return jsonify(Error="Method not allowed."), 405
예제 #2
0
def getHashtags():
    if request.method == 'POST':
        return HashtagHandler().insertHashtagJson(request.json)
    else:
        return HashtagHandler().getAllHashtags()
예제 #3
0
def deleteHashtag(hashtag_id):
    if request.method == 'DELETE':
        return HashtagHandler().deleteHashtag(hashtag_id)
예제 #4
0
def updateHashtag(hashtag_id, hashtag_text):
    if request.method == 'PUT':
        return HashtagHandler().updateHashtag(hashtag_id, hashtag_text)
예제 #5
0
def createHashtag(hashtag_text):
    if request.method == 'POST':
        return HashtagHandler().createHashtag(hashtag_text)
예제 #6
0
def getHashtagText(hashtag_id):
    if request.method == 'GET':
        return HashtagHandler().getHashtagText(hashtag_id)
예제 #7
0
def getAllHashtags():
    if request.method == 'GET':
        return HashtagHandler().getAllHashtags()