@interface ZDCUserSearchManager : NSObject
The SearchManager allows you to search for other users within the system.
Recall that user’s are allows to link multiple identities to their account. For example, a user may choose to link all of the following:
This makes searching much easier for the user. They can search for friends & colleagus using the social connections in which they already interact. And the search API allows them to limit their search to particular networks (e.g. only seach GitHub).
Searches for co-op users who have linked identities which match a given query.
- (void)searchForUsersWithQuery:(nonnull NSString *)queryString treeID:(nonnull NSString *)treeID requesterID:(nonnull NSString *)localUserID options:(nullable ZDCSearchOptions *)options completionQueue:(nullable dispatch_queue_t)completionQueue resultsBlock: (nonnull void (^)(ZDCSearchResultStage, NSArray<ZDCSearchResult *> *_Nullable, NSError *_Nullable))resultsBlock;
The search query the user typed into the search field.
The treeID to search. Only co-op users who have signed into this app will be included in the search results.
The localUser to use when sending the request to the server. The localUserID must be valid, and must be a co-op user.
Allows you optionally specify advanced search options.
The queue on which to invoke the resultsBlock. If you specify nil, the main thread will be used.
This closure will be invoked multiple times — once for each ZDCSearchResultStage. When the search has completed, this closure will be invoked one last time with ZDCSearchResultStage_Done.
Allows you to clear the search cache. The search cache includes results from previous queries.