
# swepam [![Build Status](https://travis-ci.org/skibz/swepam.svg)](https://travis-ci.org/skibz/swepam) [![Code Climate](https://codeclimate.com/github/skibz/swepam/badges/gpa.svg)](https://codeclimate.com/github/skibz/swepam) [![Test Coverage](https://codeclimate.com/github/skibz/swepam/badges/coverage.svg)](https://codeclimate.com/github/skibz/swepam/coverage)

> :sunny: :dash: :earth_africa: a json interface to the swepam readings

get a solar weather report with this zero-dependency reader for [ace-swepam.txt](http://services.swpc.noaa.gov/text/ace-swepam.txt) data.

a web api is hosted [here](http://loada.vg) for free use. you can also request [all](http://loada.vg/all.json) data available instead of the most recent reading, if you wish.

##### install

```bash
npm install --global swepam
```

##### notes

this program __doesn't__ create an http server, it simply writes json files to disk which can be served with a web server of your choice.

##### environment variables

* `SWEPAM_READINGS_ENDPOINT` - ace-swepam web uri (defaults to 'http://services.swpc.noaa.gov/text/ace-swepam.txt')
* `SWEPAM_JSON_PATH` - location of json files written to disk (must match up with nginx configuration)
