Compare commits
No commits in common. "5c11fc0552e6933915511a54fefe53e5c52284db" and "7cd63399964a4ecf45fa8142d7da98aa4f972371" have entirely different histories.
5c11fc0552
...
7cd6339996
|
@ -8,18 +8,17 @@ class APIgoatDoc extends APIgoatTemplate
|
|||
$content = '';
|
||||
$menu = '';
|
||||
|
||||
//preprint($data);
|
||||
|
||||
foreach ($data as $row) {
|
||||
|
||||
$menu .= li(href($row['name'], '#' . $row['title']), "class='page_item wd-state-closed'");
|
||||
$menu .= li(href($row['name'], '#' . $row['title']), "class='page_item current_page_item'");
|
||||
$content .= div(
|
||||
anchor($row['title'])
|
||||
anchor($row['title']) . h3($row['name'])
|
||||
. h2($row['title'], "class='entry-title'")
|
||||
. h3($row['name'])
|
||||
. span($row['type'] . " " . $row['value'])
|
||||
. p($row['type'] . " " . $row['value'])
|
||||
. ((!empty($row['example'])) ? pre(htmlentities($row['example'])) : '')
|
||||
. p(trim($row['text']))
|
||||
. ((!empty($row['example'])) ? div(span("Example:") . pre(htmlentities($row['example']))) : ''),
|
||||
"",
|
||||
"class='doc-item'"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ class APIgoatFetchAPI
|
|||
{
|
||||
|
||||
private $username = 'wp-behavior@apigoat.com';
|
||||
private $password = 'iDhj3wsyYs7WrrS';
|
||||
private $baseURI = 'https://x.apigoat.com/api/v1/';
|
||||
private $password = '0sKtegdSSk';
|
||||
private $baseURI = 'https://goat.local/p/goatcheese/api/v1/';
|
||||
private $jwt_pubkey = '9sKjdjuue8sSjwh6';
|
||||
private $jwt_alg = ['HS256'];
|
||||
private $client;
|
||||
|
@ -21,10 +21,9 @@ class APIgoatFetchAPI
|
|||
{
|
||||
$this->client = new APIClient($this->baseURI);
|
||||
$this->clientOptions = [
|
||||
'verify' => true,
|
||||
'verify' => false,
|
||||
'content-Type' => 'application/json',
|
||||
'accept' => 'application/json',
|
||||
'debug' => false
|
||||
'accept' => 'application/json'
|
||||
];
|
||||
|
||||
if (!$this->authenticationValid()) {
|
||||
|
@ -41,7 +40,7 @@ class APIgoatFetchAPI
|
|||
{
|
||||
$clientOptions = $this->clientOptions;
|
||||
$clientOptions['query'] = [
|
||||
"query" => [
|
||||
"Query" => [
|
||||
"select" => [
|
||||
["behavior.name", "name"], ["code", "title"], ["description", "text"], "value", "example", "type", ["behavior_category.name", "category_name"]
|
||||
],
|
||||
|
@ -52,8 +51,7 @@ class APIgoatFetchAPI
|
|||
]
|
||||
],
|
||||
"join" => ["behavior_category"],
|
||||
"limit" => 20,
|
||||
"recurse" => "behavior_file"
|
||||
"limit" => 20
|
||||
],
|
||||
"debug" => true
|
||||
];
|
||||
|
@ -92,8 +90,6 @@ 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']);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue