Skip to main content
Version: 5.7.0

FindUsersBySubstrName

Retrieves profile information for an exact text match, then it retrieves partial matches of the specified text.

If there are more results than the maximum requested, then maximum requested results are returned.

Does not require the calling user to be a friend of the retrieved users.

In event that the call takes too long, this call has a timelimit enforcement on retrieving partial matches. When a timeout occurs, it will return no partial matches. The user will need to narrow down their search criteria.

ServiceOperation
friendFIND_USERS_BY_SUBSTR_NAME

Method Parameters

ParameterDescription
searchTextThe substring to search for. Minimum length of 3 characters.
maxResultsMaximum number of results to return.

Usage

http://localhost:3000
string searchText = "someText";
int maxResults = 5;
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};

_bc.FriendService.FindUsersBySubstrName(searchText, maxResults, successCallback, failureCallback);
JSON Response
{
"status": 200,
"data": {
"matches": [
{
"profileId": "4f2edc69-b3c3-458b-8b4b-6bbd7259b55f",
"profileName": "Test2",
"playerSummaryData": null,
"pictureUrl": "http://somesite.com/test/picture.jpg"
},
{
"profileId": "0da5ad24-2341-42f8-acb5-57aa2dd4ae94",
"profileName": "Test1",
"playerSummaryData": null,
"pictureUrl": "http://somesite.com/test/picture.jpg"
}
],
"matchedCount": 2
}
}