public class GHTeam extends Object implements Refreshable
| Modifier and Type | Class and Description |
|---|---|
static class |
GHTeam.Role
Member's role in a team
|
| Constructor and Description |
|---|
GHTeam() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(GHRepository r)
Add.
|
void |
add(GHRepository r,
GHOrganization.Permission permission)
Add.
|
void |
add(GHUser u)
Adds a member to the team.
|
void |
add(GHUser user,
GHTeam.Role role)
Adds a member to the team
|
void |
delete()
Deletes this team.
|
String |
getDescription()
Gets description.
|
int |
getId()
Gets id.
|
Set<GHUser> |
getMembers()
Gets members.
|
String |
getName()
Gets name.
|
GHOrganization |
getOrganization()
Gets organization.
|
String |
getPermission()
Gets permission.
|
Map<String,GHRepository> |
getRepositories()
Gets repositories.
|
String |
getSlug()
Gets slug.
|
boolean |
hasMember(GHUser user)
Checks if this team has the specified user as a member.
|
PagedIterable<GHUser> |
listMembers()
Retrieves the current members.
|
PagedIterable<GHRepository> |
listRepositories()
List repositories paged iterable.
|
void |
refresh()
Opens a connection to the given URL.
|
void |
remove(GHRepository r)
Remove.
|
void |
remove(GHUser u)
Removes a member to the team.
|
void |
setDescription(String description)
Sets description.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrefreshprotected GitHub root
public String getName()
public String getPermission()
public String getSlug()
public String getDescription()
public void setDescription(String description) throws IOException
description - the descriptionIOException - the io exceptionpublic int getId()
public PagedIterable<GHUser> listMembers() throws IOException
IOException - the io exceptionpublic Set<GHUser> getMembers() throws IOException
IOException - the io exceptionpublic boolean hasMember(GHUser user)
user - the userpublic Map<String,GHRepository> getRepositories() throws IOException
IOException - the io exceptionpublic PagedIterable<GHRepository> listRepositories()
public void add(GHUser u) throws IOException
The user will be invited to the organization if required.
u - the uIOException - the io exceptionpublic void add(GHUser user, GHTeam.Role role) throws IOException
The user will be invited to the organization if required.
user - github userrole - role for the new memberIOException - the io exceptionpublic void remove(GHUser u) throws IOException
u - the uIOException - the io exceptionpublic void add(GHRepository r) throws IOException
r - the rIOException - the io exceptionpublic void add(GHRepository r, GHOrganization.Permission permission) throws IOException
r - the rpermission - the permissionIOException - the io exceptionpublic void remove(GHRepository r) throws IOException
r - the rIOException - the io exceptionpublic void delete()
throws IOException
IOException - the io exceptionpublic GHOrganization getOrganization() throws IOException
IOException - the io exceptionpublic void refresh()
throws IOException
Refreshablerefresh in interface RefreshableIOException - the io exceptionCopyright © 2020. All rights reserved.