Closed edumucelli closed 4 years ago
Hi @edumucelli , thanks for your PR! I was working on this myself a few days ago, and I prefer using purrr's pluck()
than map with [1]]$estado$sigla
. So, for example, for the 'estado' for busca_cep()
:
estado = pluck(r, 1, "estado", .default = NA_character_) %>%
pluck("sigla", .default = NA_character_)
Let me know if you're interested in modifying your PR, if not I can update the function myself.
Thanks again, Rob
Ah, I've just seen that you are the maintainer of the API! Thanks so much for CEPAberto :-)
I sent you an email, but feel free to ignore that, I didn't realise it was you.
I've posted a comment on the examples repo with a problem I'm having with API v3. I understand it's probably temporary.
If you'd like to contribute more generally to cepR, I can add you as a collaborator if you'd like.
Alright, I am bit rust on the tidyverse world and your suggestion is way better than my approach. I will change the current PR accordingly.
I will try to contribute whenever I can, feel free to add me as collaborator, although I hope there API will stay stable and supplementary big-bang changes won't be necessary in the future :-)
Great, Eduardo, thanks.
Given the update of CEPAberto's API to the V3, here is a proposal for a fix regarding the
busca_cep
feature. This PR does not encompasses the other endpoints though as I had little time to work on it -- that came as a CEPAberto user that reported that cepR package was not working anymore.It then partially addresses the #6.
Some considerations:
purrr:map
things when in a nested list as nowestado
andcidade
are presented. So if you have something in mind please let me know.