org.kohsuke.github
Class GHUser

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

public class GHUser
extends GHPerson

Represents an user of 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
GHUser()
           
 
Method Summary
 boolean equals(Object obj)
           
 void follow()
          Follow this user.
 GHPersonSet<GHUser> getFollowers()
          Lists the users who are following this user.
 GHPersonSet<GHUser> getFollows()
          Lists the users that this user is following
 GHPersonSet<GHOrganization> getOrganizations()
          Gets the organization that this user belongs to publicly.
 int hashCode()
           
 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 isPublicMemberOf(GHOrganization org)
          Returns true if this user belongs to the specified organization as a public member.
 PagedIterable<GHEventInfo> listEvents()
          Lists events performed by a user (this includes private events if the caller is authenticated.
 PagedIterable<GHGist> listGists()
          Lists Gists created by this user.
 String toString()
           
 void unfollow()
          Unfollow this user.
 
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, listRepositories, populate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GHUser

public GHUser()
Method Detail

follow

public void follow()
            throws IOException
Follow this user.

Throws:
IOException

unfollow

public void unfollow()
              throws IOException
Unfollow this user.

Throws:
IOException

getFollows

@WithBridgeMethods(value=java.util.Set.class)
public GHPersonSet<GHUser> getFollows()
                               throws IOException
Lists the users that this user is following

Throws:
IOException

getFollowers

@WithBridgeMethods(value=java.util.Set.class)
public GHPersonSet<GHUser> getFollowers()
                                 throws IOException
Lists the users who are following this user.

Throws:
IOException

isMemberOf

public boolean isMemberOf(GHOrganization org)
Returns true if this user belongs to the specified organization.


isMemberOf

public boolean isMemberOf(GHTeam team)
Returns true if this user belongs to the specified team.


isPublicMemberOf

public boolean isPublicMemberOf(GHOrganization org)
Returns true if this user belongs to the specified organization as a public member.


getOrganizations

@WithBridgeMethods(value=java.util.Set.class)
public GHPersonSet<GHOrganization> getOrganizations()
                                             throws IOException
Gets the organization that this user belongs to publicly.

Throws:
IOException

listEvents

public PagedIterable<GHEventInfo> listEvents()
                                      throws IOException
Lists events performed by a user (this includes private events if the caller is authenticated.

Specified by:
listEvents in class GHPerson
Throws:
IOException

listGists

public PagedIterable<GHGist> listGists()
                                throws IOException
Lists Gists created by this user.

Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2014. All rights reserved.