1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
# node-libravatar
A library intended for integrating with the federated [Libravatar](http://www.libravatar.org)
avatar hosting service from within your Node.js applications. The project was inspired by a
[Gravatar library](https://github.com/emerleite/node-gravatar) from [Emerson Macedo](http://codificando.com/).
See the [project page](https://github.com/coloradocolby/node-libravatar) for the issue tracker and downloads.
[](https://travis-ci.org/coloradocolby/node-libravatar)
[](https://david-dm.org/coloradocolby/node-libravatar)
[](https://david-dm.org/coloradocolby/node-libravatar#info=devDependencies)
[](https://github.com/coloradocolby/node-libravatar/blob/master/LICENSE.md)
## Installation
To install using npm:
$ npm install libravatar
[](https://nodei.co/npm/libravatar/)
## Usage
To generate the correct avatar URL based on someone's email address, use the
following:
const libravatar = require('libravatar');
...
const get_libravatar_url = async () => {
const avatar_url = await libravatar.get_avatar_url({ email: 'person@example.com', size: 96, default: 'mm', https: false });
}
See the [Libravatar documentation](http://wiki.libravatar.org/api) for more
information on the special values for the "default" parameter.
|