diff --git a/api.php b/api.php index 1b72969..462849b 100644 --- a/api.php +++ b/api.php @@ -380,41 +380,48 @@ switch($request[0]) { } echo json_encode($ret); - /* APIDOC: zNOTIMPLEMENTED_school/list + /* APIDOC: school/list + notimplemented description(list schools) return(schools array) */ - /* APIDOC: zNOTIMPLEMENTED_account/edit + /* APIDOC: account/edit + notimplemented description(edit account information) post(account array) return(account array) */ - /* APIDOC: zNOTIMPLEMENTED_user/edit + /* APIDOC: user/edit + notimplemented description(edit user information for current conference) post(user array) return(user array) */ - /* APIDOC: zNOTIMPLEMENTED_user/connect_teacher_to_school + /* APIDOC: user/connect_teacher_to_school + notimplemented description(connects the current users teacher role to the specified school usign the schools access code) post(schools_id integer, accesscode varchar(16)) return(school array) */ - /* APIDOC: zNOTIMPLEMENTED_role/list + /* APIDOC: role/list + notimplemented description(list roles and their corresponding registration types) return(roles array) */ - /* APIDOC: zNOTIMPLEMENTED_role/add + /* APIDOC: role/add + notimplemented post(role_id integer, password varchar(64) optional) description(add a role for the user to the current conference. Depending on the registraiton type, an optional password (singlepassword, schoolpassword, etc) can be specified) return(role array) */ - /* APIDOC: zNOTIMPLEMENTED_role/remove + /* APIDOC: role/remove + notimplemented post(role_id integer) description(remove a role from the user for the current conference) return(role array) diff --git a/apidoc.css b/apidoc.css index fa45a45..f3ef635 100644 --- a/apidoc.css +++ b/apidoc.css @@ -3,11 +3,15 @@ body { color: #666666; } h1 { + font-size: 1.5em; + font-weight: bold; +} +h2 { font-size: 1.2em; font-weight: bold; color: black; } -h2 { +h3 { font-size: 1.0em; font-weight: bold; margin-bottom: 0px; diff --git a/apidoc.php b/apidoc.php index b1ed98f..f8bd78a 100644 --- a/apidoc.php +++ b/apidoc.php @@ -6,6 +6,8 @@
+$commands=array(); +$nicommands=array(); //lets get sneaky here, and have the file parse itself! $lines=file("api.php"); foreach($lines AS $line) { @@ -18,6 +20,8 @@ $cmd['description']=array(); $cmd['post']=array(); $cmd['return']=array(); + //assume its implemented unless we say otherwise + $cmd['implemented']=true; $incmd=true; } if($incmd==true && preg_match("/description\((.*)\)/",$line,$matches)) { @@ -31,20 +35,40 @@ $returns=explode(",",$matches[1]); $cmd['return']=$returns; } + if($incmd==true && $line=="notimplemented") { + $cmd['implemented']=false; + } if($incmd==true && $line=="*/") { $incmd=false; - $commands[$cmd['command']]=$cmd; + if($cmd['implemented']) + $commands[$cmd['command']]=$cmd; + else + $nicommands[$cmd['command']]=$cmd; unset($cmd); } } + +echo "