Skip to content

Instantly share code, notes, and snippets.

@clarkbw
Last active March 16, 2016 01:18
Show Gist options
  • Save clarkbw/b7d6a162b8e3e78681a8 to your computer and use it in GitHub Desktop.
Save clarkbw/b7d6a162b8e3e78681a8 to your computer and use it in GitHub Desktop.

Revisions

  1. clarkbw revised this gist Dec 16, 2014. 1 changed file with 0 additions and 4 deletions.
    4 changes: 0 additions & 4 deletions datasources.json
    Original file line number Diff line number Diff line change
    @@ -35,10 +35,6 @@
    "type": "number",
    "required": true,
    "doc": "Time as seconds since midnight, January 1, 1970 UTC to determine daylight savings"
    },
    "language": {
    "type": "string",
    "doc": "Language to return results which can be translated like timeZoneName"
    }
    }
    },
  2. clarkbw created this gist Dec 15, 2014.
    54 changes: 54 additions & 0 deletions datasources.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,54 @@
    "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"
    },
    "language": {
    "type": "string",
    "doc": "Language to return results which can be translated like timeZoneName"
    }
    }
    },
    "functions": {
    "timezone": [
    "lat",
    "lng",
    "timestamp"
    ]
    }
    }
    ]
    }