Skip to content

Instantly share code, notes, and snippets.

@clarkbw
Created December 17, 2014 01:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clarkbw/bc7f15164383cea56319 to your computer and use it in GitHub Desktop.
Save clarkbw/bc7f15164383cea56319 to your computer and use it in GitHub Desktop.
geonames datasource with the timezone query for strongloop loopback
"geonames": {
"name": "geonames",
"debug": true,
"connector": "rest",
"operations": [
{
"template": {
"doc": "GeoNames API: timezoneJSON",
"method": "GET",
"url": "http://api.geonames.org/timezoneJSON",
"headers": {
"content-type": "application/json",
"accept": "application/json"
},
"query": {
"lat": "{!lat}",
"lng": "{!lng}",
"username": "{!username}"
},
"variables": {
"lat": {
"type": "number",
"format": "double",
"required": true,
"doc": "Lattitude"
},
"lng": {
"type": "number",
"format": "double",
"required": true,
"doc": "Longitude"
}
}
},
"functions": {
"timezone": [
"lat",
"lng"
]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment