linkage / sendgrid-marketing-campaign-api-client
simple php client for sendgrid marketing campaign apis
Installs: 7 042
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 2
Open Issues: 1
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^7.8
- symfony/property-access: *
- symfony/serializer: *
Requires (Dev)
- phpunit/phpunit: ^10.4
- quartetcom/static-analysis-kit: 8.2.x-dev
This package is auto-updated.
Last update: 2024-12-19 02:41:06 UTC
README
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 }