Class GHTeam

  • All Implemented Interfaces:
    Refreshable

    public class GHTeam
    extends GHObject
    implements Refreshable
    A team in GitHub organization.
    Author:
    Kohsuke Kawaguchi
    • Field Detail

    • Constructor Detail

      • GHTeam

        public GHTeam()
    • Method Detail

      • getName

        public String getName()
        Gets name.
        Returns:
        the name
      • getPermission

        public String getPermission()
        Gets permission.
        Returns:
        the permission
      • getSlug

        public String getSlug()
        Gets slug.
        Returns:
        the slug
      • getDescription

        public String getDescription()
        Gets description.
        Returns:
        the description
      • getPrivacy

        public GHTeam.Privacy getPrivacy()
        Gets the privacy state.
        Returns:
        the privacy state.
      • setDescription

        public void setDescription​(String description)
                            throws IOException
        Sets description.
        Parameters:
        description - the description
        Throws:
        IOException - the io exception
      • setPrivacy

        public void setPrivacy​(GHTeam.Privacy privacy)
                        throws IOException
        Updates the team's privacy setting.
        Parameters:
        privacy - the privacy
        Throws:
        IOException - the io exception
      • hasMember

        public boolean hasMember​(GHUser user)
        Checks if this team has the specified user as a member.
        Parameters:
        user - the user
        Returns:
        the boolean
      • listRepositories

        public PagedIterable<GHRepository> listRepositories()
        List repositories paged iterable.
        Returns:
        the paged iterable
      • add

        public void add​(GHUser u)
                 throws IOException
        Adds a member to the team.

        The user will be invited to the organization if required.

        Parameters:
        u - the u
        Throws:
        IOException - the io exception
        Since:
        1.59
      • add

        public void add​(GHUser user,
                        GHTeam.Role role)
                 throws IOException
        Adds a member to the team

        The user will be invited to the organization if required.

        Parameters:
        user - github user
        role - role for the new member
        Throws:
        IOException - the io exception
      • remove

        public void remove​(GHUser u)
                    throws IOException
        Removes a member to the team.
        Parameters:
        u - the u
        Throws:
        IOException - the io exception
      • getHtmlUrl

        public URL getHtmlUrl()
        Description copied from class: GHObject
        Gets html url.
        Specified by:
        getHtmlUrl in class GHObject
        Returns:
        URL of this object for humans, which renders some HTML.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object