A PHP package for working w/ the MailerLite API.
Normal install via Composer.
use Travis\MailerLite;
$apikey = 'YOURAPIKEY';
$listid = 'YOURLISTID';
try
{
$test = MailerLite::run($apikey, 'post', 'groups/'.$listid.'/subscribers', [
'name' => 'Paul Tarsus',
'email' => 'paul@tarsus.net',
]);
}
catch (\Exception $e)
{
echo $e->getMessage();
}
See the API Guide for additional methods.