matchAllNamesHandler(_:)
func matchAllNamesHandler(_ req: Request) async throws -> [UserHeader]
GET /api/v3/users/match/allnames/STRING
Retrieves the first 10 User.userSearch
values containing the specified substring,
returning an array of UserHeader
structs..
The intended use for this endpoint is to help isolate a particular user in an
auto-complete type scenario, by searching all of the .displayName
, .username
and .realName
profile fields.
Compare to /api/v3/user/match/username/STRING
, which searches just .username
and
returns an array of just strings.
Note
If the search substring contains “unsafe” characters, they must be url encoded. Unicode characters are supported. A substring comprised only of whitespace is disallowed. A substring of “@” or “(@” is explicitly disallowed to prevent single-step username harvesting.For bulk .userSearch
data retrieval, see the ClientController
endpoints.
URL Query Parameters:
?favorers=BOOLEAN Show only resulting users that have favorited the requesting user.
Throws
403 error if the search term is not permitted.
Parameters
STRING
|
in URL path. The search string to use. Must be at least 2 characters long. |
Return Value
An array of UserHeader
values of all matching users.
-
Declaration
Swift
struct QueryOptions : Content