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 URL
avatarUrl()
Get his avatar URL.String
bio()
Returns the value of bio property of User's JSON.String
blog()
Returns the value of blog property of User's JSON.String
company()
Get his company.Github.Time
created()
Returns the value of created_at property of User's JSON.String
email()
Get his email.UserEmails
emails()
Get user's emails.String
eventsUrl()
Returns the value of events_url property of User's JSON.boolean
exists()
Does it exist in GitHub?int
followersCount()
Returns the value of followers property of User's JSON.String
followersUrl()
Returns the value of followers_url property of User's JSON.int
followingCount()
Returns the value of following property of User's JSON.String
followingUrl()
Returns the value of following_url property of User's JSON.String
gistsUrl()
Returns the value of gists_url property of User's JSON.Github
github()
Github we're in.boolean
hasName()
Check if user has name.boolean
hireable()
Returns the value of hireable property of User's JSON.String
htmlUrl()
Returns the value of html_url property of User's JSON.int
id()
Get his ID.javax.json.JsonObject
json()
Describe it in a JSON object.PublicKeys
keys()
Get his keys.String
location()
Get his location.String
login()
Get his login.void
markAsRead(Date lastread)
Marks notifications as read.String
name()
Get his name.Notifications
notifications()
Notifications for this user.UserOrganizations
organizations()
Get his organizations.String
organizationsUrl()
Returns the value of organizations_url property of User's JSON.void
patch(javax.json.JsonObject json)
Patch using this JSON object.int
publicGists()
Returns the value of public_gists property of User's JSON.int
publicRepos()
Returns the value of public_repos property of User's JSON.String
receivedEventsUrl()
Returns the value of received_events_url property of User's JSON.String
reposUrl()
Returns the value of repos_url property of User's JSON.boolean
siteAdmin()
Returns the value of site_admin property of User's JSON.String
starredUrl()
Returns the value of starred_url property of User's JSON.String
subscriptionsUrl()
Returns the value of subscriptions_url property of User's JSON.String
type()
Returns the value of type property of User's JSON.Github.Time
updated()
Returns the value of updated_at property of User's JSON.URL
url()
Get his URL.
-
-
-
Constructor Detail
-
Smart
public Smart(User usr)
Public ctor.- Parameters:
usr
- User
-
-
Method Detail
-
exists
public boolean exists() throws IOException
Does it exist in GitHub?- Returns:
- TRUE if this user truly exists
- Throws:
IOException
- If it fails- Since:
- 0.34
-
id
public int id() throws IOException
Get 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 IOException
Check 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:User
Get his login.- Specified by:
login
in interfaceUser
- Returns:
- Login name
- Throws:
IOException
- If it fails
-
organizations
public UserOrganizations organizations()
Description copied from interface:User
Get his organizations.- Specified by:
organizations
in interfaceUser
- Returns:
- UserOrganizations organizations
-
keys
public PublicKeys keys()
Description copied from interface:User
Get his keys.
-
emails
public UserEmails emails()
Description copied from interface:User
Get user's emails.
-
notifications
public Notifications notifications() throws IOException
Description copied from interface:User
Notifications for this user. Wraps the call "List your notifications". See "List your notifications" at https://developer.github.com/v3/activity/notifications/- Specified by:
notifications
in 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:User
Marks notifications as read.- Specified by:
markAsRead
in 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 IOException
Description copied from interface:JsonReadable
Describe it in a JSON object.- Specified by:
json
in interfaceJsonReadable
- Returns:
- JSON object
- Throws:
IOException
- If there is any I/O problem
-
patch
public void patch(javax.json.JsonObject json) throws IOException
Description copied from interface:JsonPatchable
Patch using this JSON object.- Specified by:
patch
in 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 IOException
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
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 IOException
Returns 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 IOException
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
public int publicGists() throws IOException
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
public int followersCount() throws IOException
Returns 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 IOException
Returns 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.
-
-