-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsocket.yml
More file actions
200 lines (199 loc) · 5.89 KB
/
socket.yml
File metadata and controls
200 lines (199 loc) · 5.89 KB
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
name: googlemaps-api
version: 0.0.2
description: Syncano socket for google maps api integration
author:
name: Marcin Godlewski
endpoints:
getGeoLocation:
description: Returns geocode for given address
file: scripts/geocoding.js
parameters:
address:
type: string
description: "Address to convert into geographic coordinates"
example: "1600 Amphitheatre Parkway, Mountain View, CA"
response:
mimetype: application/json
examples:
-
exit_code: 200
description: Success
example: |
{
lat: 37.4223658,
lng: -122.0843845
}
-
exit_code: 400
description: Failed
getReverseGeoLocation:
description: Returns human-readable addresses from given geocode
file: scripts/reverseGeocoding.js
parameters:
latitude:
type: string
description: "Geographic latitude of given location"
example: "37.4223658"
longitude:
type: string
description: "Geographic longitude of given location"
example: "-122.0843845"
response:
mimetype: application/json
examples:
-
exit_code: 200
description: Success
examples: |
[
'Google Bldg 40, 1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA',
'1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA',
'Mountain View, CA, USA',
'Mountain View, CA 94043, USA',
'Santa Clara County, CA, USA',
'San Jose-Sunnyvale-Santa Clara, CA, CA, USA',
'San Jose Metropolitan Area, CA, USA',
'California, USA',
'United States'
]
-
exit_code: 400
description: Failed
getDistance:
description: Returns distance and time for given origin and destination
file: scripts/distance.js
parameters:
origin:
type: string
description: Origin human-readable address or geocode point location
example: "New York, NY, USA"
destination:
type: string
description: Description human-readable address or geocode point location
example: "38.4223658,-123.0843845"
response:
mimetype: application/json
examples:
-
exit_code: 200
description: Success
example: |
{
destination_addresses : [ 'Wright Hill Rd, Bodega Bay, CA 94923, USA' ],
origin_addresses : [ 'New York, NY, USA' ],
rows : [
{
elements : [
{
distance : {
text : '4,724 km',
value : 4724004
},
duration : {
text : '1 day 19 hours',
value : 155735
},
status : 'OK'
}
]
}
],
status : 'OK'
}
-
exit_code: 400
description: Failed
getTimezone:
description: Returns name of timzone, time offset and daylight saving offset
file: scripts/timezone.js
parameters:
location:
type: string
description: Geopoint coordinates for requesting timezone
example: "38.4223658,-123.0843845"
response:
mimetype: application/json
examples:
-
exit_code: 200
description: Success
example: |
{
dstOffset: 3600,
rawOffset: -28800,
status: 'OK',
timeZoneId: 'America/Los_Angeles',
timeZoneName: 'Pacific Daylight Time'
}
-
exit_code: 400
description: Failed
getDirections:
description: Returns calculated directions between provided starting point and destination
file: scripts/directions.js
parameters:
starting_point:
type: string
description: Geolocation of starting point for directions calculations
example: "38.4223658,-123.0843845"
destination:
type: string
description: Geolocation of destination point for directions calculations
example: "38.4233658,-123.0213845"
response:
mimetype: application/json
examples:
-
exit_code: 200
description: Success
-
exit_code: 400
description: Failed
getElevation:
description: Returns elevation for given locaction on surface of earh or ocean floor
file: scripts/elevation.js
parameters:
location:
type: string
description: Geopoint coordinates for elevation details, separated by comma
example: "41.8781136,-87.6297982"
response:
mimetype: application/json
examples:
-
exit_code: 200
description: Success
example: |
{
results: [
{
elevation: 181.5143737792969,
location: {
lat: 41.8781136,
lng: -87.6297982
},
resolution: 19.08790397644043
}
],
status: 'OK'
}
-
exit_code: 400
description: Failed
searchPlace:
description: Find place based on search string
file: scripts/searchPlace.js
parameters:
query:
type: string
description: Search string used to find given place
example: "Burger King, Warsaw, Poland"
response:
mimetype: application/json
examples:
-
exit_code: 200
description: Success
-
exit_code: 400
description: Failed