https://github.com/farolfo/mochilero-api
Multiple purposes API for backpackers needs
https://github.com/farolfo/mochilero-api
Last synced: 5 months ago
JSON representation
Multiple purposes API for backpackers needs
- Host: GitHub
- URL: https://github.com/farolfo/mochilero-api
- Owner: farolfo
- Created: 2015-02-15T23:15:51.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-02-16T18:34:39.000Z (over 11 years ago)
- Last Synced: 2024-12-30T12:19:21.313Z (over 1 year ago)
- Language: JavaScript
- Homepage: http://farolfo.github.io/hitchhike-GPS
- Size: 156 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mochilero API
An open-source project to display hitchs of backpackers on live. Check it out at http://farolfo.github.io/hitchhike-GPS.
_Hitchhike GPS_ is a collaborative project. When travelling and being carried doing hitch on the road, mark it on the web app. This way we can calculate the bests roads and places for a backapacker to hitch!
## Application overview
The API runs in node, using expressjs and [sequelize](http://sequelizejs.com/) as the ORM to connect to a PostgreSQL database.
The UI code may be found [here](https://github.com/farolfo/mochilero-ui).
Currently under development, hosted at http://mochilero-api.herokuapp.com.
## API Definition
####/hitchs resource
The API provides the locations were backapackers were hitched on the road. This data can be created and retrieved in the /hitchs resource.
In order to post a new hitch, just post the coordenates.
```
> POST /hitchs
> {
> lat: 37.765791,
> long: -122.408219
> }
< 200
```
In order to retrieve the hitchs in a given zone, just tell us the lat/long and a radius in miles.
```
> GET /hitchs?lat=37.765791&long=-122.408219&radius=20
> Content-Type: application/json
< 200
< [
< {
> lat: 37.765791,
> long: -122.408219
> },
< {
> lat: 37.765792,
> long: -122.408219
> },
< {
> lat: 37.765793,
> long: -122.408219
> }
< ]
```