PHP Sqreen API Client
, (*1)
This package makes it easy to interact with the Sqreen API., (*2)
Requirements
This package requires PHP >= 5.5., (*3)
Installation
You can install the package via composer:, (*4)
``` bash
composer require m1guelpf/sqreen-api, (*5)
## Usage
You must pass a Guzzle client and the API token to the constructor of `M1guelpf\SqreenAPI\Sqreen`.
``` php
$sqreen = new \M1guelpf\SqreenAPI\Sqreen('YOUR_SQREEN_API_TOKEN');
or you can skip the token and use the connect()
method later, (*6)
``` php
$sqreen = new \M1guelpf\SqreenAPI\Sqreen();, (*7)
$sqreen->connect('YOUR_SQREEN_API_TOKEN');, (*8)
### Get Email info
``` php
$sqreen->emails($email);
Get IP info
``` php
$sqreen->ips($ip);, (*9)
### Get the Guzzle Client
``` php
$sqreen->getClient();
Set the Guzzle Client
``` php
$client = new \GuzzleHttp\Client(); // Example Guzzle client
$sqreen->setClient($client);, (*10)
where $client is an instance of `\GuzzleHttp\Client`.
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
## Testing
``` bash
$ composer test
Contributing
Please see CONTRIBUTING for details., (*11)
Security
If you discover any security related issues, please email soy@miguelpiedrafita.com instead of using the issue tracker., (*12)
Credits
License
The Mozilla Public License 2.0 (MPL-2.0). Please see License File for more information., (*13)