mirror of
https://github.com/ihabunek/toot.git
synced 2024-09-22 04:25:55 -04:00
Upgrade to v2 search endpoint
This commit is contained in:
parent
35e03a13b1
commit
cf78cd20ac
@ -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()
|
||||
|
@ -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>")
|
||||
|
Loading…
Reference in New Issue
Block a user