API Docs, take 1
This commit is contained in:
parent
44f0139e13
commit
2bb9a17f6a
4 changed files with 104 additions and 9 deletions
19
modules/api.php
Normal file
19
modules/api.php
Normal 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);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue