diff --git a/classes/APIgoatDoc.php b/classes/APIgoatDoc.php index c2e4265..cca9a6a 100644 --- a/classes/APIgoatDoc.php +++ b/classes/APIgoatDoc.php @@ -10,13 +10,16 @@ class APIgoatDoc extends APIgoatTemplate foreach ($data as $row) { - $menu .= li(href($row['name'], '#' . $row['title']), "class='page_item current_page_item'"); + $menu .= li(href($row['name'], '#' . $row['title']), "class='page_item wd-state-closed'"); $content .= div( - anchor($row['title']) . h3($row['name']) + anchor($row['title']) . h2($row['title'], "class='entry-title'") + . h3($row['name']) . span($row['type'] . " " . $row['value']) . p(trim($row['text'])) - . ((!empty($row['example'])) ? div(span("Example:") . pre(htmlentities($row['example']))) : '') + . ((!empty($row['example'])) ? div(span("Example:") . pre(htmlentities($row['example']))) : ''), + "", + "class='doc-item'" ); } diff --git a/classes/APIgoatFetchAPI.php b/classes/APIgoatFetchAPI.php index 86accb6..0dae5a0 100644 --- a/classes/APIgoatFetchAPI.php +++ b/classes/APIgoatFetchAPI.php @@ -10,8 +10,8 @@ class APIgoatFetchAPI { private $username = 'wp-behavior@apigoat.com'; - private $password = '0sKtegdSSk'; - private $baseURI = 'https://goat.local/p/goatcheese/api/v1/'; + private $password = 'iDhj3wsyYs7WrrS'; + private $baseURI = 'https://x.apigoat.com/api/v1/'; private $jwt_pubkey = '9sKjdjuue8sSjwh6'; private $jwt_alg = ['HS256']; private $client; @@ -21,7 +21,7 @@ class APIgoatFetchAPI { $this->client = new APIClient($this->baseURI); $this->clientOptions = [ - 'verify' => false, + 'verify' => true, 'content-Type' => 'application/json', 'accept' => 'application/json', 'debug' => false @@ -61,7 +61,6 @@ class APIgoatFetchAPI $response = $this->client->get('Behavior', $clientOptions); - $body = json_decode($response->getBody()->getContents(), true); if ($response->getStatusCode() == 200) { return $body; @@ -93,6 +92,8 @@ class APIgoatFetchAPI // authenticate on API to get token $response = $this->client->post('Authy/auth', $options); $loginResponseDecoded = json_decode($response->getBody()->getContents(), true); + /*print_r($loginResponseDecoded); + die();*/ $this->credentials = new AccessTokenCredentials($loginResponseDecoded['token']); }