java.lang.Object
org.kohsuke.github.GHObject
org.kohsuke.github.GHPerson
org.kohsuke.github.GHUser
- Direct Known Subclasses:
GHMyself
,GHRepository.Contributor
Represents an user of GitHub.
- Author:
- Kohsuke Kawaguchi
-
Field Summary
FieldsFields inherited from class org.kohsuke.github.GHPerson
avatarUrl, bio, blog, company, email, followers, following, hireable, htmlUrl, location, login, name, publicGists, publicRepos, siteAdmin, totalPrivateRepos, twitterUsername, type
Fields inherited from class org.kohsuke.github.GHObject
responseHeaderFields
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Equals.void
follow()
Follow this user.getBio()
Gets the bio.Lists the users who are following this user.Lists the users that this user is following.getKeys()
Gets keys.Gets LDAP information for user.Gets the organization that this user belongs to publicly.When was this user suspended?.int
hashCode()
Hash code.boolean
Returns true if this user is marked as hireable, false otherwise.boolean
isMemberOf
(GHOrganization org) Returns true if this user belongs to the specified organization.boolean
isMemberOf
(GHTeam team) Returns true if this user belongs to the specified team.boolean
Returns true if this user belongs to the specified organization as a public member.Lists events performed by a user (this includes private events if the caller is authenticated.Lists the users who are following this user.Lists the users that this user is following.Lists Gists created by this user.Lists all the projects.Lists all the repositories that this user has starred.Lists all the subscribed (aka watched) repositories.void
unfollow()
Unfollow this user.Methods inherited from class org.kohsuke.github.GHPerson
getAvatarUrl, getBlog, getCompany, getCreatedAt, getEmail, getFollowersCount, getFollowingCount, getHtmlUrl, getLocation, getLogin, getName, getPublicGistCount, getPublicRepoCount, getRepositories, getRepository, getTotalPrivateRepoCount, getTwitterUsername, getType, getUpdatedAt, isSiteAdmin, listRepositories, listRepositories, populate
Methods inherited from class org.kohsuke.github.GHObject
getId, getNodeId, getResponseHeaderFields, getUrl, setResponseHeaderFields, toString
-
Field Details
-
ldapDn
The ldap dn.
-
-
Constructor Details
-
GHUser
public GHUser()Create default GHUser instance
-
-
Method Details
-
equals
Equals. -
follow
Follow this user.- Throws:
IOException
- the io exception
-
getBio
Gets the bio.- Returns:
- the bio
-
getFollowers
Lists the users who are following this user.- Returns:
- the followers
- Throws:
IOException
- the io exception
-
getFollows
Lists the users that this user is following.- Returns:
- the follows
- Throws:
IOException
- the io exception
-
getKeys
Gets keys.- Returns:
- the keys
- Throws:
IOException
- the io exception
-
getLdapDn
Gets LDAP information for user.- Returns:
- The LDAP information
- Throws:
IOException
- the io exception- See Also:
-
getOrganizations
Gets the organization that this user belongs to publicly.- Returns:
- the organizations
- Throws:
IOException
- the io exception
-
getSuspendedAt
@WithBridgeMethods(value=java.util.Date.class, adapterMethod="instantToDate") public Instant getSuspendedAt() throws IOExceptionWhen was this user suspended?.- Returns:
- updated date
- Throws:
IOException
- on error
-
hashCode
public int hashCode()Hash code. -
isHireable
public boolean isHireable()Returns true if this user is marked as hireable, false otherwise.- Returns:
- if the user is marked as hireable
-
isMemberOf
Returns true if this user belongs to the specified organization.- Parameters:
org
- the org- Returns:
- the boolean
-
isMemberOf
Returns true if this user belongs to the specified team.- Parameters:
team
- the team- Returns:
- the boolean
-
isPublicMemberOf
Returns true if this user belongs to the specified organization as a public member.- Parameters:
org
- the org- Returns:
- the boolean
-
listEvents
Lists events performed by a user (this includes private events if the caller is authenticated.- Specified by:
listEvents
in classGHPerson
- Returns:
- the paged iterable
- Throws:
IOException
- Signals that an I/O exception has occurred.
-
listFollowers
Lists the users who are following this user.- Returns:
- the paged iterable
-
listFollows
Lists the users that this user is following.- Returns:
- the paged iterable
-
listGists
Lists Gists created by this user.- Returns:
- the paged iterable
-
listProjects
Lists all the projects.https://docs.github.com/en/rest/reference/projects#list-user-projects
- Returns:
- the paged iterable
-
listStarredRepositories
Lists all the repositories that this user has starred.- Returns:
- the paged iterable
-
listSubscriptions
Lists all the subscribed (aka watched) repositories.https://developer.github.com/v3/activity/watching/
- Returns:
- the paged iterable
-
unfollow
Unfollow this user.- Throws:
IOException
- the io exception
-