An open API service indexing awesome lists of open source software.

https://github.com/scullwm/dbip-client

Modern client library for the db-ip.com API services
https://github.com/scullwm/dbip-client

api-client api-client-php db-ip hacktoberfest hacktoberfest-accepted hacktoberfest2021

Last synced: 7 months ago
JSON representation

Modern client library for the db-ip.com API services

Awesome Lists containing this project

README

          



DbIpClient


Modern client library for the db-ip.com API services

## Getting Started

First of all, you need to define an add the API client in your project.
`composer require scullwm/dbip-client`

```php
$dbipClient = new Client('my_secret_token');
$ipDetails = $dbipClient->getIpDetails('8.8.8.8');
$ipDetails->isRisky(); // false

$apiThrottling = $dbipClient->getApiThrottling();
echo $apiThrottling->getQueriesLeft(); // 9996
```

### Running the Test Suite

Once you have all dependencies installed via `composer install`, you can run the test suite with:

```bash
./vendor/bin/phpunit tests/
```