Friendships

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

Subscribe to status updates from specified user.

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

dict

Returns:

User dict

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

Unsubscribe to status updates from specified user.

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

dict

Returns:

User dict

friendships.exists(server_url, source_user, target_user, *, username='', password='', oauth={})

Shows if source_user follows target_user.

Parameters:
  • server_url (str) – URL of the server
  • source_user (int or str) – User that is following. Can be an ID or handle
  • target_user (int or str) – User that is followed. Can be an ID or handle
  • username (str) – (optional) name of the authenticating user
  • password (str) – (optional) password of the authenticating user
  • oauth (dict) – (optional) OAuth dict
Return type:

bool

Returns:

True if source_user follows target_user. False otherwise.

friendships.show(server_url, *, source_id=None, source_screen_name=None, target_id=None, target_screen_name=None, username='', password='', oauth={})

Returns detailed information about the relationship between two users.

Parameters:
  • server_url (str) – URL of the server
  • source_id (int) – (optional) ID of the subject user
  • source_screen_name (str) – (optional) handle of the subject user
  • target_id (int) – (optional) ID of the target user
  • target_screen_name (str) – (optional) handle of the target user
  • 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:

Relationship dict