Package com.jcabi.github
Class User.Smart
- java.lang.Object
-
- com.jcabi.github.User.Smart
-
- All Implemented Interfaces:
JsonPatchable,JsonReadable,User
- Enclosing interface:
- User
@Immutable @Loggable(1) public static final class User.Smart extends Object implements User
Smart user with extra features.- See Also:
- Get a Single User
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.jcabi.github.User
User.Smart
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description URLavatarUrl()Get his avatar URL.Stringbio()Returns the value of bio property of User's JSON.Stringblog()Returns the value of blog property of User's JSON.Stringcompany()Get his company.Github.Timecreated()Returns the value of created_at property of User's JSON.Stringemail()Get his email.UserEmailsemails()Get user's emails.StringeventsUrl()Returns the value of events_url property of User's JSON.booleanexists()Does it exist in GitHub?intfollowersCount()Returns the value of followers property of User's JSON.StringfollowersUrl()Returns the value of followers_url property of User's JSON.intfollowingCount()Returns the value of following property of User's JSON.StringfollowingUrl()Returns the value of following_url property of User's JSON.StringgistsUrl()Returns the value of gists_url property of User's JSON.Githubgithub()Github we're in.booleanhasName()Check if user has name.booleanhireable()Returns the value of hireable property of User's JSON.StringhtmlUrl()Returns the value of html_url property of User's JSON.intid()Get his ID.javax.json.JsonObjectjson()Describe it in a JSON object.PublicKeyskeys()Get his keys.Stringlocation()Get his location.Stringlogin()Get his login.voidmarkAsRead(Date lastread)Marks notifications as read.Stringname()Get his name.Notificationsnotifications()Notifications for this user.UserOrganizationsorganizations()Get his organizations.StringorganizationsUrl()Returns the value of organizations_url property of User's JSON.voidpatch(javax.json.JsonObject json)Patch using this JSON object.intpublicGists()Returns the value of public_gists property of User's JSON.intpublicRepos()Returns the value of public_repos property of User's JSON.StringreceivedEventsUrl()Returns the value of received_events_url property of User's JSON.StringreposUrl()Returns the value of repos_url property of User's JSON.booleansiteAdmin()Returns the value of site_admin property of User's JSON.StringstarredUrl()Returns the value of starred_url property of User's JSON.StringsubscriptionsUrl()Returns the value of subscriptions_url property of User's JSON.Stringtype()Returns the value of type property of User's JSON.Github.Timeupdated()Returns the value of updated_at property of User's JSON.URLurl()Get his URL.
-
-
-
Constructor Detail
-
Smart
public Smart(User usr)
Public ctor.- Parameters:
usr- User
-
-
Method Detail
-
exists
public boolean exists() throws IOExceptionDoes it exist in GitHub?- Returns:
- TRUE if this user truly exists
- Throws:
IOException- If it fails- Since:
- 0.34
-
id
public int id() throws IOExceptionGet his ID.- Returns:
- Unique user ID
- Throws:
IOException- If it fails- Suppressed Checkstyle violations:
- MethodName (3 lines)
-
avatarUrl
public URL avatarUrl() throws IOException
Get his avatar URL.- Returns:
- URL of the avatar
- Throws:
IOException- If it fails
-
url
public URL url() throws IOException
Get his URL.- Returns:
- URL of the user
- Throws:
IOException- If it fails
-
name
public String name() throws IOException
Get his name.- Returns:
- User name
- Throws:
IOException- If it fails
-
hasName
public boolean hasName() throws IOExceptionCheck if user has name.- Returns:
- True if user has name
- Throws:
IOException- If it fails
-
company
public String company() throws IOException
Get his company.- Returns:
- Company name
- Throws:
IOException- If it fails
-
location
public String location() throws IOException
Get his location.- Returns:
- Location name
- Throws:
IOException- If it fails
-
email
public String email() throws IOException
Get his email.- Returns:
- Throws:
IOException- If it fails
-
login
public String login() throws IOException
Description copied from interface:UserGet his login.- Specified by:
loginin interfaceUser- Returns:
- Login name
- Throws:
IOException- If it fails
-
organizations
public UserOrganizations organizations()
Description copied from interface:UserGet his organizations.- Specified by:
organizationsin interfaceUser- Returns:
- UserOrganizations organizations
-
keys
public PublicKeys keys()
Description copied from interface:UserGet his keys.
-
emails
public UserEmails emails()
Description copied from interface:UserGet user's emails.
-
notifications
public Notifications notifications() throws IOException
Description copied from interface:UserNotifications for this user. Wraps the call "List your notifications". See "List your notifications" at https://developer.github.com/v3/activity/notifications/- Specified by:
notificationsin interfaceUser- Returns:
- Notifications for this user.
- Throws:
IOException- Thrown, if an error during sending request and/or receiving response occurs.- See Also:
- List your notifications
-
markAsRead
public void markAsRead(Date lastread) throws IOException
Description copied from interface:UserMarks notifications as read.- Specified by:
markAsReadin interfaceUser- Parameters:
lastread- Describes the last point that notifications were checked.- Throws:
IOException- Thrown, if an error during sending request and/or receiving response occurs.- See Also:
- Mark as read
-
json
public javax.json.JsonObject json() throws IOExceptionDescription copied from interface:JsonReadableDescribe it in a JSON object.- Specified by:
jsonin interfaceJsonReadable- Returns:
- JSON object
- Throws:
IOException- If there is any I/O problem
-
patch
public void patch(javax.json.JsonObject json) throws IOExceptionDescription copied from interface:JsonPatchablePatch using this JSON object.- Specified by:
patchin interfaceJsonPatchable- Parameters:
json- JSON object- Throws:
IOException- If there is any I/O problem
-
htmlUrl
public String htmlUrl() throws IOException
Returns the value of html_url property of User's JSON.- Returns:
- The 'html_url' property value.
- Throws:
IOException- If any I/O error occurs.
-
followersUrl
public String followersUrl() throws IOException
Returns the value of followers_url property of User's JSON.- Returns:
- The 'followers_url' property value.
- Throws:
IOException- If any I/O error occurs.
-
followingUrl
public String followingUrl() throws IOException
Returns the value of following_url property of User's JSON.- Returns:
- The 'following_url' property value.
- Throws:
IOException- If any I/O error occurs.
-
gistsUrl
public String gistsUrl() throws IOException
Returns the value of gists_url property of User's JSON.- Returns:
- The 'gists_url' property value.
- Throws:
IOException- If any I/O error occurs.
-
starredUrl
public String starredUrl() throws IOException
Returns the value of starred_url property of User's JSON.- Returns:
- The 'starred_url' property value.
- Throws:
IOException- If any I/O error occurs.
-
subscriptionsUrl
public String subscriptionsUrl() throws IOException
Returns the value of subscriptions_url property of User's JSON.- Returns:
- The 'subscriptions_url' property value.
- Throws:
IOException- If any I/O error occurs.
-
organizationsUrl
public String organizationsUrl() throws IOException
Returns the value of organizations_url property of User's JSON.- Returns:
- The 'organizations_url' property value.
- Throws:
IOException- If any I/O error occurs.
-
reposUrl
public String reposUrl() throws IOException
Returns the value of repos_url property of User's JSON.- Returns:
- The 'repos_url' property value.
- Throws:
IOException- If any I/O error occurs.
-
eventsUrl
public String eventsUrl() throws IOException
Returns the value of events_url property of User's JSON.- Returns:
- The 'events_url' property value.
- Throws:
IOException- If any I/O error occurs.
-
receivedEventsUrl
public String receivedEventsUrl() throws IOException
Returns the value of received_events_url property of User's JSON.- Returns:
- The 'received_events_url' property value.
- Throws:
IOException- If any I/O error occurs.
-
type
public String type() throws IOException
Returns the value of type property of User's JSON.- Returns:
- The 'type' property value.
- Throws:
IOException- If any I/O error occurs.
-
siteAdmin
public boolean siteAdmin() throws IOExceptionReturns the value of site_admin property of User's JSON.- Returns:
- The 'site_admin' property value.
- Throws:
IOException- If any I/O error occurs.
-
blog
public String blog() throws IOException
Returns the value of blog property of User's JSON.- Returns:
- The 'blog' property value.
- Throws:
IOException- If any I/O error occurs.
-
hireable
public boolean hireable() throws IOExceptionReturns the value of hireable property of User's JSON.- Returns:
- The 'hireable' property value.
- Throws:
IOException- If any I/O error occurs.
-
bio
public String bio() throws IOException
Returns the value of bio property of User's JSON.- Returns:
- The 'bio' property value.
- Throws:
IOException- If any I/O error occurs.
-
publicRepos
public int publicRepos() throws IOExceptionReturns the value of public_repos property of User's JSON.- Returns:
- The 'public_repos' property value.
- Throws:
IOException- If any I/O error occurs.
-
publicGists
public int publicGists() throws IOExceptionReturns the value of public_gists property of User's JSON.- Returns:
- The 'public_gists' property value.
- Throws:
IOException- If any I/O error occurs.
-
followersCount
public int followersCount() throws IOExceptionReturns the value of followers property of User's JSON.- Returns:
- The 'followers' property value.
- Throws:
IOException- If any I/O error occurs.
-
followingCount
public int followingCount() throws IOExceptionReturns the value of following property of User's JSON.- Returns:
- The 'following' property value.
- Throws:
IOException- If any I/O error occurs.
-
created
public Github.Time created() throws IOException
Returns the value of created_at property of User's JSON.- Returns:
- The 'created_at' property value.
- Throws:
IOException- If any I/O error occurs.
-
updated
public Github.Time updated() throws IOException
Returns the value of updated_at property of User's JSON.- Returns:
- The 'updated_at' property value.
- Throws:
IOException- If any I/O error occurs.
-
-