Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/m1guelpf/php-sqreen-api
A PHP Client for the Sqreen API
https://github.com/m1guelpf/php-sqreen-api
api client guzzle php sqreen
Last synced: 20 days ago
JSON representation
A PHP Client for the Sqreen API
- Host: GitHub
- URL: https://github.com/m1guelpf/php-sqreen-api
- Owner: m1guelpf
- License: mpl-2.0
- Created: 2017-05-18T18:57:57.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-11-16T18:32:55.000Z (almost 5 years ago)
- Last Synced: 2024-05-02T05:09:40.626Z (6 months ago)
- Topics: api, client, guzzle, php, sqreen
- Language: PHP
- Size: 16.6 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# PHP Sqreen API Client
[![Latest Version on Packagist](https://img.shields.io/packagist/v/m1guelpf/sqreen-api.svg?style=flat-square)](https://packagist.org/packages/m1guelpf/sqreen-api)
[![Software License](https://img.shields.io/github/license/m1guelpf/php-sqreen-api.svg?style=flat-square)](LICENSE.md)
[![Build Status](https://img.shields.io/travis/m1guelpf/php-sqreen-api/master.svg?style=flat-square)](https://travis-ci.org/m1guelpf/php-sqreen-api)
[![Total Downloads](https://img.shields.io/packagist/dt/m1guelpf/sqreen-api.svg?style=flat-square)](https://packagist.org/packages/m1guelpf/sqreen-api)This package makes it easy to interact with [the Sqreen API](https://doc.sqreen.io/reference).
## Requirements
This package requires PHP >= 5.5.
## Installation
You can install the package via composer:
``` bash
composer require m1guelpf/sqreen-api
```## 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
``` php
$sqreen = new \M1guelpf\SqreenAPI\Sqreen();$sqreen->connect('YOUR_SQREEN_API_TOKEN');
```### Get Email info
``` php
$sqreen->emails($email);
```### Get IP info
``` php
$sqreen->ips($ip);
```### Get the Guzzle Client
``` php
$sqreen->getClient();
```### Set the Guzzle Client
``` php
$client = new \GuzzleHttp\Client(); // Example Guzzle client
$sqreen->setClient($client);
```
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](CONTRIBUTING.md) for details.
## Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
## Credits
- [Miguel Piedrafita](https://github.com/m1guelpf)
- [All Contributors](../../contributors)## License
The Mozilla Public License 2.0 (MPL-2.0). Please see [License File](LICENSE.md) for more information.