A work in progress library for the Cloudflare API. The documentation for the API can be found at https://www.cloudflare.com/docs/.
Author: James Bell (james@james-bell.co.uk)
Exemple #1
0
 public function __construct($key)
 {
     parent::__construct($key);
     // 5 seconds is too low for admin operations like full_zone_set
     $this->setCurlOption(CURLOPT_TIMEOUT, 20);
 }
Exemple #2
0
 public function testHttpDeleteMethodSet()
 {
     $api = new Api('*****@*****.**', 'Auth Key');
     $result = $api->delete('test');
     $this->assertEquals("delete", $result['method']);
 }
Exemple #3
0
 public function testInvalidAuthenticationWithInvalidParameters()
 {
     self::setExpectedException(AuthenticationException::class);
     $api = new Api('foo.domain.tld', 'KEY');
     $api->get('/bogus', []);
 }