DXUserClient
This class is responsible for making requests to the DX user API.
The DXUserClient
class allows your app to request the current user's profile, request the current user's friends, and search for other DX users, giving your app access to the DX social network.
You will need to enable the "Profile" and "Smart Search" scopes for your app in the developer dashboard before using the user API.
Properties
Singleton instance of DXUserClient
. You will access all the available DXUserClient
methods through this instance.
Methods
getProfile
Request the currently authenticated user's profile. It's unlikely that you will need to directly use this method, as the isAuthenticated method on DXAuthClient
will pass an instance of DXProfile
representing the current user.
getFriendProfiles
Request the current user's friends list. When running in sandbox mode, you can created friendship links between sandbox users in the developer dashboard, allowing you to create and test a social network in your app.
searchUsers
Search for DX 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.
searchRandomUsers
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.
Last updated