Blocking

blocks.create(server_url, *, user_id=None, screen_name=None, username='', password='', oauth={})

Blocks the specified user from following the authenticating user. In addition the blocked user will not show in the authenticating users mentions or timeline (unless repeated by another user). If a follow or friend relationship exists it is destroyed.

Parameters:
  • server_url (str) – URL of the server
  • user_id (int) – (optional) the ID of the user to block
  • screen_name (str) – (optional) the handle of the user to block
  • username (str) – (optional) name of the authenticating user
  • password (str) – (optional) password of the authenticating user
  • oauth (dict) – (optional) OAuth dict
Return type:

dict

Returns:

User dict

blocks.destroy(server_url, *, user_id=None, screen_name=None, username='', password='', oauth={})

Un-blocks the specified user from following the authenticating user. If relationships existed before the block was instated, they will not be restored.

Parameters:
  • server_url (str) – URL of the server
  • user_id (int) – (optional) the ID of the user to un-block
  • screen_name (str) – (optional) the handle of the user to un-block
  • username (str) – (optional) name of the authenticating user
  • password (str) – (optional) password of the authenticating user
  • oauth (dict) – (optional) OAuth dict
Return type:

dict

Returns:

User dict