public abstract class GHPerson extends GHObject
GHUser and GHOrganization.| Modifier and Type | Field and Description |
|---|---|
protected String |
avatar_url |
protected String |
blog |
protected String |
company |
protected String |
email |
protected int |
followers |
protected int |
following |
protected String |
gravatar_id |
protected String |
html_url |
protected String |
location |
protected String |
login |
protected String |
name |
protected int |
public_gists |
protected int |
public_repos |
protected boolean |
site_admin |
protected String |
type |
created_at, id, responseHeaderFields, updated_at, url| Constructor and Description |
|---|
GHPerson() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAvatarUrl()
Returns a string like 'https://secure.gravatar.com/avatar/0cb9832a01c22c083390f3c5dcb64105' that indicates the
avatar image URL.
|
String |
getBlog()
Gets the blog URL of this user.
|
String |
getCompany()
Gets the company name of this user, like "Sun Microsystems, Inc."
|
Date |
getCreatedAt()
When was this resource created?
|
String |
getEmail()
Gets the e-mail address of the user.
|
int |
getFollowersCount()
Gets followers count.
|
int |
getFollowingCount()
Gets following count.
|
String |
getGravatarId()
Deprecated.
No longer available in the v3 API.
|
URL |
getHtmlUrl()
Gets html url.
|
String |
getLocation()
Gets the location of this user, like "Santa Clara, California"
|
String |
getLogin()
Gets the login ID of this user, like 'kohsuke'
|
String |
getName()
Gets the human-readable name of the user, like "Kohsuke Kawaguchi"
|
int |
getPublicGistCount()
Gets public gist count.
|
int |
getPublicRepoCount()
Gets public repo count.
|
Map<String,GHRepository> |
getRepositories()
Gets the public repositories this user owns.
|
GHRepository |
getRepository(String name)
Gets repository.
|
String |
getType()
Gets the type.
|
Date |
getUpdatedAt()
When was this resource last updated?
|
boolean |
isSiteAdmin()
Gets the site_admin field
|
Iterable<List<GHRepository>> |
iterateRepositories(int pageSize)
Deprecated.
|
abstract PagedIterable<GHEventInfo> |
listEvents()
Lists events for an organization or an user.
|
PagedIterable<GHRepository> |
listRepositories()
Lists up all the repositories using a 30 items page size.
|
PagedIterable<GHRepository> |
listRepositories(int pageSize)
Lists up all the repositories using the specified page size.
|
protected void |
populate()
Fully populate the data by retrieving missing data.
|
getId, getResponseHeaderFields, getUrl, toStringprotected String login
protected String avatar_url
protected String gravatar_id
protected String location
protected String blog
protected String email
protected String name
protected String company
protected String type
protected String html_url
protected int followers
protected int following
protected int public_repos
protected int public_gists
protected boolean site_admin
protected void populate()
throws IOException
Depending on the original API call where this object is created, it may not contain everything.
IOException - the io exceptionpublic Map<String,GHRepository> getRepositories() throws IOException
To list your own repositories, including private repositories, use GHMyself.listRepositories()
IOException - the io exceptionpublic PagedIterable<GHRepository> listRepositories()
Unlike getRepositories(), this does not wait until all the repositories are returned.
public PagedIterable<GHRepository> listRepositories(int pageSize)
pageSize - size for each page of items returned by GitHub. Maximum page size is 100. Unlike
getRepositories(), this does not wait until all the repositories are returned.@Deprecated public Iterable<List<GHRepository>> iterateRepositories(int pageSize)
listRepositories()
For a person with a lot of repositories, GitHub returns the list of repositories in a paginated fashion. Unlike
getRepositories(), this method allows the caller to start processing data as it arrives.
Every Iterator.next() call results in I/O. Exceptions that occur during the processing is wrapped into
Error.
pageSize - the page sizepublic GHRepository getRepository(String name) throws IOException
name - the nameIOException - the io exceptionpublic abstract PagedIterable<GHEventInfo> listEvents() throws IOException
IOException - the io exceptionpublic String getGravatarId()
public String getAvatarUrl()
public String getLogin()
public String getName() throws IOException
IOException - the io exceptionpublic String getCompany() throws IOException
IOException - the io exceptionpublic String getLocation() throws IOException
IOException - the io exceptionpublic Date getCreatedAt() throws IOException
GHObjectgetCreatedAt in class GHObjectIOException - on errorpublic Date getUpdatedAt() throws IOException
GHObjectgetUpdatedAt in class GHObjectIOException - on errorpublic String getBlog() throws IOException
IOException - the io exceptionpublic URL getHtmlUrl()
GHObjectgetHtmlUrl in class GHObjectpublic String getEmail() throws IOException
IOException - the io exceptionpublic int getPublicGistCount()
throws IOException
IOException - the io exceptionpublic int getPublicRepoCount()
throws IOException
IOException - the io exceptionpublic int getFollowingCount()
throws IOException
IOException - the io exceptionpublic int getFollowersCount()
throws IOException
IOException - the io exceptionpublic String getType() throws IOException
IOException - the io exceptionpublic boolean isSiteAdmin()
throws IOException
IOException - the io exceptionCopyright © 2020. All rights reserved.