Documentation ¶
Overview ¶
Package npsapi provides an API to access National Park Service (NPS) data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFetchingData = errors.New("error talking to NPS API")
ErrFetchingData is a type of generic error when the NPS API does not return a valid response.
View Source
var ErrParkNotFound = errors.New("park not found")
ErrParkNotFound is a type of error returned when no parks were found.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client connects to the NPS API backend.
func NewClient ¶
NewClient creates a new NPS API client.
An API Key is required for use and can be obtained at: https://www.nps.gov/subjects/developer/get-started.htm
type Park ¶
type Park struct { // UUID-style identifier for the park. ID string // Park name. Name string // Longer park name. FullName string // 4-character code to identify the park. Code string // States the park is in. States []string // Geospatial location of the park. Location *LatLng // Decription of the park. Description string // URL of the park website. URL string }
Park basics include location, contact, and operating hours for each national park.
Click to show internal directories.
Click to hide internal directories.