Upgrade to v2 search endpoint

This commit is contained in:
Ivan Habunek 2019-09-22 13:04:58 +02:00
parent 35e03a13b1
commit cf78cd20ac
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95
2 changed files with 2 additions and 2 deletions

View File

@ -210,7 +210,7 @@ def upload_media(app, user, file):
def search(app, user, query, resolve):
return http.get(app, user, '/api/v1/search', {
return http.get(app, user, '/api/v2/search', {
'q': query,
'resolve': resolve,
}).json()

View File

@ -141,7 +141,7 @@ def print_search_results(results):
if hashtags:
print_out("\nHashtags:")
print_out(", ".join(["<green>#{}</green>".format(t) for t in hashtags]))
print_out(", ".join(["<green>#{}</green>".format(t["name"]) for t in hashtags]))
if not accounts and not hashtags:
print_out("<yellow>Nothing found</yellow>")