xmunoz / sodapy

Python client for the Socrata Open Data API
MIT License
402 stars 114 forks source link

Add GeoJSON as supported content-type #55

Closed ktollas closed 5 years ago

ktollas commented 5 years ago

Can you add support for pulling GeoJSON formats from Socrata?

Socrata format reference: https://dev.socrata.com/docs/formats/#,

I see in your _perform_request function (starting at line 484 in https://github.com/xmunoz/sodapy/blob/master/sodapy/__init__.py) that there is no option for setting the content-type to geojson

ktollas commented 5 years ago

I fixed locally by adding the line

elif re.match(r'application\/vnd.geo+json', content_type): return response.json()

xmunoz commented 5 years ago

Fixed by 38616b5a829f2f4