modalnetworks / digital-library
This package for integration with digital library Brazil
1.1.0
2019-02-26 15:35 UTC
Requires
- php: >=5.4
- ext-curl: *
- guzzlehttp/guzzle: ^6.3
Requires (Dev)
- symfony/event-dispatcher: ~2.1
- symfony/var-dumper: ^4.2
This package is auto-updated.
Last update: 2024-11-27 03:56:45 UTC
README
Install
composer require modalnetworks/digital-library
Use in application
use Modalnetworks\DigitalLibrary\AuthenticatedBook; use Modalnetworks\DigitalLibrary\DigitalSettings; use Modalnetworks\DigitalLibrary\Digital; use Modalnetworks\DigitalLibrary\Contracts\ResponseDigitalContract; $data = [ 'FirstName' => 'Joe', 'LastName' => 'Legal', 'Email' => 'joe@legal.fake.com', 'Isbn' => '9788502628489' ]; //start item with data $book = new AuthenticatedBook($data); //add your token $token = 'your_token'; /** * configure with your token * opitional param for add name application */ $settings = new DigitalSettings($token); //add settings in digital library for get url authenticated for read ebook $digital = new Digital($settings); //run for get link $digital->run($book, function(ResponseDigitalContract $digital){ dump($digital); });