Co-authored-by: Krzysztof Płaczek <krzysztofplaczek@techtube.pl> Reviewed-on: #1
50 lines
783 B
Markdown
50 lines
783 B
Markdown
## Installation
|
|
|
|
Place this in the composer.json.
|
|
|
|
```composer
|
|
{
|
|
"repositories": [{
|
|
"type": "composer",
|
|
"url": "https://satis.techtube.pl"
|
|
}]
|
|
}
|
|
```
|
|
Then execute to get latest version:
|
|
|
|
```bash
|
|
composer require techtube/bookinfo
|
|
```
|
|
|
|
or this to get specific version:
|
|
|
|
```bash
|
|
composer require techtube/bookinfo:"1.0.4"
|
|
```
|
|
|
|
## Usage
|
|
|
|
To get information about the book by the link:
|
|
|
|
```php
|
|
<?php
|
|
|
|
include_once 'vendor/autoload.php';
|
|
|
|
$searcher = new \Techtube\Bookinfo\BookFinder();
|
|
$data = $searcher->byUrl('https://lubimyczytac.pl/ksiazka/5008411/oni');
|
|
|
|
print_r($data);
|
|
```
|
|
|
|
To search the book by phrase:
|
|
```php
|
|
<?php
|
|
|
|
include_once 'vendor/autoload.php';
|
|
|
|
$searcher = new \Techtube\Bookinfo\BookFinder();
|
|
$data = $searcher->search('jack reacher');
|
|
|
|
print_r($data);
|
|
``` |