https://github.com/codedotjs/gravator
:earth_asia: Get user information of a Gravatar user.
https://github.com/codedotjs/gravator
Last synced: 7 months ago
JSON representation
:earth_asia: Get user information of a Gravatar user.
- Host: GitHub
- URL: https://github.com/codedotjs/gravator
- Owner: CodeDotJS
- License: mit
- Created: 2016-04-16T01:21:01.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-24T14:16:32.000Z (over 8 years ago)
- Last Synced: 2025-03-16T06:19:42.667Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 59.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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`
```js
'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 `__
```js
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`](https://github.com/CodeDotJS/gravator-cli)__ `: CLI Tool for Gravator.`
- __[`twifo`](https://github.com/CodeDotJS/whatiz-cli)__ `: Get user information of a twitter user.`
## License
MIT © [Rishi Giri](http://rishigiri.com)