-
Notifications
You must be signed in to change notification settings - Fork 3
/
results.go
54 lines (46 loc) · 1.67 KB
/
results.go
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
package applemaps
type SearchResponse struct {
DisplayMapRegion MapRegion `json:"displayMapRegion"`
Results []Place `json:"results"`
}
type SearchAutocompleteResult struct {
Results []AutocompleteResult `json:"results"`
}
type AutocompleteResult struct {
CompletionUrl string `json:"completionUrl"`
DisplayLines []string `json:"displayLines"`
Location Location `json:"location"`
StructuredAddress StructuredAddress `json:"structuredAddress"`
}
type DirectionsResponse struct {
Destination Place `json:"destination"`
Origin Place `json:"origin"`
Routes []Route `json:"routes"`
StepPaths [][]Location `json:"stepPaths"`
Steps []Step `json:"steps"`
}
type Route struct {
DistanceMeters int `json:"distanceMeters"`
DurationSeconds int `json:"durationSeconds"`
HasTolls bool `json:"hasTolls"`
Name string `json:"name"`
StepIndexes []int `json:"stepIndexes"`
TransportType string `json:"transportType"`
}
type EtaResponse struct {
Etas []Eta `json:"etas"`
}
type Eta struct {
Destination Location `json:"destination"`
DistanceMeters int `json:"distanceMeters"`
ExpectedTravelTimeSeconds int `json:"expectedTravelTimeSeconds"`
StaticTravelTimeSeconds int `json:"staticTravelTimeSeconds"`
TransportType string `json:"transportType"`
}
type Step struct {
DistanceMeters int `json:"distanceMeters"`
DurationSeconds int `json:"durationSeconds"`
Instructions string `json:"instructions"`
StepPathIndex int `json:"stepPathIndex"`
TransportType string `json:"transportType"`
}