Skip to content

Feature search_rect via API #151

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

Merged

Conversation

pkubiak
Copy link
Contributor

@pkubiak pkubiak commented Jun 7, 2020

I have implemented new method Geocaching.search_rect, which allow to search for caches in given Rectangle. It use new groundspeak API, the same as https://www.geocaching.com/play/map/.
Discussed in: #75

Technical details:

  • It requires login
  • Method request caches in parts (by default 50 caches per query) in lazy way.
  • During my experiment I was able to download 8600 cached in 3:40 min.
  • There is an API rate limit (hit after requesting ~2000caches) signaled with 429 Too many requests HTTP error. Now it is handled with new TooManyRequests exception type and appropriate wait time before continuing.
  • Method return PM caches for BM, but without location information.
  • Information about total number of caches in requests area is available, but not exposed via method.

@coveralls
Copy link

coveralls commented Jun 7, 2020

Coverage Status

Coverage increased (+0.08%) to 94.934% when pulling 52cdbdb on pkubiak:feature-search-rect-via-api into c21ff39 on tomasbedrich:master.

@pkubiak pkubiak marked this pull request as ready for review June 7, 2020 13:05
Copy link
Collaborator

@FriedrichFroebel FriedrichFroebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have left some comments where your changes have not been clear to me.

@pkubiak pkubiak requested a review from FriedrichFroebel June 8, 2020 02:14
Copy link
Collaborator

@FriedrichFroebel FriedrichFroebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your changes. I have added some new comments.

Copy link
Owner

@tomasbedrich tomasbedrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! 💪🏼 I've added some minor comments.

Also, we must not forget to integrate search_rect into docs and somehow decommission a search_quick method.

@tomasbedrich
Copy link
Owner

Approved from my point of view. ✅ Let's just wait also for @FriedrichFroebel.

Do you want me to solve the docs, cleanup and integration as mentioned above? Or do you want to finish it yourself?

@pkubiak
Copy link
Contributor Author

pkubiak commented Jun 8, 2020

Approved from my point of view. Let's just wait also for @FriedrichFroebel.

Do you want me to solve the docs, cleanup and integration as mentioned above? Or do you want to finish it yourself?

Thank you, for the review :) There is still one travis issue in python3.5, but I will try to fix it today.

If it is not a problem for you, I would be grateful for solving docs, cleanup and integration :)

@FriedrichFroebel
Copy link
Collaborator

I have two minor comments, after this (and preferably fixing the failing test) it should be okay.

Copy link
Collaborator

@FriedrichFroebel FriedrichFroebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for your patience.

@pkubiak
Copy link
Contributor Author

pkubiak commented Jun 10, 2020

LGTM. Thanks for your patience.

Thank you for the review :) Sorry for my English :P

@FriedrichFroebel FriedrichFroebel merged commit ab3f3f1 into tomasbedrich:master Jun 12, 2020
@tomasbedrich
Copy link
Owner

Sorry guys, my priorities are currently elsewhere... As the situation is unlikely to change from my side and I don't want to block this anymore, I have released 4.2.0 and we can solve the docs and cleanup later.

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

Successfully merging this pull request may close these issues.

4 participants