Package org.kohsuke.github
Class GHMembership
- java.lang.Object
-
- org.kohsuke.github.GHMembership
-
public class GHMembership extends Object
Represents a membership of a user in an organization.- Author:
- Kohsuke Kawaguchi
- See Also:
GHMyself#listOrgMemberships()
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GHMembership.Role
Role of a user in an organization.static class
GHMembership.State
Whether a role is currently active or waiting for acceptance (pending).
-
Constructor Summary
Constructors Constructor Description GHMembership()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
activate()
Accepts a pending invitation to an organization.GHOrganization
getOrganization()
Gets organization.GHMembership.Role
getRole()
Gets role.GitHub
getRoot()
Deprecated.For access to theGitHub
instance, use a local copy instead of pulling it out of objects.GHMembership.State
getState()
Gets state.URL
getUrl()
Gets url.GHUser
getUser()
Gets user.
-
-
-
Method Detail
-
getUrl
public URL getUrl()
Gets url.- Returns:
- the url
-
getState
public GHMembership.State getState()
Gets state.- Returns:
- the state
-
getRole
public GHMembership.Role getRole()
Gets role.- Returns:
- the role
-
getUser
public GHUser getUser()
Gets user.- Returns:
- the user
-
getOrganization
public GHOrganization getOrganization()
Gets organization.- Returns:
- the organization
-
activate
public void activate() throws IOException
Accepts a pending invitation to an organization.- Throws:
IOException
- the io exception- See Also:
GHMyself#getMembership(GHOrganization)
-
getRoot
@Deprecated public GitHub getRoot()
Deprecated.For access to theGitHub
instance, use a local copy instead of pulling it out of objects.Get the rootGitHub
instance for this object.- Returns:
- the root
GitHub
instance
-
-