Documentation ¶
Index ¶
- Variables
- type APIError
- type AddressFromLocationParameters
- type AddressInBoundingBoxParameters
- type AutocompleteGeocodingResponse
- type AutocompleteGeocodingService
- type Client
- func NewAutocompleteGeocodingClient(httpClient *http.Client) *Client
- func NewFleetTelematicsClient(httpClient *http.Client) *Client
- func NewGeocodingClient(httpClient *http.Client) *Client
- func NewPlacesClient(httpClient *http.Client) *Client
- func NewReverseGeocodingClient(httpClient *http.Client) *Client
- func NewRoutingClient(httpClient *http.Client) *Client
- func NewWeatherClient(httpClient *http.Client) *Client
- type DestinationParams
- type DetailsForSuggestionParameters
- type Enum
- type FleetTelematicsParams
- type FleetTelematicsService
- type FleetTelematicsWaypointsSequenceResponse
- type GeocodingResponse
- type GeocodingService
- func (s *GeocodingService) AddressInBoundingBox(params *AddressInBoundingBoxParameters) (*GeocodingResponse, *http.Response, error)
- func (s *GeocodingService) CreateMapView(latlong0 [2]float32, latlong1 [2]float32) string
- func (s *GeocodingService) PartialAddressInformation(params *PartialAddressInformationParameters) (*GeocodingResponse, *http.Response, error)
- func (s *GeocodingService) Search(params *SearchTextParameters) (*GeocodingResponse, *http.Response, error)
- type LandmarksParameters
- type PartialAddressInformationParameters
- type PlaceCategoriesParameters
- type PlaceCategoriesResponse
- type PlacesService
- type ReverseGeocodingService
- func (s *ReverseGeocodingService) AddressFromLocation(params *AddressFromLocationParameters) (*GeocodingResponse, *http.Response, error)
- func (s *ReverseGeocodingService) CreateAddressFromLocationParameters(latlong [2]float32, diameter int, mode Enum, maxResults int, gen int, ...) AddressFromLocationParameters
- func (s *ReverseGeocodingService) CreateLandmarksParameters(latlong [2]float32, diameter int, gen int, apiKey string) LandmarksParameters
- func (s *ReverseGeocodingService) Landmarks(params *LandmarksParameters) (*GeocodingResponse, *http.Response, error)
- type RoutingParams
- type RoutingResponse
- type RoutingService
- type SearchTextParameters
- type SevereWeatherAlertsParams
- type SevereWeatherAlertsResponse
- type WeatherConditionsParams
- type WeatherConditionsResponse
- type WeatherService
Constants ¶
This section is empty.
Variables ¶
var ReverseGeocodingMode = &reverseGeocodingList{
RetrieveAddresses: 0,
RetrieveAreas: 1,
RetrieveLandmarks: 2,
RetrieveAll: 3,
TrackPosition: 4,
}
ReverseGeocodingMode for public use
var RouteMode = &routeModeList{
Fastest: 0,
Car: 1,
TrafficDisabled: 2,
Enabled: 3,
Pedestrian: 4,
PublicTransport: 5,
Truck: 6,
TrafficDefault: 7,
Bicycle: 8,
}
RouteMode for public use.
var WeatherProduct = &weatherProductList{
Observation: 0,
Forecast7days: 1,
Forecast7DaysSimple: 2,
ForecastHourly: 3,
ForecastAstronomy: 4,
Alerts: 5,
NwsAlerts: 6,
}
WeatherProduct for public use
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APIError struct { ErrorType string `json:"_type"` Type string `json:"type"` Subtype string `json:"subtype"` Details string `json:"details"` MetaInfo struct { Timestamp time.Time `json:"timestamp"` MapVersion string `json:"mapVersion"` ModuleVersion string `json:"moduleVersion"` InterfaceVersion string `json:"interfaceVersion"` AvailableMapVersion []string `json:"availableMapVersion"` } `json:"metaInfo"` }
APIError represents a HERE API Error response
type AddressFromLocationParameters ¶
type AddressFromLocationParameters struct { Prox string `url:"prox"` Mode string `url:"mode"` MaxResults int `url:"maxresults"` Gen int `url:"gen"` APIKey string `url:"apiKey"` }
AddressFromLocationParameters used for fetching address from location.
type AddressInBoundingBoxParameters ¶
type AddressInBoundingBoxParameters struct { SearchText string `url:"searchtext"` MapView string `url:"mapview"` Gen int `url:"gen"` APIKey string `url:"apiKey"` }
AddressInBoundingBoxParameters parameters by address text within given boundingbox.
type AutocompleteGeocodingResponse ¶
type AutocompleteGeocodingResponse struct { Suggestions []struct { Label string `json:"label"` Language string `json:"language"` CountryCode string `json:"countryCode"` LocationID string `json:"locationId"` Address struct { Country string `json:"country"` State string `json:"state"` County string `json:"county"` City string `json:"city"` District string `json:"district"` Street string `json:"street"` HouseNumber string `json:"houseNumber,omitempty"` PostalCode string `json:"postalCode"` } `json:"address,omitempty"` MatchLevel string `json:"matchLevel"` } `json:"suggestions"` }
AutocompleteGeocodingResponse response model for autocomplete geocoding service.
type AutocompleteGeocodingService ¶
type AutocompleteGeocodingService struct {
// contains filtered or unexported fields
}
AutocompleteGeocodingService provides for HERE AutocompleteGeocoding api.
func (*AutocompleteGeocodingService) CreateDetailsForSuggestionParameters ¶
func (s *AutocompleteGeocodingService) CreateDetailsForSuggestionParameters(query string, apiKey string) DetailsForSuggestionParameters
CreateDetailsForSuggestionParameters creates DetailsForSuggestionParameters parameters by search text for Geocoding Service.
func (*AutocompleteGeocodingService) DetailsForSuggestion ¶
func (s *AutocompleteGeocodingService) DetailsForSuggestion(params *DetailsForSuggestionParameters) (*AutocompleteGeocodingResponse, *http.Response, error)
DetailsForSuggestion returns a list of address suggestions for the search text.
type Client ¶
type Client struct { // HERE API Services Routing *RoutingService FleetTelematics *FleetTelematicsService Geocoding *GeocodingService ReverseGeocoding *ReverseGeocodingService AutocompleteGeocoding *AutocompleteGeocodingService Weather *WeatherService Places *PlacesService // contains filtered or unexported fields }
Client is a HERE client for making HERE API requests.
func NewAutocompleteGeocodingClient ¶
NewAutocompleteGeocodingClient returns a new AutocompleteGeocodingService.
func NewFleetTelematicsClient ¶
NewFleetTelematicsClient returns a new NewFleetTelematicsClient.
func NewGeocodingClient ¶
NewGeocodingClient returns a new GeocodingClient.
func NewPlacesClient ¶
NewPlacesClient returns a new PlacesService.
func NewReverseGeocodingClient ¶
NewReverseGeocodingClient returns a new ReverseGeocodingClient.
func NewRoutingClient ¶
NewRoutingClient returns a new RoutingClient.
func NewWeatherClient ¶
NewWeatherClient returns a new WeatherService.
type DestinationParams ¶
DestinationParams params
type DetailsForSuggestionParameters ¶
type DetailsForSuggestionParameters struct { Query string `url:"query"` APIKey string `url:"apikey"` }
DetailsForSuggestionParameters parameters by search text for Geocoding Service.
type Enum ¶
type Enum int
Enum a kind of alias for int values.
func (Enum) ValueOfReverseGeocodingMode ¶
ValueOfReverseGeocodingMode returns value for ReverseGeocodingMode.
func (Enum) ValueOfRouteMode ¶
ValueOfRouteMode returns value for RouteMode.
func (Enum) ValueOfWeatherProduct ¶
ValueOfWeatherProduct returns value for WeatherProduct.
type FleetTelematicsParams ¶
type FleetTelematicsParams struct { Start string `url:"start"` Destination1 string `url:"destination1,omitempty"` Destination2 string `url:"destination2,omitempty"` Destination3 string `url:"destination3,omitempty"` Destination4 string `url:"destination4,omitempty"` Destination5 string `url:"destination5,omitempty"` Destination6 string `url:"destination6,omitempty"` Destination7 string `url:"destination7,omitempty"` Destination8 string `url:"destination8,omitempty"` Destination9 string `url:"destination9,omitempty"` Destination10 string `url:"destination10,omitempty"` End string `url:"end"` APIKey string `url:"apikey"` Modes string `url:"mode"` Departure string `url:"departure"` }
FleetTelematicsParams parameters for Fleet Telematics Service.
type FleetTelematicsService ¶
type FleetTelematicsService struct {
// contains filtered or unexported fields
}
FleetTelematicsService provides for HERE routing api.
func (*FleetTelematicsService) CreateFleetTelematicsParams ¶
func (s *FleetTelematicsService) CreateFleetTelematicsParams(start DestinationParams, end DestinationParams, destinations []DestinationParams, apiKey string, modes []Enum) FleetTelematicsParams
CreateFleetTelematicsParams creates fleet telematics parameters struct.
func (*FleetTelematicsService) FindSequence ¶
func (s *FleetTelematicsService) FindSequence(params *FleetTelematicsParams) (*FleetTelematicsWaypointsSequenceResponse, *http.Response, error)
FindSequence with given parameters.
type FleetTelematicsWaypointsSequenceResponse ¶
type FleetTelematicsWaypointsSequenceResponse struct { Results []struct { Waypoints []struct { ID string `json:"id"` Lat float64 `json:"lat"` Lon float64 `json:"lon"` Sequence uint8 `json:"sequence"` EstimatedArrival time.Time `json:"estimatedArrival"` EstimatedDeparture time.Time `json:"estimatedDeparture"` FulFilledConstraints []string `json:"fulfilledConstraints"` } `json:"waypoints"` Distance string `json:"distance"` Time string `json:"time"` InterConnections []struct { FromWaypoint string `json:"fromWaypoint"` ToWaypoint string `json:"toWaypoint"` Distance float64 `json:"distance"` Time float64 `json:"time"` Rest float64 `json:"rest"` Waiting float64 `json:"waiting"` } `json:"interconnections"` Description string `json:"description"` TimeBreakdown struct { Driving int `json:"driving"` Service int `json:"service"` Rest int `json:"rest"` Waiting int `json:"waiting"` } } Errors []string `json:"errors"` ProcessingTimeDesc string `json:"processingTimeDesc"` ResponseCode string `json:"responseCode"` }
FleetTelematicsWaypointsSequenceResponse model for fleet telematics service response
type GeocodingResponse ¶
type GeocodingResponse struct { Response struct { MetaInfo struct { Timestamp string `json:"Timestamp"` } `json:"MetaInfo"` View []struct { Type string `json:"_type"` ViewID int `json:"ViewId"` Result []struct { Relevance int `json:"Relevance"` MatchLevel string `json:"MatchLevel"` MatchQuality struct { State int `json:"State"` City int `json:"City"` Street []float64 `json:"Street"` HouseNumber int `json:"HouseNumber"` } `json:"MatchQuality"` MatchType string `json:"MatchType"` Location struct { LocationID string `json:"LocationId"` LocationType string `json:"LocationType"` DisplayPosition struct { Latitude float64 `json:"Latitude"` Longitude float64 `json:"Longitude"` } `json:"DisplayPosition"` NavigationPosition []struct { Latitude float64 `json:"Latitude"` Longitude float64 `json:"Longitude"` } `json:"NavigationPosition"` MapView struct { TopLeft struct { Latitude float64 `json:"Latitude"` Longitude float64 `json:"Longitude"` } `json:"TopLeft"` BottomRight struct { Latitude float64 `json:"Latitude"` Longitude float64 `json:"Longitude"` } `json:"BottomRight"` } `json:"MapView"` Address struct { Label string `json:"Label"` Country string `json:"Country"` State string `json:"State"` County string `json:"County"` City string `json:"City"` District string `json:"District"` Street string `json:"Street"` HouseNumber string `json:"HouseNumber"` PostalCode string `json:"PostalCode"` AdditionalData []struct { Value string `json:"value"` Key string `json:"key"` } `json:"AdditionalData"` } `json:"Address"` } `json:"Location"` } `json:"Result"` } `json:"View"` } `json:"Response"` }
GeocodingResponse response model for geocoding service.
type GeocodingService ¶
type GeocodingService struct {
// contains filtered or unexported fields
}
GeocodingService provides for HERE Geocoding api.
func (*GeocodingService) AddressInBoundingBox ¶
func (s *GeocodingService) AddressInBoundingBox(params *AddressInBoundingBoxParameters) (*GeocodingResponse, *http.Response, error)
AddressInBoundingBox by search text within given bounding box.
func (*GeocodingService) CreateMapView ¶
func (s *GeocodingService) CreateMapView(latlong0 [2]float32, latlong1 [2]float32) string
CreateMapView Creates mapview parameter with given latitudes and longitudes.
func (*GeocodingService) PartialAddressInformation ¶
func (s *GeocodingService) PartialAddressInformation(params *PartialAddressInformationParameters) (*GeocodingResponse, *http.Response, error)
PartialAddressInformation requests the latitude, longitude and details of an address based on partial address information.
func (*GeocodingService) Search ¶
func (s *GeocodingService) Search(params *SearchTextParameters) (*GeocodingResponse, *http.Response, error)
Search for geocode by text.
type LandmarksParameters ¶
type LandmarksParameters struct { Prox string `url:"prox"` Mode string `url:"mode"` Gen int `url:"gen"` APIKey string `url:"apiKey"` }
LandmarksParameters used for fetching address from location.
type PartialAddressInformationParameters ¶
type PartialAddressInformationParameters struct { HouseNumber int `url:"housenumber"` Street string `url:"street"` City string `url:"city"` Country string `url:"country"` Gen int `url:"gen"` APIKey string `url:"apiKey"` }
PartialAddressInformationParameters parameters by partial address information.
type PlaceCategoriesParameters ¶
PlaceCategoriesParameters parameters to get categories a list of place categories available for a given location.
type PlaceCategoriesResponse ¶
type PlaceCategoriesResponse struct { Items []struct { ID string `json:"id"` Title string `json:"title"` Icon string `json:"icon"` Type string `json:"type"` Href string `json:"href"` System string `json:"system"` Within []interface{} `json:"within"` } `json:"items"` }
PlaceCategoriesResponse model for place categories.
type PlacesService ¶
type PlacesService struct {
// contains filtered or unexported fields
}
PlacesService provides for HERE Places api.
func (*PlacesService) CreatePlaceCategoriesParameters ¶
func (s *PlacesService) CreatePlaceCategoriesParameters(coordinates [2]float32, apiKey string) PlaceCategoriesParameters
CreatePlaceCategoriesParameters creates place categories parameters struct.
func (*PlacesService) PlaceCategories ¶
func (s *PlacesService) PlaceCategories(placeCategoriesParameters *PlaceCategoriesParameters) (*PlaceCategoriesResponse, *http.Response, error)
PlaceCategories returns place categories.
type ReverseGeocodingService ¶
type ReverseGeocodingService struct {
// contains filtered or unexported fields
}
ReverseGeocodingService provides for HERE ReverseGeocoding api.
func (*ReverseGeocodingService) AddressFromLocation ¶
func (s *ReverseGeocodingService) AddressFromLocation(params *AddressFromLocationParameters) (*GeocodingResponse, *http.Response, error)
AddressFromLocation returns address or addresses from given location.
func (*ReverseGeocodingService) CreateAddressFromLocationParameters ¶
func (s *ReverseGeocodingService) CreateAddressFromLocationParameters(latlong [2]float32, diameter int, mode Enum, maxResults int, gen int, apiKey string) AddressFromLocationParameters
CreateAddressFromLocationParameters creates AddressFromLocationParameters used for fetching address from location.
func (*ReverseGeocodingService) CreateLandmarksParameters ¶
func (s *ReverseGeocodingService) CreateLandmarksParameters(latlong [2]float32, diameter int, gen int, apiKey string) LandmarksParameters
CreateLandmarksParameters creates LandmarksParameters used for fetching address from location.
func (*ReverseGeocodingService) Landmarks ¶
func (s *ReverseGeocodingService) Landmarks(params *LandmarksParameters) (*GeocodingResponse, *http.Response, error)
Landmarks returns details of landmarks near to a given latitude and longitude.
type RoutingParams ¶
type RoutingParams struct { Waypoint0 string `url:"waypoint0"` Waypoint1 string `url:"waypoint1"` APIKey string `url:"apikey"` Modes string `url:"mode"` Departure string `url:"departure"` }
RoutingParams parameters for Routing Service.
type RoutingResponse ¶
type RoutingResponse struct { Response struct { MetaInfo struct { Timestamp time.Time `json:"timestamp"` MapVersion string `json:"mapVersion"` ModuleVersion string `json:"moduleVersion"` InterfaceVersion string `json:"interfaceVersion"` AvailableMapVersion []string `json:"availableMapVersion"` } `json:"metaInfo"` Route []struct { Waypoint []struct { LinkID string `json:"linkId"` MappedPosition struct { Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` } `json:"mappedPosition"` OriginalPosition struct { Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` } `json:"originalPosition"` Type string `json:"type"` Spot float64 `json:"spot"` SideOfStreet string `json:"sideOfStreet"` MappedRoadName string `json:"mappedRoadName"` Label string `json:"label"` ShapeIndex int `json:"shapeIndex"` Source string `json:"source"` } `json:"waypoint"` Mode struct { Type string `json:"type"` TransportModes []string `json:"transportModes"` TrafficMode string `json:"trafficMode"` Feature []interface{} `json:"feature"` } `json:"mode"` Leg []struct { Start struct { LinkID string `json:"linkId"` MappedPosition struct { Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` } `json:"mappedPosition"` OriginalPosition struct { Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` } `json:"originalPosition"` Type string `json:"type"` Spot float64 `json:"spot"` SideOfStreet string `json:"sideOfStreet"` MappedRoadName string `json:"mappedRoadName"` Label string `json:"label"` ShapeIndex int `json:"shapeIndex"` Source string `json:"source"` } `json:"start"` End struct { LinkID string `json:"linkId"` MappedPosition struct { Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` } `json:"mappedPosition"` OriginalPosition struct { Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` } `json:"originalPosition"` Type string `json:"type"` Spot float64 `json:"spot"` SideOfStreet string `json:"sideOfStreet"` MappedRoadName string `json:"mappedRoadName"` Label string `json:"label"` ShapeIndex int `json:"shapeIndex"` Source string `json:"source"` } `json:"end"` Length int `json:"length"` TravelTime int `json:"travelTime"` Maneuver []struct { Position struct { Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` } `json:"position"` Instruction string `json:"instruction"` TravelTime int `json:"travelTime"` Length int `json:"length"` ID string `json:"id"` Type string `json:"_type"` } `json:"maneuver"` } `json:"leg"` Summary struct { Distance int `json:"distance"` TrafficTime int `json:"trafficTime"` BaseTime int `json:"baseTime"` Flags []string `json:"flags"` Text string `json:"text"` TravelTime int `json:"travelTime"` Type string `json:"_type"` } `json:"summary"` } `json:"route"` Language string `json:"language"` } `json:"response"` }
RoutingResponse model for routing service.
type RoutingService ¶
type RoutingService struct {
// contains filtered or unexported fields
}
RoutingService provides for HERE routing api.
func (*RoutingService) CreateRoutingParams ¶
func (s *RoutingService) CreateRoutingParams(waypoint0 [2]float32, waypoint1 [2]float32, apiKey string, modes []Enum) RoutingParams
CreateRoutingParams creates routing parameters struct.
func (*RoutingService) Route ¶
func (s *RoutingService) Route(params *RoutingParams) (*RoutingResponse, *http.Response, error)
Route with given parameters.
type SearchTextParameters ¶
type SearchTextParameters struct { SearchText string `url:"searchtext"` APIKey string `url:"apiKey"` Gen int `url:"gen"` }
SearchTextParameters parameters by search text for Geocoding Service.
type SevereWeatherAlertsParams ¶
type SevereWeatherAlertsParams struct { Product string `url:"product" default0:"alerts"` Name string `url:"name"` APIKey string `url:"apiKey"` }
SevereWeatherAlertsParams parameters for severe alerts.
type SevereWeatherAlertsResponse ¶
type SevereWeatherAlertsResponse struct { Alerts struct { Alerts []struct { TimeSegment []struct { Value string `json:"value"` Segment string `json:"segment"` OtherAttributes struct { } `json:"otherAttributes"` DayOfWeek string `json:"day_of_week"` } `json:"timeSegment"` Type string `json:"type"` Description string `json:"description"` } `json:"alerts"` Country string `json:"country"` State string `json:"state"` City string `json:"city"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` Timezone int `json:"timezone"` } `json:"alerts"` FeedCreation time.Time `json:"feedCreation"` Metric bool `json:"metric"` }
SevereWeatherAlertsResponse model for severe alerts.
type WeatherConditionsParams ¶
type WeatherConditionsParams struct { Product string `url:"product" default0:"observation"` Latitude float32 `url:"latitude"` Longitude float32 `url:"longitude"` OneObservation bool `url:"oneobservation"` APIKey string `url:"apiKey"` }
WeatherConditionsParams parameters for specified latitude and longitude
type WeatherConditionsResponse ¶
type WeatherConditionsResponse struct { Observations struct { Location []struct { Observation []struct { Daylight string `json:"daylight"` Description string `json:"description"` SkyInfo string `json:"skyInfo"` SkyDescription string `json:"skyDescription"` Temperature string `json:"temperature"` TemperatureDesc string `json:"temperatureDesc"` Comfort string `json:"comfort"` HighTemperature string `json:"highTemperature"` LowTemperature string `json:"lowTemperature"` Humidity string `json:"humidity"` DewPoint string `json:"dewPoint"` Precipitation1H string `json:"precipitation1H"` Precipitation3H string `json:"precipitation3H"` Precipitation6H string `json:"precipitation6H"` Precipitation12H string `json:"precipitation12H"` Precipitation24H string `json:"precipitation24H"` PrecipitationDesc string `json:"precipitationDesc"` AirInfo string `json:"airInfo"` AirDescription string `json:"airDescription"` WindSpeed string `json:"windSpeed"` WindDirection string `json:"windDirection"` WindDesc string `json:"windDesc"` WindDescShort string `json:"windDescShort"` BarometerPressure string `json:"barometerPressure"` BarometerTrend string `json:"barometerTrend"` Visibility string `json:"visibility"` SnowCover string `json:"snowCover"` Icon string `json:"icon"` IconName string `json:"iconName"` IconLink string `json:"iconLink"` AgeMinutes string `json:"ageMinutes"` ActiveAlerts string `json:"activeAlerts"` Country string `json:"country"` State string `json:"state"` City string `json:"city"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` Distance float64 `json:"distance"` Elevation int `json:"elevation"` UtcTime time.Time `json:"utcTime"` } `json:"observation"` Country string `json:"country"` State string `json:"state"` City string `json:"city"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` Distance float64 `json:"distance"` Timezone int `json:"timezone"` } `json:"location"` } `json:"observations"` FeedCreation time.Time `json:"feedCreation"` Metric bool `json:"metric"` }
WeatherConditionsResponse model for weather conditions specified by latitude and longitude.
type WeatherService ¶
type WeatherService struct {
// contains filtered or unexported fields
}
WeatherService provides for HERE Weather api.
func (*WeatherService) SevereWeatherAlerts ¶
func (s *WeatherService) SevereWeatherAlerts(params *SevereWeatherAlertsParams) (*SevereWeatherAlertsResponse, *http.Response, error)
SevereWeatherAlerts fetches severe weather alert results.
func (*WeatherService) WeatherConditions ¶
func (s *WeatherService) WeatherConditions(params *WeatherConditionsParams) (*WeatherConditionsResponse, *http.Response, error)
WeatherConditions fetches conditions for specified latitude and longitude.