summaryrefslogtreecommitdiffstats
path: root/lib/SparkPost/Resource.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/SparkPost/Resource.php')
-rw-r--r--lib/SparkPost/Resource.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/SparkPost/Resource.php b/lib/SparkPost/Resource.php
new file mode 100644
index 0000000..2cc5aa7
--- /dev/null
+++ b/lib/SparkPost/Resource.php
@@ -0,0 +1,30 @@
+<?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);
+ }
+
+ public function test(){
+ echo "TEST";
+ }
+}