jobbrander / infoconnect-php-client
Infoconnect API Client for PHP projects
Requires
- php: >=5.6.0
- guzzlehttp/guzzle: ~6.0
Requires (Dev)
- mockery/mockery: >=0.9.4
- phpunit/php-code-coverage: ~3.0
- phpunit/phpunit: >=5.1
- squizlabs/php_codesniffer: ~2.0
This package is auto-updated.
Last update: 2024-10-29 04:58:47 UTC
README
Infoconnect provides some excellent company and personnel data that you can access via their API. This wrapper makes it easy to connect to and use their data in a PHP application. See more information about the Infoconnect API here.
Note: This project is still a work in progress and may change frequently. Be aware of this if you decide to use it in production, and please let me know if you'd like to contribute.
Installation
To install, use composer:
composer require jobbrander/infoconnect-php-client
Usage
Get Company by ID
$client = new new InfoconnectClient(['apiKey' => XXX]); $id = '826381212'; $result = $client->getCompany($id); var_dump($result);
Search for Companies
Using GET Method
$client = new new InfoconnectClient(['apiKey' => XXX]); $parameters = [ 'companyname' => 'Google', 'resourcetype' => 'Enhanced', ]; $results = $client->getSearchCompanies($parameters); var_dump($results);
Using POST Method
$client = new new InfoconnectClient(['apiKey' => XXX]); $parameters = [ 'companyname' => 'Google', 'resourcetype' => 'Enhanced', ]; $results = $client->postSearchCompanies($parameters); var_dump($results);
Get Number of Results for Search
$client = new new InfoconnectClient(['apiKey' => XXX]); $parameters = [ 'companyname' => 'Google', ]; $results = $client->postCountCompanies($parameters); var_dump($results);
Testing
Unit testing is important. If you're going to make a pull request against this library, please be sure to write some tests as well.
Running Tests
- Run the PHPUnit test suite:
APIKEY=<YOUR API KEY> phpunit
- Run the PHPUnit tests with code coverage report
APIKEY=<YOUR API KEY> phpunit --coverage-text
Contributing
Please see CONTRIBUTING for details.
License
The Apache 2.0. Please see License File for more information.