messserli90 / hunterio
Laravel对Hunter.io API进行电子邮件地址发现的包装器
2.0.0
2021-03-09 14:13 UTC
Requires
- php: ^7.4|^8.0
- guzzlehttp/guzzle: ^7.0
- illuminate/http: ^8.0
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.5
README
使用此包,您可以轻松查询Hunter.io API。
以下是一些提供的方法示例
use Hunter; // Retrieve email addresses at a given domain Hunter::domainSearch('ghost.org') // Retrieve email addresses of people with a marketing title from ghost.org Hunter::domainSearch()->domain('ghost.org')->department('marketing')->get(); // Find an email address belonging to John Doe working at Ghost Hunter::emailFinder()->company('Ghost')->name('John Doe')->get();
安装
需要Laravel 8+和PHP 7.4+
对于Laravel 7,使用
messerli90/hunter@1.1.0
您可以通过composer安装此包
composer require messerli90/hunterio
您需要一个API密钥,来自Hunter.io
可选地,您可以使用此命令发布此包的配置文件
php artisan vendor:publish --provider="Messerli90\Hunterio\HunterServiceProvider"
或者,手动将其添加到您的config/services.php文件中
[
...
'hunter' => [
'key' => env('HUNTER_API_KEY')
]
]
用法
阅读Hunter.io API文档,检查如何处理每个端点的响应。
域名搜索
搜索与一个网站相对应的所有电子邮件地址。
// Shortcut to search by domain Hunter::domainSearch('ghost.org') // Specify searching by company name or domain Hunter::domainSearch()->company('Ghost')->get(); Hunter::domainSearch()->domain('ghost.org')->get(); // Narrow your search by chaining attributes $query = Hunter::domainSearch()->company('Ghost')->domain('ghost.org') ->seniority(['senior', 'executive'])->department('marketing') ->limit(5)->skip(5)->type('personal') ->get();
电子邮件查找器
此API端点从域名、名和姓生成或检索最可能的电子邮件地址。
// Shortcut assumes searching by domain Hunter::emailFinder('ghost.org')->name('John', 'Doe')->get(); // Search by first and last name Hunter::emailFinder()->domain('ghost.org')->name('John', 'Doe')->get(); // or use a single string to search by 'full name' Hunter::emailFinder()->company('Ghost')->name('John Doe')->get();
电子邮件计数
此API端点允许您知道我们为一个域名或一个公司拥有多少电子邮件地址。这是免费的,不需要身份验证。
此端点是公开的,不需要API密钥
// Passing argument assumes searching by domain Hunter::emailCount('ghost.org'); // Or specify domain or company name Hunter::emailCount()->company('Ghost')->get(); // Narrow search to only 'personal' addresses Hunter::emailCount()->domain('ghost.org')->type('personal')->get();
电子邮件验证器
此API端点允许您验证电子邮件地址的可投递性。
Hunter::verifyEmail('steli@close.io');
账户
此API端点允许您随时获取有关您的Hunter账户的信息。
Hunter::account();
测试
./vendor/bin/phpunit
路线图
- 域名搜索
- 电子邮件查找器
- 电子邮件验证器
- 电子邮件计数
- 账户信息
- 潜在客户
- 潜在客户列表
更改日志
有关最近更改的更多信息,请参阅更改日志。
贡献
有关详细信息,请参阅贡献。
安全
如果您发现任何安全相关的问题,请通过@michaelmesserli发推文给我,而不是使用问题跟踪器。
鸣谢
许可
MIT许可(MIT)。有关更多信息,请参阅许可文件。