alexrintt / lichess.dart

Lichess client for Dart.
https://pub.dev/packages/lichess_client_dio
MIT License
6 stars 2 forks source link

Refactor autocomplete #19

Closed riccardocescon closed 1 year ago

riccardocescon commented 1 year ago

Should we switch the 'autocomplete' api's name with 'getUsersByTerm'?

alexrintt commented 1 year ago

what do you think searchByTerm?

users is duplicating the context:

usersService.getUsersByTerm(...)

by using search:

usersService.searchByTerm(...)
riccardocescon commented 1 year ago

Yeah that's pretty good, but what for the autocompleteUsernames? autocompelte --> List autompleteUsernames --> List

alexrintt commented 1 year ago

nice question, tbh idk, maybe getUsernameSuggestions?

usersService.getUsernameSuggestions(term: 'ricc');
riccardocescon commented 1 year ago

What about usersService.searchByTerm(...) and usersService.searchNamesByTerm(...)?

alexrintt commented 1 year ago

seems pretty good, gotta update to this then.

autocomplete -> searchByTerm. autocompleteUsernames -> searchNamesByTerm.