Skip to content

Commit e20b957

Browse files
authored
Merge pull request #73 from sendpulse/add_event_method
add doc automation360 method
2 parents 3be7aef + 4fac81a commit e20b957

File tree

2 files changed

+9
-102
lines changed

2 files changed

+9
-102
lines changed

example/index.php

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Sendpulse\RestApi\ApiClient;
1515
use Sendpulse\RestApi\Storage\FileStorage;
16-
use Sendpulse\RestApi\Automation360;
1716

1817
define('API_USER_ID', '');
1918
define('API_SECRET', '');
@@ -166,20 +165,16 @@
166165
// Delete sms campaign
167166
var_dump($SPApiClient->deleteSmsCampaign(CAMPAIGN_ID));
168167

168+
/*
169+
* Automation360 methods
170+
*/
169171

170-
// Send event
171-
$eventHash = 'EVENT_HASH';
172-
$email = '[email protected]';
173-
$phone = '380931112233';
172+
// Start event automation360
173+
$eventName = 'registration';
174174
$variables = [
175-
'user_id' => 123123,
176-
'event_date' => date('Y-m-d'),
177-
'firstname' => 'Name',
178-
'lastname' => 'Family',
179-
'age' => 23
175+
"email" => "[email protected]",
176+
"phone" => "+123456789",
177+
"var_1" => "var_1_value"
180178
];
181179

182-
$automationClient = new Automation360($eventHash);
183-
$result = $automationClient->sendEventToSendpulse($email, $phone, $variables);
184-
185-
var_dump($result);
180+
var_dump($SPApiClient->startEventAutomation360($eventName,$variables));

src/Automation360.php

Lines changed: 0 additions & 88 deletions
This file was deleted.

0 commit comments

Comments
 (0)