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 endpoint to request |
||
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 = '') { |
||
84 | |||
85 | /** |
||
86 | * Return the HTTP status of the call |
||
87 | * @return array or FALSE on failure |
||
88 | */ |
||
89 | public function getHttpStatus() { |
||
94 | |||
95 | /** |
||
96 | * Return the HTTP status of the call |
||
97 | * @return array or FALSE on failure |
||
98 | */ |
||
99 | public function getResponse() { |
||
104 | } |
||
105 |