New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@fictiv/gravatar-api

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fictiv/gravatar-api

module to build image and profile urls for gravatar

  • 1.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

gravatar-api

Build Status Dependencies

Node module to build image and profile urls for gravatar.

gravatar-api makes it easy to build gravatar image and profile urls.

To Install

Using node package manager

Example
npm install --save gravatar-api

To Use

Simply add the following require statement to import the module and then call the imageUrl method with the relevant options.

Example
var gravatar = require('gravatar-api');
var options = {
    email: 'test@gmail.com'
}
var avatar = gravatar.imageUrl(options);

You can also specify the size of the image with the following (or any valid gravatar image option)

Example
var options = {
    email: 'test@gmail.com',
    parameters: { "size": "200" }
}
var avatar = gravatar.imageUrl(options);

A valid size is between 1 - 2048.

For more options, see gravatar documentation

Secure Endpoint

You can specify retrieving the secure version of the URL by setting the secure property to true

Example
var options = {
    email: 'test@gmail.com',
    parameters: { "size": "200", "d": "mm" },
    secure: true
}
var avatar = gravatar.imageUrl(options);

Gravatar Profile URLs

You can retrieve a user's gravatar profile url.

see the gravatar docs for more information on what parameters can be used for each type.

Example
var options = {
    email: 'test@gmail.com',
    type: 'json', // Default: json,
                  // Available Types: 'json', 'xml', 'qr', 'php', 'vcf'
    parameters: {'callback': 'doSomething' }, //optional
    secure: true
}
var gravatarProfileUrl = gravatar.getProfileUrl(options);

Notes

  • All values in parameters will be url encoded
  • compatible with react-native

Keywords

FAQs

Package last updated on 14 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc