wlbrough / clearbit-api
A complete (unofficial) PHP SDK for Clearbit
Installs: 1 235
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 3
Forks: 4
Open Issues: 0
Requires
- php: ~5.6|~7.0
- guzzlehttp/guzzle: ~6.0
Requires (Dev)
- phpunit/phpunit: >=5.4.3
- squizlabs/php_codesniffer: ^2.3
This package is not auto-updated.
Last update: 2024-11-24 06:40:45 UTC
README
Clearbit API Client. Currently supporting the Enrichment API, but the entire API is on the roadmap for implementation. The current implementation uses v2 endpoints.
Install
Via Composer
$ composer require wlbrough/clearbit-api
Quick Start
This implementation supports using one or multiple api keys. If a single key is used, clients are generated using static functions, otherwise instance methods generate clients.
Using a single key
All of the following examples assume the following step:
use wlbrough\clearbit\Clearbit; Clearbit::setKey('token');
Configuring endpoint behavior
By default, Clearbit transmits data to a webhook if data is not immediately available. You can configure an endpoint url to receive webhooks, or you can use the steaming API to wait for results.
$enrichment = Clearbit::createEnrichmentApi(); // Webhook endpoint $enrichment->setWebhookEndpoint('https://test.com/api/webhook'); // Streaming $enrichment->enableStreaming();
Get combined (person and company) data
$enrichment = Clearbit::createEnrichmentApi(); $enrichment->combined('test@test.com');
Get person data
$enrichment = Clearbit::createEnrichmentApi(); $enrichment->person('test@test.com');
To subscribe to updates:
$enrichment = Clearbit::createEnrichmentApi(); $enrichment->person('test@test.com', true);
Get company data
$enrichment = Clearbit::createEnrichmentApi(); $enrichment->company('test.com');
Name To Domain
$nameToDomain = Clearbit::createNameToDomain(); $nameToDomain->get('Segment');
Status
- Enrichment
- Discovery
- Prospector
- Risk
- Reveal
- Name To Domain
- Logo
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email wlbrough@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.