Stud.IP
4.2 Revision
|
Public Member Functions | |
before (Router $router, array $handler, array $parameters) | |
getConfig ($user_id, $field) | |
setConfig ($user_id, $field) | |
deleteConfig ($user_id, $field) | |
![]() | |
__construct () | |
init ($router, $route, $request_body=null) | |
paginated ($data, $total, $uri_params=array(), $query_params=array()) | |
paginate ($uri_format, $total, $offset=null, $limit=null) | |
collect ($data) | |
status ($status) | |
headers ($headers=array()) | |
body ($body) | |
contentType ($mime_type, $params=array()) | |
error ($status, $body=null) | |
etag ($value, $strong_etag=true, $new_resource=null) | |
expires ($amount, $cache_control=array()) | |
cacheControl ($values) | |
halt () | |
lastModified ($time) | |
notFound ($body=null) | |
redirect ($url, $args=null) | |
sendFile ($_path, $opts=array()) | |
url ($addr, $url_params=null) | |
urlf ($addr_f, $format_params, $url_params=null) | |
Additional Inherited Members | |
![]() | |
$pagination = false | |
$offset | |
$limit | |
API routes for accessing user config values.
user_id ^[0-9a-f]{32}$
404 if user does not exist 403 if user may access the request config item
before | ( | Router | $router, |
array | $handler, | ||
array | $parameters | ||
) |
Performs checks if the user exists and may actually access the requested config.
Router | $router | Instance of the api router |
array | $handler | Detected handler router |
array | $parameters | Parameters of the called route |
deleteConfig | ( | $user_id, | |
$field | |||
) |
Removes a specific config entry for a given user
/user/:user_id/config/:field
204 on success
getConfig | ( | $user_id, | |
$field | |||
) |
Returns the value of a specific config entry for a given user
/user/:user_id/config/:field
setConfig | ( | $user_id, | |
$field | |||
) |
Stored the value of a specific config entry for a given user
/user/:user_id/config/:field
204 on success 400 if no value is given