Groups

groups.timeline(server_url, *, id=None, nickname=None, since_id=None, max_id=None, count=20, username='', password='', oauth={})

Shows a group’s timeline. Similar to other timeline resources.

Parameters:
  • server_url (str) – URL of the server
  • id (int) – (optional) ID of the group for which to return results for
  • nickname (str) – (optional) handle of the group for which to return results for
  • since_id (int) – (optional) returns statuses with an ID greater than (that is, more recent than) the specified ID
  • max_id (int) – (optional) returns statuses with an ID less than (that is, older than) or equal to the specified ID
  • count (int) – (optional) number of statuses to try and retrieve
  • username (str) – (optional) name of the authenticating user
  • password (str) – (optional) password of the authenticating user
  • oauth (dict) – (optional) OAuth dict
Return type:

list

Returns:

a list of status dicts

groups.join(server_url, *, id=None, nickname=None, username='', password='', oauth={})

Join a group.

Parameters:
  • server_url (str) – URL of the server
  • id (int) – (optional) ID of the group for which to return results for
  • nickname (str) – (optional) handle of the group for which to return results for
  • 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:

Group dict

groups.leave(server_url, *, id=None, nickname=None, username='', password='', oauth={})

Leave a group.

Parameters:
  • server_url (str) – URL of the server
  • id (int) – (optional) ID of the group for which to return results for
  • nickname (str) – (optional) handle of the group for which to return results for
  • 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:

Group dict

groups.create(server_url, nickname, *, full_name=None, homepage=None, location=None, description=None, aliases=None, username='', password='', oauth={})

Create a new group.

Parameters:
  • server_url (str) – URL of the server
  • nickname (str) – name of the new group
  • full_name (str) – (optional) full name associated with the group
  • homepage (str) – (optional) home page URL associated with the group
  • location (str) – (optional) The city or country describing where the group is located. The contents are not normalized or geocoded in any way
  • description (str) – (optional) A description of the group
  • aliases (list[str]) – (optional) aliases that group has
  • 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:

Group dict

groups.show(server_url, *, id=None, nickname=None, username='', password='', oauth={})

Returns details about the group.

Parameters:
  • server_url (str) – URL of the server
  • id (int) – (optional) ID of the group for which to return results for
  • nickname (str) – (optional) handle of the group for which to return results for
  • 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:

Group dict

groups.list_all(server_url, *, count=20, username='', password='', oauth={})

List all local groups.

Parameters:
  • server_url (str) – URL of the server
  • count (int) – (optional) number of groups to try and retrieve
  • username (str) – (optional) name of the authenticating user
  • password (str) – (optional) password of the authenticating user
  • oauth (dict) – (optional) OAuth dict
Return type:

list

Returns:

a list of group dicts

groups.user_groups(server_url, *, user_id=None, screen_name=None, count=20, username='', password='', oauth={})

Show the groups a given user is a member of.

Parameters:
  • server_url (str) – URL of the server
  • user_id (int) – (optional) ID of the user for whom to return results for
  • screen_name (str) – (optional) handle of the user for whom to return results for
  • count (int) – (optional) number of groups to try and retrieve
  • username (str) – (optional) name of the authenticating user
  • password (str) – (optional) password of the authenticating user
  • oauth (dict) – (optional) OAuth dict
Return type:

list

Returns:

a list of group dicts

groups.members(server_url, *, id=None, nickname=None, count=20, username='', password='', oauth={})

List the members of a given group.

Parameters:
  • server_url (str) – URL of the server
  • id (int) – (optional) ID of the group for which to return results for
  • nickname (str) – (optional) handle of the group for which to return results for
  • count (int) – (optional) number of users to try and retrieve
  • username (str) – (optional) name of the authenticating user
  • password (str) – (optional) password of the authenticating user
  • oauth (dict) – (optional) OAuth dict
Return type:

list

Returns:

a list of user dicts

groups.is_member(server_url, *, user_id=None, screen_name=None, group_id=None, group_name=None, username='', password='', oauth={})
Parameters:
  • server_url (str) – URL of the server
  • user_id (int) – (optional) ID of the user for whom to return results for
  • screen_name (str) – (optional) handle of the user for whom to return results for
  • group_id (int) – (optional) ID of the group for which to return results for
  • group_name (str) – (optional) handle of the group for which to return results for
  • 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 the user is a member of the group, False otherwise

groups.admins(server_url, *, id=None, nickname=None, count=20, username='', password='', oauth={})

List the admins of a given group.

Parameters:
  • server_url (str) – URL of the server
  • id (int) – (optional) ID of the group for which to return results for
  • nickname (str) – (optional) handle of the group for which to return results for
  • count (int) – (optional) number of users to try and retrieve
  • username (str) – (optional) name of the authenticating user
  • password (str) – (optional) password of the authenticating user
  • oauth (dict) – (optional) OAuth dict
Return type:

list

Returns:

a list of user dicts