get() 공개 메소드

public get ( $id )
예제 #1
0
});
/* Handle get my requested friends */
$app->get('/user/me/friends/requested', function ($request, $response) {
    $token = parseToken($request);
    return Friends::requested($response, $token);
});
/* Handle get my friends */
$app->get('/user/me/friends', function ($request, $response) {
    $token = parseToken($request);
    return Friends::get($response, $token, null);
});
/* Handle get user accepted friends */
$app->get('/user/{id:[0-9]+}/friends', function ($request, $response, $args) {
    $token = parseToken($request);
    $friend_id = $args['id'];
    return Friends::get($response, $token, $friend_id);
});
/* Handle like post */
$app->put('/post/{id:[0-9]+}/like', function ($request, $response, $args) {
    $token = parseToken($request);
    $post_id = $args['id'];
    return Posts::like($response, $token, $post_id);
});
/* Handle dislike post */
$app->delete('/post/{id:[0-9]+}/like', function ($request, $response, $args) {
    $token = parseToken($request);
    $post_id = $args['id'];
    return Posts::dislike($response, $token, $post_id);
});
/* Handle get post likes */
$app->get('/post/{id:[0-9]+}/like', function ($request, $response, $args) {