-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.yaml
115 lines (115 loc) · 3.85 KB
/
swagger.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
swagger: "2.0"
info:
version: 1.0.0
title: locache
description:
A simple service to provide geolocal/temporal information.
Currently chains together google maps' geolocation and timezone APIs
so you don't have to sign up for a token. This means that you really can't
spam this service, or we both run out of free API calls and that's no fun
for anyone...
termsOfService: "You will not spam this service."
contact:
email: [email protected]
license:
name: MIT
url: http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
host: locache.herokuapp.com
basePath: /
schemes:
- http
consumes:
- application/json
produces:
- application/json
paths:
/:
get:
description: Retrieve geo and timezone information for a location
of interest, at a particular time (for DST calculations).
parameters:
- name: location
in: query
type: string
required: true
description: location of interest.
- name: timestamp
in: query
type: integer
description: seconds from `00:00 01-01-1970 UTC`, in time local to
`location`. If not provided, the timestamp of the GET request is used.
responses:
200:
description: Look at the JSON Schema property descriptions.
schema:
required:
- formattedAddress
- city
- country
- timeUntilTomorrow
- lng
- lat
- timeZoneId
- s
- utcFromTimestamp
- dstOffset
- utcOffset
- rawOffset
- timeZoneName
properties:
formattedAddress:
type: string
example: Prenzlauer Allee 227, 10405 Berlin, Germany
city:
type: string
example: Berlin
country:
type: string
example: Germany
timeUntilTomorrow:
type: integer
description: seconds until 00:00, local time
example: 19851
lng:
type: number
format: float
description: approximate longitude
example: 13.42027
lat:
type: number
format: float
description: approximate latitude
example: 52.53334
timeZoneId:
type: string
example: Europe/Berlin
s:
type: string
description: state or province
example: Berlin
utcFromTimestamp:
type: string
description: the UTC timestamp from which DST is inferred.
This is either the UTC timestamp when the other properties
were calculated, or the timestamp provided in the initial
GET request.
example: "2016-03-28 16:29:09 UTC"
dstOffset:
type: integer
description: at `utcFromTimestamp`, what is the current
daylight savings offset (from UTC). This is 0 if DST is
not locally in effect.
example: 3600
utcOffset:
type: integer
example: 7200
description: how many seconds from UTC is the time zone,
factoring in daylight savings, at `utcFromTimestamp`?
rawOffset:
type: integer
description: how many seconds from UTC is the time zone,
not factoring in daylight savings, at `utcFromTimestatmp`?
example: 3600
timeZoneName:
type: string
example: "CEST"