Skip to content

Instantly share code, notes, and snippets.

@lubc
Last active April 5, 2017 15:07
Show Gist options
  • Save lubc/ccc456f2c7c86c27814f6f970928cc0d to your computer and use it in GitHub Desktop.
Save lubc/ccc456f2c7c86c27814f6f970928cc0d to your computer and use it in GitHub Desktop.
Endpoints
ne_lat: Map North East corner latitude (string)
ne_lng: Map North East corner longitude (string)
sw_lat: Map South West corner latitude (string)
sw_lng: Map South West corner longitude (string)

Request: GET /heat_centers?ne_lat=40.697725&ne_lng=-73.916395&sw_lat=40.673063&sw_lng=-73.960367

Response:
{ "divisions": 
  [{ 
    "id": "1", 
    "intensity": "99", 
    "center": [40.686601, -73.938063] 
  }]
}

Request: GET /heat_centers?ne_lat=33.877791&ne_lng=-118.105511&sw_lat=33.826366&sw_lng=-118.177239

Response:
{ "divisions": 
  [{ 
    "id": "2", 
    "intensity": "90", 
    "center": [33.852403, -118.140487] 
  },
  { 
    "id": "3", 
    "intensity": "80", 
    "center": [33.848299, -118.178860] 
  }]
}

user_id: Current User ID (string)
lat: Current User location latitude (string)
lng: Current User location longitude (string)

Request: POST /user_location?user_id=10&lat=38.905651&lng=-76.987991

Response:
200 OK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment