Skip to content

Yandex fix. No more "found" param in meta section#1448

Merged
alexreisner merged 2 commits intoalexreisner:masterfrom
HatlamMe:patch-2
Apr 23, 2020
Merged

Yandex fix. No more "found" param in meta section#1448
alexreisner merged 2 commits intoalexreisner:masterfrom
HatlamMe:patch-2

Conversation

@HatlamMe
Copy link
Copy Markdown
Contributor

@HatlamMe HatlamMe commented Apr 22, 2020

Yandex response has changed.
There was param named "found" before. But it was removed. So any geocode request returned empty array.
Actually i consider the condition as redundant.

@alexreisner
Copy link
Copy Markdown
Owner

Thanks for this. Do you have a link to the Yandex documentation for this new format?

@HatlamMe
Copy link
Copy Markdown
Contributor Author

Sorry, no documentation. It’s just got broken a couple of hours before. And I’ve made a hot fix. Actually it’s pretty old API, it should not change. Here is the link to the doc:
https://tech.yandex.ru/maps/geocoder/doc/desc/reference/response_structure-docpage/ (Russian)
But it’s pretty old, and it still has “found”.

@alexreisner
Copy link
Copy Markdown
Owner

Thanks. In that case, would it be possible to update the sample JSON in test/fixtures/yandex_... to reflect actual API responses? Would be good to keep all parts of the code consistent.

@HatlamMe
Copy link
Copy Markdown
Contributor Author

It looks like it was a bug at Yandex, now "found" came back in response. But I would propose to accept my pull request — in any case, at least it wont get worse as the condition was not necessary.

@alexreisner
Copy link
Copy Markdown
Owner

Yes, I agree with that. Do you want to also remove the line above the one you changed, where meta is assigned? It now seems unnecessary.

@HatlamMe
Copy link
Copy Markdown
Contributor Author

Sure! Sorry didn't notice in a hurry. Can you please smash 2 commits while merging?

@alexreisner alexreisner merged commit ef1afc5 into alexreisner:master Apr 23, 2020
@alexreisner
Copy link
Copy Markdown
Owner

No problem. Thanks!

@HatlamMe HatlamMe deleted the patch-2 branch April 23, 2020 18:47
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.

2 participants