Skip to content

Commit 27b2d50

Browse files
author
Iftekher Sunny
committed
Added event push
1 parent aa271c8 commit 27b2d50

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/Event.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace Mailscout;
4+
5+
class Event extends ApiResource
6+
{
7+
/**
8+
* Push event.
9+
*
10+
* @param string $eventName
11+
* @param array $data
12+
* @return mixed
13+
*/
14+
public function push($eventName, array $data)
15+
{
16+
return $this->request->post(
17+
"events/push?api_token={$this->request->getApiKey()}",
18+
[
19+
"event_name" => $eventName,
20+
"data" => $data
21+
]
22+
);
23+
}
24+
}

0 commit comments

Comments
 (0)