https://github.com/danasilver/hotwire
A CORS enabled wrapper on the Hotwire API.
https://github.com/danasilver/hotwire
Last synced: over 1 year ago
JSON representation
A CORS enabled wrapper on the Hotwire API.
- Host: GitHub
- URL: https://github.com/danasilver/hotwire
- Owner: danasilver
- Created: 2014-05-07T01:05:07.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-05-18T18:29:26.000Z (about 12 years ago)
- Last Synced: 2025-01-06T00:41:52.760Z (over 1 year ago)
- Language: JavaScript
- Homepage: hotwire.herokuapp.com
- Size: 125 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## hotwire
A CORS enabled wrapper on the Hotwire API.
Created for use on a project for [Middlebury College CS465](go.middlebury.edu/infovis) requiring AJAX access to the Hotwire API.
### Use
Use the same exact URL as with Hotwire, only with `hotwire.herokuapp.com` prepended in place of `api.hotwire.com`.
HTTP and HTTPS protocols are supported.
You still need an `apikey`!
### Example
```js
var url = "http://hotwire.herokuapp.com/v1/tripstarter/air?apikey=APIKEY&origin=PHL&dest=SFO&format=json&sort=date",
xhr = new XMLHttpRequest();
xhr.open("GET", url, true);
xhr.send(null);
```