27 lines
847 B
Markdown
27 lines
847 B
Markdown
# DeHaze
|
|
|
|
Port the Haze Explr API to GEOJSON for use in GIS applications.
|
|
|
|
This was a quick and dirty project, and will probably get some updates slowly in the future. I put what I learned from this in the [HacDC Wiki](https://wiki.hacdc.org/en/Projects/API/HazeExplr).
|
|
|
|
## Usage
|
|
|
|
```bash
|
|
npm i
|
|
node basicauth_serve.js
|
|
```
|
|
|
|
To use the endpoint, replace 'EMAIL' and 'PASSWORD' with your Haze Explr account details:
|
|
|
|
```bash
|
|
echo "EMAIL:`echo 'PASSWORD' | sha256sum | sed -e 's/ -//'`" | base64
|
|
```
|
|
|
|
Then, make a request to the endpoint with the resulting string as the value of the `auth` query parameter:
|
|
|
|
```bash
|
|
curl "http://localhost:3000/locations?auth=BASE64_ENCODED_STRING"
|
|
```
|
|
|
|
`adapt.js` converts url-passed auth credentials into the basicauth server, I will refactor these in the future to use a `.env` file and better coding standards.
|