skip405 / kickbox-wordpress
This package provides a Kickbox Email Verification API-client that uses WordPress HTTP-requests functions. Ideal if you want to employ Kickbox email verification in a WordPress plugin or theme.
v1.0.3
2022-05-14 09:34 UTC
Requires
- php: >=7.0
- ext-json: *
Requires (Dev)
README
This package provides a Kickbox Email Verification API-client that uses WordPress HTTP-requests functions. Ideal if you want to employ Kickbox email verification in a WordPress plugin or theme.
Installation
Install via composer:
composer require skip405/kickbox-wordpress
Examples
Verify a single email address
// include your composer dependencies require_once 'vendor/autoload.php'; $client = new Skip405\Kickbox\WordPress\Client( "KICKBOX_API_KEY" ); $verified_email = $client->verify( "jane.doe@example.com" );
See response examples in the wiki.
Batch verification
// include your composer dependencies require_once 'vendor/autoload.php'; $client = new Skip405\Kickbox\WordPress\Client( "KICKBOX_API_KEY" ); $batch = $client->verify_batch( array( "jane.doe@example.com", "john.doe@example.com" ), array( "filename" => "My batch filename" ) );
See response examples in the wiki.
Check batch verification status
// include your composer dependencies require_once 'vendor/autoload.php'; $client = new Skip405\Kickbox\WordPress\Client( "KICKBOX_API_KEY" ); $batch = $client->verify_batch( array( "jane.doe@example.com", "john.doe@example.com" ), array( "filename" => "My batch filename" ) ); $batch_status = $client->check_batch( $batch['data']['body']['id'] );
See response examples in the wiki.
License
The MIT License (MIT). Please see License File for more information.