mirror of
https://github.com/friendica/friendica
synced 2025-05-11 11:44:12 +02:00
API: Search endpoint
This commit is contained in:
parent
2364a1fb43
commit
c9110e03e1
4 changed files with 200 additions and 6 deletions
|
@ -44,13 +44,13 @@ class Search extends BaseApi
|
|||
$uid = self::getCurrentUserID();
|
||||
|
||||
// What to search for
|
||||
$q = (int)!isset($_REQUEST['q']) ? 0 : $_REQUEST['q'];
|
||||
$q = $_REQUEST['q'] ?? '';
|
||||
// Maximum number of results. Defaults to 40.
|
||||
$limit = (int)!isset($_REQUEST['limit']) ? 40 : $_REQUEST['limit'];
|
||||
$limit = (int)$_REQUEST['limit'] ?? 40;
|
||||
// Attempt WebFinger lookup. Defaults to false. Use this when q is an exact address.
|
||||
$resolve = (int)!isset($_REQUEST['resolve']) ? 0 : $_REQUEST['resolve'];
|
||||
$resolve = (bool)!isset($_REQUEST['resolve']) ? false : ($_REQUEST['resolve'] == 'true');
|
||||
// Only who the user is following. Defaults to false.
|
||||
$following = (int)!isset($_REQUEST['following']) ? 0 : $_REQUEST['following'];
|
||||
$following = (bool)!isset($_REQUEST['following']) ? false : ($_REQUEST['following'] == 'true');
|
||||
|
||||
$accounts = [];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue