COM-40 :: Added None Auth class, IPs endpoint and associated tests
This commit is contained in:
30
src/Endpoints/IPs.php
Normal file
30
src/Endpoints/IPs.php
Normal 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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user