mirror of
https://github.com/misskey-dev/summaly.git
synced 2025-05-19 12:37:23 +09:00
README
This commit is contained in:
parent
44de9c6793
commit
4cc6be225e
30
README.md
30
README.md
@ -1,5 +1,5 @@
|
|||||||
summaly
|
summaly
|
||||||
=======
|
================================================================
|
||||||
|
|
||||||
[![][npm-badge]][npm-link]
|
[![][npm-badge]][npm-link]
|
||||||
[![][mit-badge]][mit]
|
[![][mit-badge]][mit]
|
||||||
@ -12,20 +12,20 @@ summaly
|
|||||||
Get any web page's summary. [Try it out](https://runkit.com/npm/summaly)
|
Get any web page's summary. [Try it out](https://runkit.com/npm/summaly)
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
----------------------------------------------------------------
|
||||||
`$ npm install summaly`
|
`$ npm install summaly`
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
-----
|
----------------------------------------------------------------
|
||||||
``` javascript
|
``` javascript
|
||||||
summaly(url[, opts])
|
summaly(url[, opts])
|
||||||
```
|
```
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
| Property | Type | Description | Default |
|
| Property | Type | Description | Default |
|
||||||
| :------------------ | :--------------------- | :-------------------------- | :------ |
|
| :------------------ | :--------------------- | :----------------------- | :------ |
|
||||||
| **followRedirects** | *boolean* | リダイレクトを解決するかどうか | `true` |
|
| **followRedirects** | *boolean* | Whether follow redirects | `true` |
|
||||||
| **plugins** | *plugin[]* (see below) | Custom plugins | `null` |
|
| **plugins** | *plugin[]* (see below) | Custom plugins | `null` |
|
||||||
|
|
||||||
#### Plugin
|
#### Plugin
|
||||||
``` typescript
|
``` typescript
|
||||||
@ -40,12 +40,12 @@ A Promise of an Object that contains properties below:
|
|||||||
|
|
||||||
| Property | Type | Description |
|
| Property | Type | Description |
|
||||||
| :-------------- | :------- | :--------------------------------------- |
|
| :-------------- | :------- | :--------------------------------------- |
|
||||||
| **description** | *string* | The description of そのWebページ |
|
| **description** | *string* | The description of the web page |
|
||||||
| **icon** | *string* | The url of the icon of そのWebページ |
|
| **icon** | *string* | The url of the icon of the web page |
|
||||||
| **sitename** | *string* | The name of そのWebサイト |
|
| **sitename** | *string* | The name of the web site |
|
||||||
| **thumbnail** | *string* | The url of the thumbnail of そのWebページ |
|
| **thumbnail** | *string* | The url of the thumbnail of the web page |
|
||||||
| **title** | *string* | The title of そのWebページ |
|
| **title** | *string* | The title of the web page |
|
||||||
| **url** | *string* | The url of そのWebページ |
|
| **url** | *string* | The url of the web page |
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
``` javascript
|
``` javascript
|
||||||
@ -67,11 +67,11 @@ console.log(summary); // will be ... ↓
|
|||||||
```
|
```
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
-------
|
----------------------------------------------------------------
|
||||||
`npm run test`
|
`npm run test`
|
||||||
|
|
||||||
License
|
License
|
||||||
-------
|
----------------------------------------------------------------
|
||||||
[MIT](LICENSE)
|
[MIT](LICENSE)
|
||||||
|
|
||||||
[npm-link]: https://www.npmjs.com/package/summaly
|
[npm-link]: https://www.npmjs.com/package/summaly
|
||||||
|
Loading…
x
Reference in New Issue
Block a user