java.lang.Object
com.github.natche.gravatarjavaclient.profile.serialization.GravatarProfile

@Immutable public final class GravatarProfile extends Object
The results of a Gravatar profile request. Profile Request API Documentation.
  • Constructor Details

    • GravatarProfile

      public GravatarProfile(String hash, String displayName, String profileUrl, String avatarUrl, String avatarAltText, String location, String description, String jobTitle, String company, List<GravatarProfileVerifiedAccount> verifiedAccounts, String pronunciation, String pronouns, String timezone, List<GravatarProfileLanguage> languages, String firstName, String lastName, boolean isOrganization, List<GravatarProfileUrl> links, List<GravatarProfileInterest> interests, GravatarProfilePayments payments, GravatarProfileContactInfo contactInfo, List<GravatarProfileGalleryImage> gallery, int numberVerifiedAccounts, String lastProfileEdit, String registrationDate)
      Constructs a new GravatarProfile.
      Parameters:
      hash - the SHA256 hash of the user's primary email address
      displayName - the user's display name
      profileUrl - the full URL to the user's Gravatar profile
      avatarUrl - the URL to the user's avatar image
      avatarAltText - alternative text describing the user's avatar
      location - the user's geographical location
      description - a short biography or description about the user
      jobTitle - the user's current job title
      company - the name of the company where the user is employed
      verifiedAccounts - a list of verified accounts the user has added to their profile
      pronunciation - a phonetic guide to pronouncing the user's name
      pronouns - the pronouns the user prefers to use
      timezone - the timezone the user has set
      languages - the languages the user has selected on their profile
      firstName - the user's first name
      lastName - the user's last name
      isOrganization - whether this account is marked as an organization account
      links - the links the user has displayed on their profile
      interests - the interests the user has displayed on their profile
      payments - the payments objects containing the payment data
      contactInfo - the contact info object containing the contact information
      gallery - the gallery images the user has displayed on their account
      numberVerifiedAccounts - the number of verified accounts associated with this user
      lastProfileEdit - the last time this account was edited
      registrationDate - the date this account was registered
  • Method Details

    • getHash

      public String getHash()
      Returns the SHA256 hash of the user’s primary email address.
      Returns:
      the SHA256 hash of the user’s primary email address
    • getDisplayName

      public String getDisplayName()
      Returns the user’s display name that appears on their profile.
      Returns:
      the user’s display name that appears on their profile
    • getProfileUrl

      public String getProfileUrl()
      Returns the full URL to the user’s Gravatar profile.
      Returns:
      the full URL to the user’s Gravatar profile
    • getAvatarUrl

      public String getAvatarUrl()
      Returns the URL to the user’s avatar image, if set.
      Returns:
      the URL to the user’s avatar image, if set
    • getAvatarAltText

      public String getAvatarAltText()
      Returns alternative text describing the user’s avatar.
      Returns:
      alternative text describing the user’s avatar
    • getLocation

      public String getLocation()
      Returns the user’s geographical location.
      Returns:
      The user’s geographical location
    • getDescription

      public String getDescription()
      Returns a short biography or description about the user found on their profile.
      Returns:
      a short biography or description about the user found on their profile
    • getJobTitle

      public String getJobTitle()
      Returns the user’s current job title.
      Returns:
      the user’s current job title
    • getCompany

      public String getCompany()
      Returns the name of the company where the user is employed.
      Returns:
      the name of the company where the user is employed
    • getVerifiedAccounts

      public com.google.common.collect.ImmutableList<GravatarProfileVerifiedAccount> getVerifiedAccounts()
      Returns a list of verified accounts the user has added to their profile. The number of verified accounts displayed is limited to a maximum of 4 in unauthenticated requests
      Returns:
      a list of verified accounts
    • getPronunciation

      public String getPronunciation()
      Returns a phonetic guide to pronouncing the user’s name.
      Returns:
      a phonetic guide to pronouncing the user’s name
    • getPronouns

      public String getPronouns()
      Returns the pronouns the user prefers to use.
      Returns:
      the pronouns the user prefers to use
    • getTimezone

      public Optional<String> getTimezone()
      Returns the timezone the user has set.
      Returns:
      the timezone the user has set
    • getLanguages

      public com.google.common.collect.ImmutableList<GravatarProfileLanguage> getLanguages()
      Returns the languages the user has selected on their profile.
      Returns:
      the languages the user has selected on their profile
    • getFirstName

      public Optional<String> getFirstName()
      Returns the user's first name.
      Returns:
      the user's first name
    • getLastName

      public Optional<String> getLastName()
      Returns the user's last name.
      Returns:
      the user's last name
    • isOrganization

      public boolean isOrganization()
      Returns whether this account is marked as an organization account.
      Returns:
      whether this account is marked as an organization account
    • getLinks

      public com.google.common.collect.ImmutableList<GravatarProfileUrl> getLinks()
      Returns the links the user has displayed on their profile.
      Returns:
      the links the user has displayed on their profile
    • getInterests

      public com.google.common.collect.ImmutableList<GravatarProfileInterest> getInterests()
      Returns the interests the user has displayed on their profile.
      Returns:
      the interests the user has displayed on their profile
    • getPayments

      public Optional<GravatarProfilePayments> getPayments()
      Returns the payments objects containing the payment data the user has displayed on their account.
      Returns:
      the payments objects containing the payment data the user has displayed on their account
    • getContactInfo

      public Optional<GravatarProfileContactInfo> getContactInfo()
      Returns the contact info object containing the contact information the user has displayed on their account.
      Returns:
      the contact info object containing the contact information the user has displayed on their account
    • getGallery

      public com.google.common.collect.ImmutableList<GravatarProfileGalleryImage> getGallery()
      Returns the gallery images the user has displayed on their account.
      Returns:
      the gallery images the user has displayed on their account
    • getNumberVerifiedAccounts

      public int getNumberVerifiedAccounts()
      Returns the number of verified accounts associated with this user.
      Returns:
      the number of verified accounts associated with this user
    • getLastProfileEdit

      public Optional<Instant> getLastProfileEdit()
      Returns the last time this account was edited at.
      Returns:
      the last time this account was edited at
    • getRegistrationDate

      public Optional<Instant> getRegistrationDate()
      Returns the date this account was registered at.
      Returns:
      the date this account was registered at
    • equals

      public boolean equals(Object o)
      Returns whether the provided object is equal to this.
      Overrides:
      equals in class Object
      Parameters:
      o - the other object
      Returns:
      whether the provided object is equal to this
    • hashCode

      public int hashCode()
      Returns a hashcode for this object.
      Overrides:
      hashCode in class Object
      Returns:
      a hashcode for this object
    • toString

      public String toString()
      Returns a string representation of this object.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this object