tomasbedrich / pycaching

A Python 3 interface for working with Geocaching.com website.
https://pycaching.readthedocs.io/
GNU Lesser General Public License v3.0
61 stars 46 forks source link

Implementation of advanced search #206

Closed BelKed closed 1 year ago

BelKed commented 1 year ago

This PR implements a new way of searching for caches using the search API, which allows using filters and much more (with the Geocaching.advanced_search() method).

This search method is also faster because it loads less data (the data is in JSON form). Data parsing is then easier and clearer.


Now we have a main search function — Geocaching.advanced_search(). Both Geocaching.search() and Geocaching.search_rect() internally use Geocaching.advanced_search(), which reduces repeating code, since the implementation would be almost the same.

I've also updated the docstrings for those functions and added some tests.


Related PR:


Related issues:

tomasbedrich commented 1 year ago

Nice job overall. 💪🏼 It would definitely be useful to have another pair of eyes here.

BelKed commented 1 year ago

Weirdly, CI fails here, but it runs on my fork: https://github.com/BelKed/pycaching/actions/runs/4533795088

FriedrichFroebel commented 1 year ago

I am not completely sure about the CI failures as well, but I do not really feel like this should be merged until we are able to resolve this. Maybe rebasing the code on the latest master change something here?

BelKed commented 1 year ago

I believe it's fine now :)

FriedrichFroebel commented 1 year ago

Thanks, looks good for me. Re-requesting review from @tomasbedrich before merging.