Skip to content

A simple .Net Standard library to easily get profile picture, QR code image for profile and profile information for a user from Gravatar.

License

Notifications You must be signed in to change notification settings

manojkulkarni30/GravatarHelper.NetStandard

Repository files navigation

GravatarHelper.NetStandard

A simple .Net standard library to easily get profile picture URL, QR code image URL for profile and profile information for a user using email address from Gravatar.

Setup

Build Status

App Veyor MyGet CI NuGet

Supported Platform

  • .NetFramework 3.5
  • .NetFramework 4
  • .NetFramework 4.5
  • .NetFramework 4.5.1
  • .NetFramework 4.5.2
  • .NetFramework 4.6
  • .NetFramework 4.6.1
  • .NetFramework 4.6.2
  • .NetStandard 1.3
  • Portable Class Library (.NETFramework 4.5, Windows 8.0, WindowsPhone 8.0, WindowsPhoneApp 8.1)- Profile 259

Get Gravatar Image URL:

To get gravatar image URL for email address "[email protected]", use the following syntax.

Gravatar.GetGravatarImageUrl("[email protected]");

To get image URL over https, use following syntax

Gravatar.GetSecureGravatarImageUrl("[email protected]");

There are different overload methods available where you can specify different parameters like image size, required extension for an image, rating, gravatar default image type etc.

Get the QR Code Image URL:

To get the QR code image URL for email address "[email protected]", use the following syntax.

Gravatar.GetGravatarProfileQrCodeImage("[email protected]");

Get Gravatar Profile Information:

To get the gravatar profile information for a user using email address "[email protected]", use the following syntax.

// Available only for .Net Framework 4.5 and above
await Gravatar.GetGravatarProfileInformationAsync("[email protected]");

// For .Net Framework 3.5 and 4.0
Gravatar.GetGravatarProfileInformation("[email protected]");

Above method will return an object of type OperationResult.

    public class OperationResult
    {
        public bool Success { get; set; }

        public ProfileInformation Profile { get; set; }

        public string Error { get; set; }
    }

If request for profile information is successful, then Success property will be set to true and Profile object will contain the profile information.

If request for profile information failed, then Success property will be set to false, Profile object will be null and Error property will contain the error message.

Note: Profile requests will only resolve for the primary email address

License

Apache 2.0

About

A simple .Net Standard library to easily get profile picture, QR code image for profile and profile information for a user from Gravatar.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published