Package com.jcabi.github
Class User.Smart
java.lang.Object
com.jcabi.github.User.Smart
- All Implemented Interfaces:
JsonPatchable,JsonReadable,User
- Enclosing interface:
- User
Smart user with extra features.
- Since:
- 0.1
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jcabi.github.User
User.Smart -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet his avatar URL.bio()Returns the value of bio property of User's JSON.blog()Returns the value of blog property of User's JSON.company()Get his company.created()Returns the value of created_at property of User's JSON.email()Get his email.emails()Get user's emails.Returns the value of events_url property of User's JSON.booleanexists()Does it exist in GitHub?intReturns the value of followers property of User's JSON.Returns the value of followers_url property of User's JSON.intReturns the value of following property of User's JSON.Returns the value of following_url property of User's JSON.gistsUrl()Returns the value of gists_url property of User's JSON.github()GitHub we're in.booleanhasName()Check if user has name.booleanhireable()Returns the value of hireable property of User's JSON.htmlUrl()Returns the value of html_url property of User's JSON.intid()Get his ID.jakarta.json.JsonObjectjson()Describe it in a JSON object.keys()Get his keys.location()Get his location.login()Get his login.voidmarkAsRead(Date lastread) Marks notifications as read.name()Get his name.Notifications for this user.Get his organizations.Returns the value of organizations_url property of User's JSON.voidpatch(jakarta.json.JsonObject json) Patch using this JSON object.intReturns the value of public_gists property of User's JSON.intReturns the value of public_repos property of User's JSON.Returns the value of received_events_url property of User's JSON.reposUrl()Returns the value of repos_url property of User's JSON.booleanReturns the value of site_admin property of User's JSON.Returns the value of starred_url property of User's JSON.Returns the value of subscriptions_url property of User's JSON.type()Returns the value of type property of User's JSON.updated()Returns the value of updated_at property of User's JSON.url()Get his URL.
-
Constructor Details
-
Smart
Public ctor.- Parameters:
usr- User
-
-
Method Details
-
exists
Does it exist in GitHub?- Returns:
- TRUE if this user truly exists
- Throws:
IOException- If it fails- Since:
- 0.34
-
id
Get his ID.- Returns:
- Unique user ID
- Throws:
IOException- If it fails- Suppressed Checkstyle violations:
- MethodName (3 lines)
-
avatarUrl
Get his avatar URL.- Returns:
- URL of the avatar
- Throws:
IOException- If it fails
-
url
Get his URL.- Returns:
- URL of the user
- Throws:
IOException- If it fails
-
name
Get his name.- Returns:
- User name
- Throws:
IOException- If it fails
-
hasName
Check if user has name.- Returns:
- True if user has name
- Throws:
IOException- If it fails
-
company
Get his company.- Returns:
- Company name
- Throws:
IOException- If it fails
-
location
Get his location.- Returns:
- Location name
- Throws:
IOException- If it fails
-
email
Get his email.- Returns:
- Throws:
IOException- If it fails
-
github
Description copied from interface:UserGitHub we're in. -
login
Description copied from interface:UserGet his login.- Specified by:
loginin interfaceUser- Returns:
- Login name
- Throws:
IOException- If it fails
-
organizations
Description copied from interface:UserGet his organizations.- Specified by:
organizationsin interfaceUser- Returns:
- UserOrganizations organizations
-
keys
Description copied from interface:UserGet his keys. -
emails
Description copied from interface:UserGet user's emails. -
notifications
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:
-
markAsRead
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:
-
json
Description 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
Description 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
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
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
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
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
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
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
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
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
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
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
Returns the value of type property of User's JSON.- Returns:
- The 'type' property value.
- Throws:
IOException- If any I/O error occurs.
-
siteAdmin
Returns 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
Returns the value of blog property of User's JSON.- Returns:
- The 'blog' property value.
- Throws:
IOException- If any I/O error occurs.
-
hireable
Returns the value of hireable property of User's JSON.- Returns:
- The 'hireable' property value.
- Throws:
IOException- If any I/O error occurs.
-
bio
Returns the value of bio property of User's JSON.- Returns:
- The 'bio' property value.
- Throws:
IOException- If any I/O error occurs.
-
publicRepos
Returns 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
Returns 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
Returns the value of followers property of User's JSON.- Returns:
- The 'followers' property value.
- Throws:
IOException- If any I/O error occurs.
-
followingCount
Returns the value of following property of User's JSON.- Returns:
- The 'following' property value.
- Throws:
IOException- If any I/O error occurs.
-
created
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
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.
-