Skip to content

asumikam/sendgrid-marketing-campaign-api-php-client

 
 

Repository files navigation

simple php client for sendgrid marketing campaign apis

installation

composer require linkage/sendgrid-marketing-campaign-api-client

usage

$apiKey = 'get your api key from sendgrid admin screen';

$sendgridClient = new \Linkage\SendgridMarketingCampaignApiClient\Client(
    new \Linkage\SendgridMarketingCampaignApiClient\SendgridApiRequester($apiKey),
);
try {
    $sendgridClient->createContactList(
        new \Linkage\SendgridMarketingCampaignApiClient\ContactList\CreateContactListRequest('my new contact list'),
    );
} catch (\Linkage\SendgridMarketingCampaignApiClient\SendgridApiClientException $e) {
    // handle client error
} catch (\Linkage\SendgridMarketingCampaignApiClient\SendgridApiServerException $e) {
    // handle server error
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%