Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Apr 18, 2018
1 parent 167bbbe commit 8ea2e4f
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 97 deletions.
59 changes: 9 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,17 @@
# avatar-microservice
# unavatar

<p align="center">
<br>
<img src="https://i.imgur.com/Mh13XWB.gif" alt="avatar-microservice">
<br>
</p>

![Last version](https://img.shields.io/github/tag/Kikobeats/avatar-microservice.svg?style=flat-square)
[![Build Status](https://img.shields.io/travis/Kikobeats/avatar-microservice/master.svg?style=flat-square)](https://travis-ci.org/Kikobeats/avatar-microservice)
[![Dependency status](https://img.shields.io/david/Kikobeats/avatar-microservice.svg?style=flat-square)](https://david-dm.org/Kikobeats/avatar-microservice)
[![Dev Dependencies Status](https://img.shields.io/david/dev/Kikobeats/avatar-microservice.svg?style=flat-square)](https://david-dm.org/Kikobeats/avatar-microservice#info=devDependencies)
[![NPM Status](https://img.shields.io/npm/dm/avatar-microservice.svg?style=flat-square)](https://www.npmjs.org/package/avatar-microservice)
![Last version](https://img.shields.io/github/tag/Kikobeats/unavatar.svg?style=flat-square)
[![Build Status](https://img.shields.io/travis/Kikobeats/unavatar/master.svg?style=flat-square)](https://travis-ci.org/Kikobeats/unavatar)
[![Dependency status](https://img.shields.io/david/Kikobeats/unavatar.svg?style=flat-square)](https://david-dm.org/Kikobeats/unavatar)
[![Dev Dependencies Status](https://img.shields.io/david/dev/Kikobeats/unavatar.svg?style=flat-square)](https://david-dm.org/Kikobeats/unavatar#info=devDependencies)
[![NPM Status](https://img.shields.io/npm/dm/unavatar.svg?style=flat-square)](https://www.npmjs.org/package/unavatar)
[![Donate](https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square)](https://paypal.me/Kikobeats)

> Get users avatar across multiple services
## Install

```bash
$ npm install avatar-microservice --save
```

## Usage

```js
const avatarMicroservice = require('avatar-microservice')

avatarMicroservice('do something')
// => return something
```

## API

### avatarMicroservice(input, [options])

#### input

*Required*<br>
Type: `string`

Lorem ipsum.

#### options

##### foo

Type: `boolean`<br>
Default: `false`

Lorem ipsum.
> Get user avatar across social services.
## License

**avatar-microservice** © [Kiko Beats](https://kikobeats.com), released under the [MIT](https://github.com/Kikobeats/avatar-microservice/blob/master/LICENSE.md) License.<br>
Authored and maintained by Kiko Beats with help from [contributors](https://github.com/Kikobeats/avatar-microservice/contributors).
**unavatar.now.sh** © [Kiko Beats](https://kikobeats.com), released under the [MIT](https://github.com/Kikobeats/unavatar.now.sh/blob/master/LICENSE.md) License.<br>
Authored and maintained by Kiko Beats with help from [contributors](https://github.com/Kikobeats/unavatar.now.sh/contributors).

> [kikobeats.com](https://kikobeats.com) · GitHub [Kiko Beats](https://github.com/Kikobeats) · Twitter [@Kikobeats](https://twitter.com/Kikobeats)
2 changes: 1 addition & 1 deletion bin/server
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const express = require('express')

const app = express()

require('./index')(app, express)
require('../src/index')(app, express)

const port = process.env.PORT || process.env.port || 3000
const { name } = require('../package.json')
Expand Down
27 changes: 11 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
{
"name": "avatar-microservice",
"description": "Get user avatar across social services",
"homepage": "https://documentup.com/Kikobeats/avatar-microservice",
"name": "unavatar",
"description": "Get user avatar across social services.",
"homepage": "https://unavatar.now.sh",
"version": "0.0.0",
"main": "src/index.js",
"author": {
"email": "josefrancisco.verdu@gmail.com",
"name": "Kiko Beats",
"email": "josefrancisco.verdu@gmail.com",
"url": "https://kikobeats.com"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Kikobeats/avatar-microservice.git"
"url": "git+https://github.com/Kikobeats/unavatar.git"
},
"bugs": {
"url": "https://github.com/Kikobeats/avatar-microservice/issues"
"url": "https://github.com/Kikobeats/unavatar/issues"
},
"keywords": [],
"dependencies": {
"aigle": "~1.12.0-alpha.6",
"compression": "~1.7.2",
"cors": "~2.8.4",
"express": "~4.16.3",
"got": "~8.3.0",
"helmet": "~3.12.0",
"is-email-like": "~1.0.0",
"lodash": "~4.17.5",
"morgan": "~1.9.0"
"morgan": "~1.9.0",
"quick-lru": "~1.1.0"
},
"devDependencies": {
"ava": "latest",
"browser-sync": "latest",
"coveralls": "latest",
"finepack": "latest",
"git-dirty": "latest",
"gulp": "latest",
Expand All @@ -51,15 +51,10 @@
"svr": "latest"
},
"engines": {
"node": ">= 6"
"node": ">= 8"
},
"files": [
"bin",
"src"
],
"scripts": {
"clean": "rm -rf node_modules",
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"dev": "svr",
"dev:docs": "concurrently \"npm run dev:docs:server\" \"npm run dev:docs:src\"",
"dev:docs:server": "cd static && browser-sync start --server --files \"index.html, **/*.*\"",
Expand All @@ -69,7 +64,7 @@
"pretest": "npm run lint",
"pretty": "prettier-standard index.js {core,test,bin}/**/*.js --single-quote",
"start": "bin/server",
"test": "nyc ava"
"test": "exit 0"
},
"license": "MIT",
"lint-staged": {
Expand Down
Binary file added static/favicon.ico
Binary file not shown.
1 change: 0 additions & 1 deletion static/img/github.svg

This file was deleted.

80 changes: 51 additions & 29 deletions static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,64 @@
<html>

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>avatar.now.sh, get user avatar across multiple services.</title>
<link rel="stylesheet" href="css/style.min.css">
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">

<!-- Search Engine -->
<title>unavatar</title>
<meta name="description" content="It gets the user avatar based on username or email across multiple services, such as Twitter, GitHub, Gravatar, etc.">
<meta name="image" content="/static/logo.png">
<link rel="canonical" href="https://navatar.now.sh" />
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="css/style.min.css">
<link rel="shortcut icon" href="favicon.ico">

<!-- Schema.org for Google -->
<meta itemprop="name" content="unavatar">
<meta itemprop="description" content="It gets the user avatar based on username or email across multiple services, such as Twitter, GitHub, Gravatar, etc.">
<meta itemprop="image" content="https://unavatar.now.sh">

<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="unavatar">
<meta name="twitter:description" content="It gets the user avatar based on username or email across multiple services, such as Twitter, GitHub, Gravatar, etc.">
<meta name="twitter:image" content="/static/logo.png">

<!-- Open Graph general (Facebook, Pinterest & Google+) -->
<meta name="og:title" content="unavatar">
<meta name="og:description" content="It gets the user avatar based on username or email across multiple services, such as Twitter, GitHub, Gravatar, etc.">
<meta name="og:image" content="/static/logo.png">
<meta name="og:url" content="https://navatar.now.sh">
</head>

<body class="hack">
<article class="main container">
<h1>avatar.now.sh <a href="#" class="icon-github"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path></svg></a></h1>

<p>Get user avatar across social services.</p>
<h2>From username</h2>
<p><code>&lt;img src="https://avatar.now.sh/:username" /&gt;</code></p>
<p>i.e <a target="_blank" href="https://avatar.now.sh/kikobeats">https://avatar.now.sh/kikobeats</a></p>
<h2>From email</h2>
<p><code>&lt;img src="https://avatar.now.sh/:email" /&gt;</code></p>
<p>i.e <a target="_blank" href="https://avatar.now.sh/josefrancisco.verdu@gmail.com">https://avatar.now.sh/josefrancisco.verdu@gmail.com</a></p>
<h2>as JSON</h2>
<p>Alternatively you can get the avatar url adding <code>/json</code></p>
<pre class="language-json"><code class="language-json">// https://avatar.now.sh/kikobeats/json
<article class="main container">
<h1>unavatar <a target="_blank" href="https://github.com/Kikobeats/unavatar" class="icon-github"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path></svg></a></h1>
<p>Get user avatar across social services.</p>
<h2>From username</h2>
<p><code>&lt;img src="https://unavatar.now.sh/:username" /&gt;</code></p>
<p>i.e <a target="_blank" href="https://unavatar.now.sh/kikobeats">https://unavatar.now.sh/kikobeats</a></p>
<h2>From email</h2>
<p><code>&lt;img src="https://unavatar.now.sh/:email" /&gt;</code></p>
<p>i.e <a target="_blank" href="https://unavatar.now.sh/josefrancisco.verdu@gmail.com">https://unavatar.now.sh/josefrancisco.verdu@gmail.com</a></p>
<h2>as JSON</h2>
<p>Alternatively you can get the avatar url adding <code>/json</code></p>
<pre class="language-json"><code class="language-json">// https://unavatar.now.sh/kikobeats/json

{
"url": "myrul"
}</code></pre>
<h2>Specifying the service</h2>
<p>Each service has his own endpoint, so you can query it directly.</p>
<h3>Twitter</h3>
<p><code>&lt;img src="https://avatar.now.sh/twitter/:username" /&gt;</code></p>
<p>i.e <a target="_blank" href="https://avatar.now.sh/twitter/kikobeats">https://avatar.now.sh/twitter/kikobeats</a></p>
<h3>GitHub</h3>
<p><code>&lt;img src="https://avatar.now.sh/github/:username" /&gt;</code></p>
<p>i.e <a target="_blank" href="https://avatar.now.sh/github/kikobeats">https://avatar.now.sh/github/kikobeats</a></p>
<h3>Gravatar</h3>
<p><code>&lt;img src="https://avatar.now.sh/gravatar/:email" /&gt;</code></p>
<p>i.e <a target="_blank" href="https://avatar.now.sh/email/josefrancisco.verdu@gmail.com">https://avatar.now.sh/email/josefrancisco.verdu@gmail.com</a></p>
<h2>Specifying the service</h2>
<p>Each service has his own endpoint, so you can query it directly.</p>
<h3>Twitter</h3>
<p><code>&lt;img src="https://unavatar.now.sh/twitter/:username" /&gt;</code></p>
<p>i.e <a target="_blank" href="https://unavatar.now.sh/twitter/kikobeats">https://unavatar.now.sh/twitter/kikobeats</a></p>
<h3>GitHub</h3>
<p><code>&lt;img src="https://unavatar.now.sh/github/:username" /&gt;</code></p>
<p>i.e <a target="_blank" href="https://unavatar.now.sh/github/kikobeats">https://unavatar.now.sh/github/kikobeats</a></p>
<h3>Gravatar</h3>
<p><code>&lt;img src="https://unavatar.now.sh/gravatar/:email" /&gt;</code></p>
<p>i.e <a target="_blank" href="https://unavatar.now.sh/email/josefrancisco.verdu@gmail.com">https://unavatar.now.sh/email/josefrancisco.verdu@gmail.com</a></p>
</article>
<script src="js/main.min.js"></script>
</body>
Expand Down
Binary file added static/logo-trim.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8ea2e4f

Please sign in to comment.