Teams {sevenbridges2} | R Documentation |
R6 Class representing teams endpoints
Description
R6 Class representing teams resource endpoints.
Super class
sevenbridges2::Resource
-> Teams
Public fields
URL
List of URL endpoints for this resource.
Methods
Public methods
Method new()
Create new Teams resource object.
Usage
Teams$new(...)
Arguments
...
Other response arguments.
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.
Usage
Teams$query(division, list_all = FALSE, ...)
Arguments
division
The string ID of the division or Division object you are querying.
list_all
Boolean. Set this field to
TRUE
if 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.
Examples
\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 get()
This call returns the details of a specified team. You can only get details of a team you are a member of.
Usage
Teams$get(id, ...)
Arguments
id
The 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.
Examples
\dontrun{ # Retrieve details of a specified team a$teams$get(id = "team-id") }
Method create()
This call creates a new team within a specified division.
Usage
Teams$create(division, name)
Arguments
division
The string ID of the division or Division object where you want to create a team.
name
Enter the name for the new team.
Returns
A Team
object.
Examples
\dontrun{ # Create new team a$teams$create(division = "division-id", name = "my-new-team") }
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.
Usage
Teams$delete(team, ...)
Arguments
team
The team ID or Team object that you want to delete.
...
Other arguments that can be passed to core
api()
function.
Examples
\dontrun{ # Delete a team a$teams$delete(team = "team-id") }
Method clone()
The objects of this class are cloneable with this method.
Usage
Teams$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Examples
## ------------------------------------------------
## Method `Teams$query`
## ------------------------------------------------
## Not run:
# 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)
## End(Not run)
## ------------------------------------------------
## Method `Teams$get`
## ------------------------------------------------
## Not run:
# Retrieve details of a specified team
a$teams$get(id = "team-id")
## End(Not run)
## ------------------------------------------------
## Method `Teams$create`
## ------------------------------------------------
## Not run:
# Create new team
a$teams$create(division = "division-id", name = "my-new-team")
## End(Not run)
## ------------------------------------------------
## Method `Teams$delete`
## ------------------------------------------------
## Not run:
# Delete a team
a$teams$delete(team = "team-id")
## End(Not run)