react-native-sdk
react-native-sdk copied to clipboard
Create helper method for Contact search
trafficstars
const query: IContactQuery = {
username: searchString,
address: ''
}
const options: IQueryOptions = {
localOnly: false,
remoteOnly: false,
limit: 20,
wait: 8,
filter: QueryOptions.FilterType.NO_FILTER,
exclude: []
}
const queryId = await Textile.contacts.search(query, options)
Ideally you could have the option to just pass
const queryId = await Textile.contacts.search("Andrew")
Before close, update a tour of textile docs to reflect new sig
To match the js-http-lib, it could possibly be,
Textile.contacts.search(name?: string, address?: string, options?: IQueryOptions)