public function __construct($logger) { $this->logger = $logger; $this->map = new Map($logger); $this->wordpress = new \WPUtilities\WordPressWrapper(); $this->httpEngine = new \HttpExchange\Adapters\Resty(new \Resty\Resty()); $this->apiBase = \WPUtilities\API::getApiBase(); }
public function fetch($id) { $apiBase = \WPUtilities\API::getApiBase(); $map = $this->api->get("/{$id}")->data; return $map->meta->locations; }
public function __construct() { $this->http = new \HttpExchange\Adapters\Resty(new \Resty()); $this->apiBase = \WPUtilities\API::getApiBase(); }