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

Fix and improve `Geocaching.search_rect()` #203

Closed BelKed closed 1 year ago

BelKed commented 1 year ago

Since we can pass parameters for reversing and limiting the returned caches directly to the URL requested by Geocaching.search_rect(), I believe it would be helpful (at least for me) to have these parameters accessible in Python code.

I also fixed the parsing of the userFound property because the returned data format has changed a bit.

And, of course, I reloaded the test cartridges to reflect recent changes.

FriedrichFroebel commented 1 year ago

Thanks for the PR. Could you please add a test for the reverse sort order as well? Additionally, I am not sure whether we should stay with the lowercase ordering values when calling the API or really switch to the capitalized version as in this PR.

BelKed commented 1 year ago

Additionally, I am not sure whether we should stay with the lowercase ordering values when calling the API or really switch to the capitalized version as in this PR.

As I'm thinking about this now, I think we should stay with the lowercase ordering values, as the "official" requests use the lowercase. Updated in https://github.com/tomasbedrich/pycaching/pull/203/commits/08f6831fbb8154580eea6d218b1c21e99534cbf7.

BelKed commented 1 year ago

Could you please add a test for the reverse sort order as well?

Sure, I added it right now in https://github.com/tomasbedrich/pycaching/pull/203/commits/14db0c7a4679d899d119b717d5aef4314de2ec0d. Is it fine?