Skip to content

bhanafee/whereami

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

whereami

REST API to handle geolocation

API

Description Request Response
Get the area tags for a location GET
/tags?latitude=38.0&longitude=-122.0
200 OK
{
    "location": {
        "latitude": 38.0,
        "longitude": 132.0
    }
    "tags": [
        "CA",
        "San Francisco",
        "94123"
    ]
}
Get the distance from a point to the nearest area boundary GET
/nearest?latitude=38.0&longitude=-122.0
200 OK
{
    "location": {
        "latitude": 38.0,
        "longitude": -122.0
    }
    "distance": 1000.0,
}
Report a location and time, receiving a fence for the next report POST
/track/:id
{
    "location": {
       "latitude": 38.0,
       "longitude": -122.0
    },
    "time": "2014-10-02T05:30:45.123Z"
}
200 OK
{
    "circle": {
        "center": {
            "latitude": 38.0,
            "longitude": -122.0
        },
        "radius": 7400.0
    },
    "time": "2014-10-02T08:30:45.123Z"
}
Report a location, defaulting to the current time and receiving a fence for the next report GET
/track/:id?latitude=38.0&longitude=-122.0
200 OK
{
    "circle": {
        "center": {
            "latitude": 38.0,
            "longitude": -122.0
        },
        "radius": 7400.0
    },
    "time": "2014-10-02T08:30:45.123Z"
}
Report that a device remains within a previously defined fence GET
/track/:id/checkin
200 OK

Resources

About

REST API to handle geolocation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published