forked from science-ation/science-ation
Add dictionary documentation
Update Test API page to link to apidocs and dictionary
This commit is contained in:
parent
1701e965ef
commit
63178e596b
34
doc/dictionary.php
Normal file
34
doc/dictionary.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?
|
||||
include "../user.inc.php";
|
||||
?>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Registration Group/Field Dictionary</title>
|
||||
<link rel="stylesheet" href="../apidoc.css" type="text/css" media="all" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<h1>Registration Group/Fields Dictionary</h1>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Label</th>
|
||||
<th>Group</th>
|
||||
</th>
|
||||
<?
|
||||
$f=user_get_field_info();
|
||||
|
||||
foreach($f AS $field=>$data) {
|
||||
echo "<tr>\n";
|
||||
echo "<td>$field</td>\n";
|
||||
echo "<td>{$data['label']}</td>\n";
|
||||
echo "<td>{$data['group']}</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
26
testapi.php
26
testapi.php
@ -59,7 +59,11 @@ include "common.inc.php";
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>General Commands</h1>
|
||||
<h1>Test API Page</h1>
|
||||
<a href="apidoc.php">API Documentation</a><br />
|
||||
<a href="doc/dictionary.php">Registration Group/Fields Dictionary Documentation</a><br/>
|
||||
|
||||
<h2>General Commands</h2>
|
||||
|
||||
Login
|
||||
<form method="post" action="api/auth/login">
|
||||
@ -86,7 +90,7 @@ Date List
|
||||
<input type="submit" value="Conference Date List">
|
||||
</form>
|
||||
|
||||
<h1>Account Settings</h1>
|
||||
<h2>Account Settings</h2>
|
||||
<strong>Edit account information</strong>
|
||||
Username: <input type="text" id="username"></input><br/>
|
||||
Password: <input type="text" id="password"></input><br/>
|
||||
@ -94,7 +98,7 @@ email: <input type="text" id="email"></input><br/>
|
||||
Link username to email? <input type="radio" name="link_username_to_email" value="yes"></input>Yes <input type="radio" name="link_username_to_email" value="no"></input>No<br/>
|
||||
<button onclick = "submitAccountUpdate(); return false;">Update account information</button>
|
||||
|
||||
<h1>Teacher Specific Commands</h1>
|
||||
<h2>Teacher Specific Commands</h2>
|
||||
<a href="api/scienceolympics/teams/list">Science Olympic Teams List</a><br />
|
||||
|
||||
<form method="post" action="api/scienceolympics/teams/add">
|
||||
@ -113,10 +117,10 @@ Link username to email? <input type="radio" name="link_username_to_email" value=
|
||||
<input type="submit" value="Edit Team">
|
||||
</form>
|
||||
|
||||
<h1>User Stuff</h1>
|
||||
<h2>User Stuff</h2>
|
||||
<a href="api/user/view/">View the user</a><br/>
|
||||
|
||||
<h1>Event Schedule</h1>
|
||||
<h2>Event Schedule</h2>
|
||||
<a href="api/schedule/list">Schedule Listing</a><br/>
|
||||
|
||||
<a href="api/locations/list">Location Listing</a><br/>
|
||||
@ -135,7 +139,7 @@ Schedule ID: <input type="text" name="schedule_id"></input>
|
||||
<input type="submit" value="Unregister"></input>
|
||||
</form>
|
||||
|
||||
<h1>Roles</h1>
|
||||
<h2>Roles</h2>
|
||||
<a href="api/role/list">Get a list of roles for this conference</a><br/>
|
||||
|
||||
Add a role to this account
|
||||
@ -153,8 +157,10 @@ Remove a role from this account
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<h1>Registration Fields</h1>
|
||||
<a href="api/registration/dictionary">View the dictionary of registration fields</a><br/>
|
||||
<h2>Registration Fields</h2>
|
||||
<a href="api/registration/dictionary">View the dictionary of registration fields</a>
|
||||
<a href="doc/dictionary.php">View Documentation Generated by this API call</a><br/>
|
||||
<br />
|
||||
(leave all blank to use currently logged in users fields)<br />
|
||||
<form method="post" action="api/registration/fields">
|
||||
<?
|
||||
@ -164,7 +170,7 @@ foreach($roles AS $role=>$r) {
|
||||
<input type="submit" value="List Registration Fields for Selected Roles">
|
||||
</form>
|
||||
|
||||
<h1>Schools</h1>
|
||||
<h2>Schools</h2>
|
||||
<a href="api/school/list">School Listing</a><br/>
|
||||
|
||||
<form method="post" action="api/user/connect_to_school">
|
||||
@ -174,7 +180,7 @@ foreach($roles AS $role=>$r) {
|
||||
</form>
|
||||
|
||||
|
||||
<h1>Session Variables</h1>
|
||||
<h2>Session Variables</h2>
|
||||
<?
|
||||
echo json_encode($_SESSION);
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user