java.lang.Object
org.kohsuke.github.GHObject
org.kohsuke.github.GHPerson
- Direct Known Subclasses:
GHOrganization,GHUser
Common part of
GHUser and GHOrganization.- Author:
- Kohsuke Kawaguchi
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe avatar url.protected StringThe twitter username.protected StringThe twitter username.protected StringThe twitter username.protected StringThe twitter username.protected intThe public gists.protected intThe public gists.protected booleanThe hireable.protected StringThe html url.protected StringThe twitter username.protected StringThe avatar url.protected StringThe twitter username.protected intThe public gists.protected intThe public gists.protected booleanThe hireable.protected IntegerThe total private repos.protected StringThe twitter username.protected StringThe twitter username.Fields inherited from class org.kohsuke.github.GHObject
responseHeaderFields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a string of the avatar image URL.getBlog()Gets the blog URL of this user.Gets the company name of this user, like "Sun Microsystems, Inc."Gets the created at.getEmail()Gets the e-mail address of the user.intGets followers count.intGets following count.Gets the html url.Gets the location of this user, like "Santa Clara, California".getLogin()Gets the login ID of this user, like 'kohsuke'.getName()Gets the human-readable name of the user, like "Kohsuke Kawaguchi".intGets public gist count.intGets public repo count.Gets the public repositories this user owns.getRepository(String name) Gets repository.Gets total private repo count.Gets the Twitter Username of this user, like "GitHub".getType()Gets the type.Gets the updated at.booleanGets the siteAdmin field.abstract PagedIterable<GHEventInfo>Lists events for an organization or an user.List all the repositories using a default of 30 items page size.listRepositories(int pageSize) Deprecated.Use #listRepositories().withPageSize() instead.protected voidpopulate()Fully populate the data by retrieving missing data.Methods inherited from class org.kohsuke.github.GHObject
getId, getNodeId, getResponseHeaderFields, getUrl, setResponseHeaderFields, toString
-
Field Details
-
followers
protected int followersThe public gists. -
following
protected int followingThe public gists. -
publicRepos
protected int publicReposThe public gists. -
publicGists
protected int publicGistsThe public gists. -
htmlUrl
The html url. -
location
The twitter username. -
blog
The twitter username. -
email
The twitter username. -
bio
The twitter username. -
name
The twitter username. -
company
The twitter username. -
type
The twitter username. -
twitterUsername
The twitter username. -
login
The avatar url. -
avatarUrl
The avatar url. -
siteAdmin
protected boolean siteAdminThe hireable. -
hireable
protected boolean hireableThe hireable. -
totalPrivateRepos
The total private repos.
-
-
Constructor Details
-
GHPerson
public GHPerson()Create default GHPerson instance
-
-
Method Details
-
getAvatarUrl
Returns a string of the avatar image URL.- Returns:
- the avatar url
-
getBlog
Gets the blog URL of this user.- Returns:
- the blog
- Throws:
IOException- the io exception
-
getCompany
Gets the company name of this user, like "Sun Microsystems, Inc."- Returns:
- the company
- Throws:
IOException- the io exception
-
getCreatedAt
@WithBridgeMethods(value=java.util.Date.class, adapterMethod="instantToDate") public Instant getCreatedAt() throws IOExceptionGets the created at.- Overrides:
getCreatedAtin classGHObject- Returns:
- the created at
- Throws:
IOException- Signals that an I/O exception has occurred.
-
getEmail
Gets the e-mail address of the user.- Returns:
- the email
- Throws:
IOException- the io exception
-
getFollowersCount
Gets followers count.- Returns:
- the followers count
- Throws:
IOException- the io exception
-
getFollowingCount
Gets following count.- Returns:
- the following count
- Throws:
IOException- the io exception
-
getHtmlUrl
Gets the html url.- Returns:
- the html url
-
getLocation
Gets the location of this user, like "Santa Clara, California".- Returns:
- the location
- Throws:
IOException- the io exception
-
getLogin
Gets the login ID of this user, like 'kohsuke'.- Returns:
- the login
-
getName
Gets the human-readable name of the user, like "Kohsuke Kawaguchi".- Returns:
- the name
- Throws:
IOException- the io exception
-
getPublicGistCount
Gets public gist count.- Returns:
- the public gist count
- Throws:
IOException- the io exception
-
getPublicRepoCount
Gets public repo count.- Returns:
- the public repo count
- Throws:
IOException- the io exception
-
getRepositories
Gets the public repositories this user owns.To list your own repositories, including private repositories, use
GHMyself.listRepositories()- Returns:
- the repositories
-
getRepository
Gets repository.- Parameters:
name- the name- Returns:
- null if the repository was not found
- Throws:
IOException- the io exception
-
getTotalPrivateRepoCount
Gets total private repo count.- Returns:
- the total private repo count
- Throws:
IOException- the io exception
-
getTwitterUsername
Gets the Twitter Username of this user, like "GitHub".- Returns:
- the Twitter username
- Throws:
IOException- the io exception
-
getType
Gets the type. This is either "User" or "Organization".- Returns:
- the type
- Throws:
IOException- the io exception
-
getUpdatedAt
@WithBridgeMethods(value=java.util.Date.class, adapterMethod="instantToDate") public Instant getUpdatedAt() throws IOExceptionGets the updated at.- Overrides:
getUpdatedAtin classGHObject- Returns:
- the updated at
- Throws:
IOException- Signals that an I/O exception has occurred.
-
isSiteAdmin
Gets the siteAdmin field.- Returns:
- the siteAdmin field
- Throws:
IOException- the io exception
-
listEvents
Lists events for an organization or an user.- Returns:
- the paged iterable
- Throws:
IOException- the io exception
-
listRepositories
List all the repositories using a default of 30 items page size.Unlike
getRepositories(), this does not wait until all the repositories are returned.- Returns:
- the paged iterable
-
listRepositories
Deprecated.Use #listRepositories().withPageSize() instead.Lists up all the repositories using the specified page size.- Parameters:
pageSize- size for each page of items returned by GitHub. Maximum page size is 100. UnlikegetRepositories(), this does not wait until all the repositories are returned.- Returns:
- the paged iterable
-
populate
Fully populate the data by retrieving missing data.Depending on the original API call where this object is created, it may not contain everything.
- Throws:
IOException- the io exception
-