Closed lukasschwab closed 3 years ago
Should use warnings
to warn of deprecation
Edit: added in 1726660 ✅
Should only merge this when I'm really ready to roll the release to prevent publishing ~1.2.1~ 1.3.0 docs before *.results(...)
is available.
Description
Makes this package's API more literate.
It's not obvious what it means to "get" a
Search
;Result
s are the true object for the verb "get", but they're absent from the method call construction.results
seems more like an accessor (accessing the results on theSearch
, or accessing results in theClient
that correspond to aSearch
).*.get(...)
logic in*.results(...)
methods.*.get(...)
methods into thin wrappers of the corresponding*.results(...)
methods.*.results(...)
.Still considering:
client.run(search)
orclient.getResults(search)
or something. Will merge after I reach some conclusion.Breaking changes
None; the old
*.get()
methods remain supported (as simple wrappers of*.results()
.These deprecated methods should be removed at the point that the
results
signatures need to change. This is unlikely to happen:Search
object, the internals of which can change without this method signature changing.Search
construction and methods that fetch results because they're it's primary interface.Relevant issues
N/A
Checklist
README.md
example usage has been updated.