COM-40 :: Added None Auth class, IPs endpoint and associated tests

This commit is contained in:
Junade Ali
2017-09-04 20:22:23 +01:00
parent 7a60774ec2
commit 4876787118
5 changed files with 110 additions and 0 deletions

30
src/Endpoints/IPs.php Normal file
View File

@@ -0,0 +1,30 @@
<?php
/**
* Created by PhpStorm.
* User: junade
* Date: 04/09/2017
* Time: 19:56
*/
namespace Cloudflare\API\Endpoints;
use Cloudflare\API\Adapter\Adapter;
class IPs implements API
{
private $adapter;
public function __construct(Adapter $adapter)
{
$this->adapter = $adapter;
}
public function get(): \stdClass {
$ips = $this->adapter->get('ips', []);
$body = json_decode($ips->getBody());
return $body->result;
}
}