-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcarma_endpoints.php
More file actions
30 lines (21 loc) · 952 Bytes
/
Copy pathcarma_endpoints.php
File metadata and controls
30 lines (21 loc) · 952 Bytes
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
27
28
29
30
<?php namespace CarmaAPI\endpoints;
require_once(dirname(__FILE__) . "/endpoints/RecipientsListEndpoint.php");
require_once(dirname(__FILE__) . "/endpoints/RecipientListEndpoint.php");
require_once(dirname(__FILE__) . "/endpoints/ContactsListEndpoint.php");
require_once(dirname(__FILE__) . "/endpoints/ContactIdentifiedEndpoint.php");
require_once(dirname(__FILE__) . "/endpoints/TriggersEndpoint.php");
require_once(dirname(__FILE__) . "/endpoints/TriggerEndpoint.php");
require_once(dirname(__FILE__) . "/endpoints/PropertiesEndpoint.php");
use CarmaAPI\CarmaAPI;
use CarmaAPI\urls\CarmaAPIUrl;
abstract class APIEndpoint {
protected $api;
protected function __construct(CarmaAPI $_api)
{
$this->api = $_api;
$this->api->allocateEndpoint($this);
}
protected function handleResponseErrorIfAny(\Httpful\Response $resp) {
// TODO : check http code, throw exception; proper exception handling
}
}