Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including gravator with all npm packages installed. Try it out:

var gravator = require("gravator")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

gravator v1.0.2

An unofficial API for Gravatar.com mostly for scrapping user data

GRAVATOR

An unofficial API for Gravatar.com mostly for scrapping user data.

Install

$ npm install --save gravator

Usage

  • username of a gravatar user is always __foo__@example.com
'use strict';

const gravator = require('gravator');

gravator('username', 'options').then(res => {
    console.log(res);
    // {opts: 'data'}
});

gravator('foo', 'hash').then(res => {
    console.log(res);
    // {opts: 'foo'}
})

API

gravator(username, options)

username

Type: string

options

Type: string

Options:

  • id

Example

gravator('matt', 'id').then(res => {
    console.log(res);
    // // {opts: '5'}
});
  • hash

  • requestHash

  • profileUrl

  • preferredUsername

  • thumbnailUrl

  • photos

  • name

  • ims

  • displayName

  • aboutMe

  • currentLocation

  • emails

  • accounts

  • urls

Related

  • gravator-cli : CLI Tool for Gravator.

  • twifo : Get user information of a twitter user.

License

MIT © Rishi Giri

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free