blob: 9f59d27b82cde5900b54b7cbdb49a8ddba3baea3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
<?php
namespace SparkPost;
class Resource
{
protected $sparkpost;
protected $endpoint;
public function __constructor(SparkPost $sparkpost, $endpoint)
{
$this->sparkpost = $sparkpost;
$this->endpoint = $endpoint;
}
public function get($uri, $payload)
{
return $this->sparkpost->request('GET', $this->endpoint.'/'.$uri, $payload);
}
public function post($payload)
{
echo $payload;
return $this->sparkpost->request('POST', $endpoint, $payload);
}
}
|