org.kohsuke.github
Class GHMyself

java.lang.Object
  extended by org.kohsuke.github.GHPerson
      extended by org.kohsuke.github.GHUser
          extended by org.kohsuke.github.GHMyself

public class GHMyself
extends GHUser

Represents the account that's logging into GitHub.

Author:
Kohsuke Kawaguchi

Field Summary
 
Fields inherited from class org.kohsuke.github.GHPerson
avatar_url, blog, company, created_at, email, followers, following, gravatar_id, html_url, id, location, login, name, public_gists, public_repos, url
 
Constructor Summary
GHMyself()
           
 
Method Summary
 GHPersonSet<GHOrganization> getAllOrganizations()
          Gets the organization that this user belongs to.
 Map<String,GHRepository> getAllRepositories()
          Gets the all repositories this user owns (public and private).
 List<String> getEmails()
          Deprecated. Use getEmails2()
 List<GHEmail> getEmails2()
          Returns the read-only list of e-mail addresses configured for you.
 List<GHKey> getPublicKeys()
          Returns the read-only list of all the pulic keys of the current user.
 List<GHVerifiedKey> getPublicVerifiedKeys()
          Returns the read-only list of all the public verified keys of the current user.
 PagedIterable<GHRepository> listAllRepositories()
          Deprecated. Use listRepositories()
 PagedIterable<GHRepository> listRepositories()
          Lists up all repositories this user owns (public and private).
 
Methods inherited from class org.kohsuke.github.GHUser
equals, follow, getFollowers, getFollows, getOrganizations, hashCode, isMemberOf, isMemberOf, isPublicMemberOf, listEvents, listGists, toString, unfollow
 
Methods inherited from class org.kohsuke.github.GHPerson
getAvatarUrl, getBlog, getCompany, getCreatedAt, getEmail, getFollowersCount, getFollowingCount, getGravatarId, getHtmlUrl, getId, getLocation, getLogin, getName, getPublicGistCount, getPublicRepoCount, getRepositories, getRepository, iterateRepositories, listRepositories, populate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GHMyself

public GHMyself()
Method Detail

getEmails

public List<String> getEmails()
                       throws IOException
Deprecated. Use getEmails2()

Throws:
IOException

getEmails2

public List<GHEmail> getEmails2()
                         throws IOException
Returns the read-only list of e-mail addresses configured for you. This corresponds to the stuff you configure in https://github.com/settings/emails, and not to be confused with GHPerson.getEmail() that shows your public e-mail address set in https://github.com/settings/profile

Returns:
Always non-null.
Throws:
IOException

getPublicKeys

public List<GHKey> getPublicKeys()
                          throws IOException
Returns the read-only list of all the pulic keys of the current user. NOTE: When using OAuth authenticaiton, the READ/WRITE User scope is required by the GitHub APIs, otherwise you will get a 404 NOT FOUND.

Returns:
Always non-null.
Throws:
IOException

getPublicVerifiedKeys

public List<GHVerifiedKey> getPublicVerifiedKeys()
                                          throws IOException
Returns the read-only list of all the public verified keys of the current user. Differently from the getPublicKeys() method, the retrieval of the user's verified public keys does not require any READ/WRITE OAuth Scope to the user's profile.

Returns:
Always non-null.
Throws:
IOException

getAllOrganizations

public GHPersonSet<GHOrganization> getAllOrganizations()
                                                throws IOException
Gets the organization that this user belongs to.

Throws:
IOException

getAllRepositories

public Map<String,GHRepository> getAllRepositories()
                                            throws IOException
Gets the all repositories this user owns (public and private).

Throws:
IOException

listRepositories

public PagedIterable<GHRepository> listRepositories()
Lists up all repositories this user owns (public and private). Unlike getAllRepositories(), this does not wait until all the repositories are returned.

Overrides:
listRepositories in class GHPerson

listAllRepositories

public PagedIterable<GHRepository> listAllRepositories()
Deprecated. Use listRepositories()



Copyright © 2014. All rights reserved.