Last active
March 16, 2016 01:18
-
-
Save clarkbw/b7d6a162b8e3e78681a8 to your computer and use it in GitHub Desktop.
Google Time Zone API datasource for Strongloop Loopback
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"google": { | |
"name": "google", | |
"debug": true, | |
"connector": "rest", | |
"operations": [ | |
{ | |
"template": { | |
"doc": "The Google Time Zone API", | |
"method": "GET", | |
"url": "https://maps.googleapis.com/maps/api/timezone/{format=json}", | |
"headers": { | |
"content-type": "application/json", | |
"accept": "application/json" | |
}, | |
"query": { | |
"location": "{!lat},{!lng}", | |
"timestamp": "{!timestamp:number}", | |
"key": "{appKey:string}", | |
"language": "{language:string}" | |
}, | |
"variables": { | |
"lat": { | |
"type": "number", | |
"format": "double", | |
"required": true, | |
"doc": "Latitude" | |
}, | |
"lng": { | |
"type": "number", | |
"format": "double", | |
"required": true, | |
"doc": "Longitude" | |
}, | |
"timestamp": { | |
"type": "number", | |
"required": true, | |
"doc": "Time as seconds since midnight, January 1, 1970 UTC to determine daylight savings" | |
} | |
} | |
}, | |
"functions": { | |
"timezone": [ | |
"lat", | |
"lng", | |
"timestamp" | |
] | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment