An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          


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`
```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)