* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiFriendshipsShowAction extends ApiBareAuthAction
{
var $source = null;
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return boolean true or false
*/
-
function requiresAuth()
{
if (common_config('site', 'private')) {
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
if (!in_array($this->format, array('xml', 'json'))) {
+ // TRANS: Client error displayed when coming across a non-supported API method.
$this->clientError(_('API method not found.'), 404);
return;
}
if (empty($this->source)) {
$this->clientError(
+ // TRANS: Client error displayed when a source user could not be determined showing friendship.
_('Could not determine source user.'),
404
);
if (empty($this->target)) {
$this->clientError(
+ // TRANS: Client error displayed when a target user could not be determined showing friendship.
_('Could not find target user.'),
404
);
default:
break;
}
-
}
/**
{
return true;
}
-
}