1 | <?php |
||
5 | class SandCage { |
||
6 | // Your SandCage API Key |
||
7 | // This can be retrieved from https://www.sandcage.com/panel/api_key |
||
8 | protected $sandcage_api_key = '[YOUR SANDCAGE API KEY]'; |
||
9 | |||
10 | // SandCage API version |
||
11 | protected $sandcage_api_version = '0.2'; |
||
12 | |||
13 | // SandCage API endpoint base |
||
14 | protected $sandcage_api_endpoint_base; |
||
15 | |||
16 | protected $user_agent; |
||
17 | protected $follow_location = false; |
||
18 | protected $timeout = 30; |
||
19 | protected $post_fields; |
||
20 | protected $status; |
||
21 | protected $response; |
||
22 | |||
23 | public function __construct($sandcage_api_key = null) { |
||
32 | |||
33 | /** |
||
34 | * Send a requst using cURL |
||
35 | * @param string $service being requested |
||
36 | * @param array $payload values to send |
||
37 | * @param string $callback_endpoint to send the callback to. Optional |
||
38 | */ |
||
39 | public function call($service, $payload, $callback_endpoint = '') { |
||
95 | |||
96 | /** |
||
97 | * Return the HTTP status of the call |
||
98 | * @return array or FALSE on failure |
||
99 | */ |
||
100 | public function getHttpStatus() { |
||
105 | |||
106 | /** |
||
107 | * Return the HTTP status of the call |
||
108 | * @return array or FALSE on failure |
||
109 | */ |
||
110 | public function getResponse() { |
||
115 | } |
||
116 |