API Docs, take 1

This commit is contained in:
Josh Sherman 2013-12-17 17:53:02 -05:00
parent 44f0139e13
commit 2bb9a17f6a
4 changed files with 104 additions and 9 deletions

19
modules/api.php Normal file
View file

@ -0,0 +1,19 @@
<?php
class api extends CustomModule
{
public function __default()
{
// Grabs the user's API key
$api_key = false;
if ($this->uid)
{
$api_key = $this->redis->hget('user:' . $this->uid, 'api');
}
return array('api_key' => $api_key);
}
}
?>