Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create helper method for Contact search #93

Open
andrewxhill opened this issue May 6, 2019 · 1 comment
Open

Create helper method for Contact search #93

andrewxhill opened this issue May 6, 2019 · 1 comment

Comments

@andrewxhill
Copy link
Member

  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
Copy link
Member Author

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant