Skip to content
Newer
Older
100644 50 lines (35 sloc) 2.02 KB
37da00a @fmarier Initial commit
authored
1 # node-libravatar
2
7d886a8 @fmarier Remove pyLibravatar leftovers from the README and fix version number
authored
3 Here is an easy way to make use of the federated [Libravatar](http://www.libravatar.org)
4 avatar hosting service from within your node.js applications. It is inspired by
5 [Emerson Macedo](http://codificando.com/)'s [Gravatar library](https://github.com/emerleite/node-gravatar).
37da00a @fmarier Initial commit
authored
6
7 See the [project page](https://github.com/fmarier/node-libravatar) for the issue tracker and downloads.
8
9 ## Instalation
10
11 To install using npm, simply do this:
12
13 $ npm install libravatar
14
15 ## Usage
16
17 To generate the correct avatar URL based on someone's email address, use the
18 following:
19
7d886a8 @fmarier Remove pyLibravatar leftovers from the README and fix version number
authored
20 var libravatar = require('libravatar');
172dce5 @fmarier Simplify API of the url() function
authored
21 libravatar.url({ email: 'person@example.com', size: 96, default: 'mm', https: false },
83a49d5 @fmarier Add an error parameter to the callback
authored
22 function (error, avatar_url) {
7d886a8 @fmarier Remove pyLibravatar leftovers from the README and fix version number
authored
23 console.log('<img src="' + avatar_url + '">');
24 });
37da00a @fmarier Initial commit
authored
25
26 See the [Libravatar documentation](http://wiki.libravatar.org/api) for more
27 information on the special values for the "default" parameter.
28
c6d4e53 @fmarier Fix heading in the README
authored
29 ## License
37da00a @fmarier Initial commit
authored
30
cf33ed6 @fmarier Bump version and changelog for release
authored
31 Copyright (C) 2011, 2012 Francois Marier <francois@libravatar.org>
37da00a @fmarier Initial commit
authored
32
33 Permission is hereby granted, free of charge, to any person obtaining a copy
34 of this software and associated documentation files (the "Software"), to
35 deal in the Software without restriction, including without limitation the
36 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
37 sell copies of the Software, and to permit persons to whom the Software is
38 furnished to do so, subject to the following conditions:
39
40 The above copyright notice and this permission notice shall be included in
41 all copies or substantial portions of the Software.
42
43 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
44 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
45 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
46 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
47 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
48 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
49 IN THE SOFTWARE.
Something went wrong with that request. Please try again.