playPORTAL
Search…
⌃K

PlayPortalSearchClient

This class handles searching for other playPORTAL users within your app.
public sealed class PlayPortalSearchClient
To fully exercise the social networking features of playPORTAL, the PlayPortalSearchClient class allows for paginated search for other publicly searchable users. You may also want to give your users "suggestions" for other users to interact with without requiring them to perform a search, in which case the PlayPortalSearchClient provides a method to request a random number of publicly searchable users.
You will need to enable the "Smart Search" scope for your app in the developer dashboard before using the search API.

Properties

public static readonly PlayPortalSearchClient Instance;
Singleton instance of PlayPortalSearchClient. You will access all the available PlayPortalSearchClient methods through this instance.

Methods

public void SearchUsers(string searchTerm, Action<Exception, List<PlayPortalProfile>> completion, int? page = null, int? limit = null)
Search for playPORTAL users by a search term. The search term will be compared against users' handle, first name, and last name. Supports pagination through the page and limit parameters.
Parameter
Type
Description
searchTerm
string
What users will be searched by.
completion
Action<Exception, List<PlayPortalProfile>>
The delegate invoked when the request finishes. Called with an Exception argument if the request fails; otherwise, called with a List of PlayPortalProfile.
page
int?
At what page to return users, where the page length is determined by limit.
limit
int?
The maximum number of users to return.

GetRandomUsers

public void GetRandomUsers(int count, Action<Exception, List<PlayPortalProfile>> completion)
Request a number of random users. This is useful if you want to display a number of random profiles without requiring the user to search for them.
Parameter
Type
Description
count
int
The number of random users to return.
completion
Action<Exception, List<PlayPortalProfile>>
The delegate invoked when the request finishes. Called with an Exception argument if the request fails; otherwise, call with a List of PlayPortalProfile.