Team | R Documentation |
R6 Class representing a central resource for managing teams.
sevenbridges2::Item
-> Team
URL
List of URL endpoints for this resource.
id
The ID of the team.
name
Team's name.
new()
Create a new Team object.
Team$new(res = NA, ...)
res
Response containing the Team object information.
...
Other response arguments.
print()
Print method for Team class.
Team$print()
\dontrun{ team_object <- Team$new( res = x, href = x$href, auth = auth, response = attr(x, "response") ) team_object$print() }
reload()
Reload Team object information.
Team$reload(...)
...
Other arguments that can be passed to core api()
function
like 'fields', etc.
Team
object.
\dontrun{ team_object <- Team$new( res = x, href = x$href, auth = auth, response = attr(x, "response") ) team_object$reload() }
list_members()
This call retrieves a list of all team members within a specified team. Each member's username will be returned.
Team$list_members( limit = getOption("sevenbridges2")$limit, offset = getOption("sevenbridges2")$offset, ... )
limit
The maximum number of collection items to return
for a single request. Minimum value is 1
.
The maximum value is 100
and the default value is 50
.
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.
A Collection
of User
objects.
\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() }
add_member()
This call adds a division member to the specified team.
This action requires ADMIN
privileges.
Team$add_member(user)
user
User ID of the division member you are adding to the team
using the following format: division_id/username
. Alternatively,
a User
object can be provided.
\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") }
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.
Team$remove_member(user)
user
The Seven Bridges Platform username of the user to be
removed, specified in the format division-name/username
, or an object
of class User
that contains the username.
\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") }
rename()
This call renames the specified team. This action requires
ADMIN
privileges.
Team$rename(name = NULL)
name
The new name for the team.
\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") }
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.
Team$delete()
\dontrun{ # Retrieve details of a specified team my_team <- a$teams$get(id = "team-id") # Delete a team my_team$delete() }
clone()
The objects of this class are cloneable with this method.
Team$clone(deep = FALSE)
deep
Whether to make a deep clone.
## ------------------------------------------------
## Method `Team$print`
## ------------------------------------------------
## Not run:
team_object <- Team$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
team_object$print()
## End(Not run)
## ------------------------------------------------
## Method `Team$reload`
## ------------------------------------------------
## Not run:
team_object <- Team$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
team_object$reload()
## End(Not run)
## ------------------------------------------------
## Method `Team$list_members`
## ------------------------------------------------
## Not run:
# 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()
## End(Not run)
## ------------------------------------------------
## Method `Team$add_member`
## ------------------------------------------------
## Not run:
# 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")
## End(Not run)
## ------------------------------------------------
## Method `Team$remove_member`
## ------------------------------------------------
## Not run:
# 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")
## End(Not run)
## ------------------------------------------------
## Method `Team$rename`
## ------------------------------------------------
## Not run:
# Retrieve details of a specified team
my_team <- a$teams$get(id = "team-id")
# Rename the team
my_team$rename(name = "new-team-name")
## End(Not run)
## ------------------------------------------------
## Method `Team$delete`
## ------------------------------------------------
## Not run:
# Retrieve details of a specified team
my_team <- a$teams$get(id = "team-id")
# Delete a team
my_team$delete()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.