R6 Class representing a central resource for managing teams.
Super class
sevenbridges2::Item
-> Team
Methods
Method print()
Print method for Team class.
Method reload()
Reload Team object information.
Arguments
...
Other arguments that can be passed to core
api()
function like 'fields', etc.
Method list_members()
This call retrieves a list of all team members within a specified team. Each member's username will be returned.
Arguments
limit
The maximum number of collection items to return for a single request. Minimum value is
1
. The maximum value is100
and the default value is50
. This is a pagination-specific attribute.offset
The zero-based starting index in the entire collection of the first item to return. The default value is
0
. This is a pagination-specific attribute....
Other arguments that can be passed to core
api()
function like 'fields', etc.
Returns
A Collection
of User
objects.
Method add_member()
This call adds a division member to the specified team.
This action requires ADMIN
privileges.
Method remove_member()
This call removes a member from a team. By removing a
member, you remove the user's membership to the team, but do not
remove their account from the division.
This action requires ADMIN
privileges.
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.
This action requires ADMIN
privileges.
Examples
## ------------------------------------------------
## Method `Team$print`
## ------------------------------------------------
if (FALSE) { # \dontrun{
team_object <- Team$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
team_object$print()
} # }
## ------------------------------------------------
## Method `Team$reload`
## ------------------------------------------------
if (FALSE) { # \dontrun{
team_object <- Team$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
team_object$reload()
} # }
## ------------------------------------------------
## Method `Team$list_members`
## ------------------------------------------------
if (FALSE) { # \dontrun{
# Retrieve details of a specified team
my_team <- a$teams$get(id = "team-id")
# Retrieve a list of all team members
my_team$list_members()
} # }
## ------------------------------------------------
## Method `Team$add_member`
## ------------------------------------------------
if (FALSE) { # \dontrun{
# Retrieve details of a specified team
my_team <- a$teams$get(id = "team-id")
# Add new member to the team
my_team$add_member(user = "user-id")
} # }
## ------------------------------------------------
## Method `Team$remove_member`
## ------------------------------------------------
if (FALSE) { # \dontrun{
# Retrieve details of a specified team
my_team <- a$teams$get(id = "team-id")
# Remove a member from the team
my_team$remove_member(user = "user-id")
} # }
## ------------------------------------------------
## Method `Team$rename`
## ------------------------------------------------
if (FALSE) { # \dontrun{
# Retrieve details of a specified team
my_team <- a$teams$get(id = "team-id")
# Rename the team
my_team$rename(name = "new-team-name")
} # }
## ------------------------------------------------
## Method `Team$delete`
## ------------------------------------------------
if (FALSE) { # \dontrun{
# Retrieve details of a specified team
my_team <- a$teams$get(id = "team-id")
# Delete a team
my_team$delete()
} # }