. * */ namespace Friendica\Module\Api\Twitter; use Friendica\Core\System; use Friendica\Model\Contact; /** * @see https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friends-ids */ class FriendsIds extends ContactEndpoint { public static function rawContent(array $parameters = []) { // Expected value for user_id parameter: public/user contact id $contact_id = $_GET['user_id'] ?? null; $screen_name = $_GET['screen_name'] ?? null; $cursor = $_GET['cursor'] ?? $_GET['since_id'] ?? -1; $stringify_ids = ($_GET['stringify_ids'] ?? 'false') != 'false'; $count = min((int) ($_GET['count'] ?? self::DEFAULT_COUNT), self::MAX_COUNT); System::jsonExit(self::ids( [Contact::SHARING, Contact::FRIEND], self::getUid($contact_id, $screen_name), $cursor, $count, $stringify_ids )); } }