Comments (5)
Ah, understood, my mistake, I was confusing it with the cidade/estado request.
from cepr.
Seems there is an API issue. Running the code from the site examples gives me:
GET("http://www.cepaberto.com/api/v3/address?estado=SP&cidade=Ubatuba",
add_headers(Authorization = auth)) %>%
content("parsed")
Result:
named list()
This is not an R issue. Copying directly from the site:
import requests
url = "http://www.cepaberto.com/api/v3/address"
headers = {'Authorization': 'Token token=XXXXXXXXXX'}
params = {'estado': 'SP', 'cidade': 'Ubatuba'}
response = requests.get(url, headers=headers, params=params)
print(response.json())
Result:
{}
from cepr.
@edumucelli do we need lat & lng for estado/cidade requests, Eduardo?
GET("http://www.cepaberto.com/api/v3/nearest?cidade=Ubatuba&estado=SP", add_headers(Authorization = auth)) %>% content("parsed")
$message
[1] "Atributos \"lat\" e \"lng\" necessários"
from cepr.
nearest
only takes lat
and lng
. The semantic behind it is that it will find the nearby CEPs from a point centered on this very coordinate formed by the lat
and lng
.
I could indeed make it accept a cidade
and estado
but I have not thought about it beforehand.
from cepr.
Closing, CRAN submission underway.
from cepr.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cepr.