Skip to content

Instantly share code, notes, and snippets.

@ValdasK
Last active January 29, 2016 08:01
Show Gist options
  • Save ValdasK/9e87c50f200995ee46f0 to your computer and use it in GitHub Desktop.
Save ValdasK/9e87c50f200995ee46f0 to your computer and use it in GitHub Desktop.
cm subscriber list
<?php
$this->performRequest(sprintf("subscribers/%s", $listId), [
'EmailAddress' => $download->email,
'Name' => $download->name,
'Phone' => $download->phone,
]);
private function performRequest($resource, array $data)
{
...
$url = sprintf('https://api.createsend.com/api/v3.1/%s.json', $resource);
...
return $this->client->post($url, [...]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment