-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🦄 chore: change package name to meta-fetcher
- Loading branch information
1 parent
5fd66b2
commit 29c01bc
Showing
2 changed files
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
# meta-fetch :mag_right: | ||
# meta-fetcher :mag_right: | ||
|
||
> Tiny URL meta-data fetcher that scraps the meta-data of a given `URL` string. | ||
![Travis (.com) branch](https://img.shields.io/travis/com/rocktimsaikia/meta-fetch/master) | ||
![Travis (.com) branch](https://img.shields.io/travis/com/rocktimsaikia/meta-fetcher/master) | ||
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo) | ||
|
||
Under the hood it uses [node-fetch](https://github.com/node-fetch/node-fetch) to fetch the metadata, parses it and returns it as json object. | ||
|
||
## Install | ||
|
||
```sh | ||
npm install meta-fetch | ||
npm install meta-fetcher | ||
``` | ||
|
||
## Basic Usage | ||
```js | ||
const {fetchMetaData} = require('meta-fetch'); | ||
const {fetchMetaData} = require('meta-fetcher'); | ||
|
||
(async () => { | ||
const result = await fetchMetaData('https://hoppscotch.io/'); | ||
|
@@ -56,7 +56,7 @@ const {fetchMetaData} = require('meta-fetch'); | |
You can optionally set the `userAgent` and `fromEmail` options in request `Header` while fetching the meta-data. | ||
|
||
```js | ||
const {fetchMetaData} = require('meta-fetch'); | ||
const {fetchMetaData} = require('meta-fetcher'); | ||
|
||
(async () => { | ||
const result = await fetchMetaData('https://hoppscotch.io/', { | ||
|
@@ -70,7 +70,7 @@ const {fetchMetaData} = require('meta-fetch'); | |
|
||
It can also fetch meta-data from `shortened-url` .For example: | ||
```js | ||
const {fetchMetaData} = require('meta-fetch'); | ||
const {fetchMetaData} = require('meta-fetcher'); | ||
|
||
(async () => { | ||
const result = await fetchMetaData('https://bit.ly/2Fj9sNF'); | ||
|
@@ -83,7 +83,7 @@ You can set these options in Header while fetching the data if needed. | |
|
||
| Option | Required | Default Value | | ||
| :------------- | :----------: | -----------: | | ||
| `userAgent` | No | `meta-fetch` | | ||
| `userAgent` | No | `meta-fetcher` | | ||
| `fromEMail` | No | `[email protected]` | | ||
|
||
## API | ||
|