add documentation
This commit is contained in:
parent
b9471697f0
commit
19ae58b77c
21
README.md
21
README.md
|
@ -1,7 +1,7 @@
|
||||||
API Page
|
API Page
|
||||||
========
|
========
|
||||||
|
|
||||||
Retrieves information from a webpage using `j0k3r/graby` and `fusonic/opengraph`.
|
Retrieves information (JSON) from a web page using `j0k3r/graby` and `fusonic/opengraph`.
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
@ -19,8 +19,6 @@ $ composer install
|
||||||
$ cp .env.dist .env
|
$ cp .env.dist .env
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
@ -30,5 +28,20 @@ To prevent security issue, fill your domain name into `.env`.
|
||||||
In a development environment, you can run the built in PHP web server:
|
In a development environment, you can run the built in PHP web server:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ php -S 12.0.0.1:8080 -t web web/index.php
|
$ php -S 127.0.0.1:8080 -t web web/index.php
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Browse `http://127.0.0.1:8080/do/{parser}?url={url}` where:
|
||||||
|
|
||||||
|
* `parser` is `graby` or `opengraph`
|
||||||
|
* `url` is the page that you want to parse
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
GET http://127.0.0.1:8080/do/graby?url=https://www.deblan.io/post/565/verifier-la-date-d-expiration-de-noms-de-domaine
|
||||||
|
|
||||||
|
Result is https://gist.deblan.org/en/view/5d134f8800cbd
|
||||||
|
|
||||||
|
GET http://127.0.0.1:8080/do/opengraph?url=https://www.deblan.io/post/565/verifier-la-date-d-expiration-de-noms-de-domaine
|
||||||
|
|
||||||
|
Result is https://gist.deblan.org/en/view/5d134fc6c91fa
|
||||||
|
|
Loading…
Reference in a new issue