case 'delete': unsetSessionVariable(GITHUB_ACCESS_RESPONSE_KEY); $accessResponse = null; break; case 'revoke': revokeAuthority($accessResponse); break; } try { if ($accessResponse == null) { echo "<p>You are not github authorised. Please choose the permissions you want to test with:</p>"; processUnauthorizedActions(); } else { echo "<p>You are github authorised.</p>"; try { processAction($provider, $accessResponse); } catch (GithubArtaxServiceException $gae) { echo "Exception caught: " . $gae->getMessage() . "<br/>"; var_dump($gae->getResponse()->getBody()); } catch (DnsException $de) { echo "DNS error: " . $de->getMessage() . "<br/>"; } showActionLinks(); } } catch (GithubArtaxServiceException $gae) { echo "Exception caught: " . $gae->getMessage(); var_dump($gae->getResponse()->getBody()); } echo <<<END </body>
Rename update name where ID Save update text where noteID Get folder content (sort by) Select * from notes where parentID order by Select * from folders where parentID order by Search Select * from notes/folders where text/name like %% order by */ processAction(); function processAction() { $action = assign_input('action', 'R'); $folderID = assign_input('folderID', 'R'); $noteID = assign_input('noteID', 'R'); $parentFolder = assign_input('parentFolder', 'R'); $date = assign_input('date', 'R'); $name = assign_input('name', 'R'); $note = assign_input('note', 'P', 1); $sortByDate = assign_input('sortByDate', 'R'); switch ($action) { case 'newFolder': $res = newFolder($name, $parentFolder); break; case 'newNote':
break; } try { if ($accessResponse == null) { echo "<p>You are not github authorised.</p>"; // $scopes = [ // \ArtaxApiBuilder\Service\Github::SCOPE_USER_EMAIL, // \ArtaxApiBuilder\Service\Github::SCOPE_ORG_READ, // \ArtaxApiBuilder\Service\Github::SCOPE_USER // ]; //createOauthRequest(); processUnauthorizedActions(); } else { echo "<p>You are github authorised.</p>"; try { processAction($accessResponse); } catch (AABTest\GithubAPI\GithubAPIException $gae) { echo "Exception caught: " . $gae->getMessage(); var_dump($gae->getResponse()->getBody()); } showActionLinks(); } } catch (AABTest\GithubAPI\GithubAPIException $gae) { echo "Exception caught: " . $gae->getMessage(); var_dump($gae->getResponse()->getBody()); } echo <<<END </body> </html>