org.kohsuke.github
Class GHPerson

java.lang.Object
  extended by org.kohsuke.github.GHPerson
Direct Known Subclasses:
GHOrganization, GHUser

public abstract class GHPerson
extends Object

Common part of GHUser and GHOrganization.

Author:
Kohsuke Kawaguchi

Field Summary
protected  String avatar_url
           
protected  String blog
           
protected  String company
           
protected  String created_at
           
protected  String email
           
protected  int followers
           
protected  int following
           
protected  String gravatar_id
           
protected  String html_url
           
protected  int id
           
protected  String location
           
protected  String login
           
protected  String name
           
protected  int public_gists
           
protected  int public_repos
           
protected  String url
           
 
Constructor Summary
GHPerson()
           
 
Method Summary
 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."
 String getCreatedAt()
           
 String getEmail()
          Gets the e-mail address of the user.
 int getFollowersCount()
           
 int getFollowingCount()
           
 String getGravatarId()
          Deprecated. No longer available in the v3 API.
 String getHtmlUrl()
           
 int getId()
          What appears to be a GitHub internal unique number that identifies this user.
 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()
           
 int getPublicRepoCount()
           
 Map<String,GHRepository> getRepositories()
          Gets the public repositories this user owns.
 GHRepository getRepository(String name)
           
 Iterable<List<GHRepository>> iterateRepositories(int pageSize)
          Deprecated. Use listRepositories()
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

login

protected String login

avatar_url

protected String avatar_url

url

protected String url

gravatar_id

protected String gravatar_id

id

protected int id

location

protected String location

blog

protected String blog

email

protected String email

name

protected String name

created_at

protected String created_at

company

protected String company

html_url

protected String html_url

followers

protected int followers

following

protected int following

public_repos

protected int public_repos

public_gists

protected int public_gists
Constructor Detail

GHPerson

public GHPerson()
Method Detail

populate

protected void populate()
                 throws IOException
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

getRepositories

public Map<String,GHRepository> getRepositories()
                                         throws IOException
Gets the public repositories this user owns.

To list your own repositories, including private repositories, use GHMyself.listRepositories()

Throws:
IOException

listRepositories

public PagedIterable<GHRepository> listRepositories()
Lists up all the repositories using a 30 items page size. Unlike getRepositories(), this does not wait until all the repositories are returned.


listRepositories

public PagedIterable<GHRepository> listRepositories(int pageSize)
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. Unlike getRepositories(), this does not wait until all the repositories are returned.

iterateRepositories

public Iterable<List<GHRepository>> iterateRepositories(int pageSize)
Deprecated. Use listRepositories()

Loads repository list in a pagenated fashion.

For a person with a lot of repositories, GitHub returns the list of repositories in a pagenated 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.


getRepository

public GHRepository getRepository(String name)
                           throws IOException
Returns:
null if the repository was not found
Throws:
IOException

listEvents

public abstract PagedIterable<GHEventInfo> listEvents()
                                               throws IOException
Lists events for an organization or an user.

Throws:
IOException

getGravatarId

public String getGravatarId()
Deprecated. No longer available in the v3 API.

Gravatar ID of this user, like 0cb9832a01c22c083390f3c5dcb64105


getAvatarUrl

public String getAvatarUrl()
Returns a string like 'https://secure.gravatar.com/avatar/0cb9832a01c22c083390f3c5dcb64105' that indicates the avatar image URL.


getLogin

public String getLogin()
Gets the login ID of this user, like 'kohsuke'


getName

public String getName()
               throws IOException
Gets the human-readable name of the user, like "Kohsuke Kawaguchi"

Throws:
IOException

getCompany

public String getCompany()
                  throws IOException
Gets the company name of this user, like "Sun Microsystems, Inc."

Throws:
IOException

getLocation

public String getLocation()
                   throws IOException
Gets the location of this user, like "Santa Clara, California"

Throws:
IOException

getCreatedAt

public String getCreatedAt()
                    throws IOException
Throws:
IOException

getBlog

public String getBlog()
               throws IOException
Gets the blog URL of this user.

Throws:
IOException

getHtmlUrl

public String getHtmlUrl()

getEmail

public String getEmail()
                throws IOException
Gets the e-mail address of the user.

Throws:
IOException

getPublicGistCount

public int getPublicGistCount()
                       throws IOException
Throws:
IOException

getPublicRepoCount

public int getPublicRepoCount()
                       throws IOException
Throws:
IOException

getFollowingCount

public int getFollowingCount()
                      throws IOException
Throws:
IOException

getId

public int getId()
What appears to be a GitHub internal unique number that identifies this user.


getFollowersCount

public int getFollowersCount()
                      throws IOException
Throws:
IOException


Copyright © 2014. All rights reserved.