ComunicAPI/RestControllers/friendsController.php

29 lines
484 B
PHP
Raw Normal View History

2017-05-28 12:09:20 +00:00
<?php
/**
* Friends controller
*
* @author Pierre HUBERT
*/
class friendsController{
/**
* Get friends list
*
* @url POST /friends/getList
*/
public function getFriendsList(){
user_login_required(); //Login required
//Try to get friends list
2017-05-31 14:49:25 +00:00
$friendsList = CS::get()->components->friends->getList(userID);
2017-05-28 12:09:20 +00:00
//Check for errors
if($friendsList === false)
Rest_fatal_error(500, "Couldn't get friends list !");
//Return list
return $friendsList;
}
}