mirror of
https://github.com/ihabunek/toot
synced 2025-01-25 00:39:45 +01:00
parent
5f2e5d6717
commit
44a30b44d8
@ -153,6 +153,14 @@ def unpin(app, user, status_id):
|
||||
return _status_action(app, user, status_id, 'unpin')
|
||||
|
||||
|
||||
def bookmark(app, user, status_id):
|
||||
return _status_action(app, user, status_id, 'bookmark')
|
||||
|
||||
|
||||
def unbookmark(app, user, status_id):
|
||||
return _status_action(app, user, status_id, 'unbookmark')
|
||||
|
||||
|
||||
def context(app, user, status_id):
|
||||
url = '/api/v1/statuses/{}/context'.format(status_id)
|
||||
|
||||
|
@ -164,6 +164,16 @@ def unpin(app, user, args):
|
||||
print_out("<green>✓ Status unpinned</green>")
|
||||
|
||||
|
||||
def bookmark(app, user, args):
|
||||
api.bookmark(app, user, args.status_id)
|
||||
print_out("<green>✓ Status bookmarked</green>")
|
||||
|
||||
|
||||
def unbookmark(app, user, args):
|
||||
api.unbookmark(app, user, args.status_id)
|
||||
print_out("<green>✓ Status unbookmarked</green>")
|
||||
|
||||
|
||||
def reblogged_by(app, user, args):
|
||||
for account in api.reblogged_by(app, user, args.status_id):
|
||||
print_out("{}\n @{}".format(account['display_name'], account['acct']))
|
||||
|
@ -410,6 +410,18 @@ STATUS_COMMANDS = [
|
||||
arguments=[status_id_arg],
|
||||
require_auth=True,
|
||||
),
|
||||
Command(
|
||||
name="bookmark",
|
||||
description="Bookmark a status",
|
||||
arguments=[status_id_arg],
|
||||
require_auth=True,
|
||||
),
|
||||
Command(
|
||||
name="unbookmark",
|
||||
description="Unbookmark a status",
|
||||
arguments=[status_id_arg],
|
||||
require_auth=True,
|
||||
),
|
||||
]
|
||||
|
||||
ACCOUNTS_COMMANDS = [
|
||||
|
Loading…
Reference in New Issue
Block a user