protected function get_api() { if (is_null($this->api)) { $this->api = new API(self::API_ENDPOINT, $this->fetch_credentials()); } return $this->api; }