R6 Class representing teams resource endpoints.
Super class
sevenbridges2::Resource -> Teams
Methods
Method query()
This call retrieves a list of all teams in a division that you are a member of. Each team's ID and name will be returned.
Arguments
divisionThe string ID of the division or Division object you are querying.
list_allBoolean. Set this field to
TRUEif you want to list all teams within the division (regardless of whether you are a member of a team or not). Default value isFALSE....Other arguments that can be passed to core
api()function like 'fields', etc.
Returns
A Collection of Team objects.
Method get()
This call returns the details of a specified team. You can only get details of a team you are a member of.
Arguments
idThe ID of the team you are querying. The function also accepts a Team object and extracts the ID.
...Other arguments that can be passed to core
api()function like 'fields', etc.
Returns
Team object.
Method create()
This call creates a new team within a specified division.
Arguments
divisionThe string ID of the division or Division object where you want to create a team.
nameEnter the name for the new team.
Returns
A Team object.
Method delete()
This call deletes a team. By deleting a team, you remove the users' membership to the team, but do not remove their accounts from the division.
Arguments
teamThe team ID or Team object that you want to delete.
...Other arguments that can be passed to core
api()function.
Examples
## ------------------------------------------------
## Method `Teams$query`
## ------------------------------------------------
if (FALSE) { # \dontrun{
# Retrieve a list of all teams within the division regardless of
# whether you are a member of a team or not
a$teams$query(division = "division-id", list_all = TRUE)
} # }
## ------------------------------------------------
## Method `Teams$get`
## ------------------------------------------------
if (FALSE) { # \dontrun{
# Retrieve details of a specified team
a$teams$get(id = "team-id")
} # }
## ------------------------------------------------
## Method `Teams$create`
## ------------------------------------------------
if (FALSE) { # \dontrun{
# Create new team
a$teams$create(division = "division-id", name = "my-new-team")
} # }
## ------------------------------------------------
## Method `Teams$delete`
## ------------------------------------------------
if (FALSE) { # \dontrun{
# Delete a team
a$teams$delete(team = "team-id")
} # }