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.
Since:
0.1
See Also:
  • Constructor Details

    • Smart

      public Smart(User usr)
      Public ctor.
      Parameters:
      usr - User
  • Method Details

    • 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:
      Email
      Throws:
      IOException - If it fails
    • github

      public GitHub github()
      Description copied from interface: User
      GitHub we're in.
      Specified by:
      github in interface User
      Returns:
      GitHub
    • login

      public String login() throws IOException
      Description copied from interface: User
      Get his login.
      Specified by:
      login in interface User
      Returns:
      Login name
      Throws:
      IOException - If it fails
    • organizations

      public UserOrganizations organizations()
      Description copied from interface: User
      Get his organizations.
      Specified by:
      organizations in interface User
      Returns:
      UserOrganizations organizations
    • keys

      public PublicKeys keys()
      Description copied from interface: User
      Get his keys.
      Specified by:
      keys in interface User
      Returns:
      PublicKeys keys
    • emails

      public UserEmails emails()
      Description copied from interface: User
      Get user's emails.
      Specified by:
      emails in interface User
      Returns:
      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 interface User
      Returns:
      Notifications for this user.
      Throws:
      IOException - Thrown, if an error during sending request and/or receiving response occurs.
      See Also:
    • markAsRead

      public void markAsRead(Date lastread) throws IOException
      Description copied from interface: User
      Marks notifications as read.
      Specified by:
      markAsRead in interface User
      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

      public jakarta.json.JsonObject json() throws IOException
      Description copied from interface: JsonReadable
      Describe it in a JSON object.
      Specified by:
      json in interface JsonReadable
      Returns:
      JSON object
      Throws:
      IOException - If there is any I/O problem
    • patch

      public void patch(jakarta.json.JsonObject json) throws IOException
      Description copied from interface: JsonPatchable
      Patch using this JSON object.
      Specified by:
      patch in interface JsonPatchable
      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.