react-native-sdk icon indicating copy to clipboard operation
react-native-sdk copied to clipboard

Create helper method for Contact search

Open andrewxhill opened this issue 6 years ago • 1 comments
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

andrewxhill avatar May 06 '19 21:05 andrewxhill

To match the js-http-lib, it could possibly be,

Textile.contacts.search(name?: string, address?: string, options?: IQueryOptions)

andrewxhill avatar May 06 '19 21:05 andrewxhill