Documentation ¶
Index ¶
Constants ¶
View Source
const ( RecreationGovURI = "https://www.recreation.gov" UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Availability ¶
type CampGround ¶ added in v0.0.2
type CampGround struct { AccessibleCampsitesCount int `json:"accessible_campsites_count,omitempty"` Activities []struct { ActivityDescription string `json:"activity_description"` ActivityFeeDescription string `json:"activity_fee_description"` ActivityID int `json:"activity_id"` ActivityName string `json:"activity_name"` } `json:"activities"` Addresses []struct { AddressType string `json:"address_type"` City string `json:"city"` CountryCode string `json:"country_code"` PostalCode string `json:"postal_code"` StateCode string `json:"state_code"` StreetAddress1 string `json:"street_address1"` StreetAddress2 string `json:"street_address2"` StreetAddress3 string `json:"street_address3"` } `json:"addresses"` AggregateCellCoverage float64 `json:"aggregate_cell_coverage,omitempty"` AverageRating float64 `json:"average_rating,omitempty"` CampsiteAccessible int `json:"campsite_accessible,omitempty"` CampsiteEquipmentName []string `json:"campsite_equipment_name,omitempty"` CampsiteReserveType []string `json:"campsite_reserve_type"` CampsiteTypeOfUse []string `json:"campsite_type_of_use"` CampsitesCount string `json:"campsites_count"` City string `json:"city"` CountryCode string `json:"country_code"` Description string `json:"description"` Directions string `json:"directions"` Distance string `json:"distance"` EntityID string `json:"entity_id"` EntityType string `json:"entity_type"` GoLiveDate time.Time `json:"go_live_date"` HTMLDescription string `json:"html_description"` ID string `json:"id"` Latitude string `json:"latitude"` Links []struct { Description string `json:"description"` LinkType string `json:"link_type"` Title string `json:"title"` URL string `json:"url"` } `json:"links"` Longitude string `json:"longitude"` Name string `json:"name"` Notices []struct { Text string `json:"text"` Type string `json:"type"` } `json:"notices"` NumberOfRatings int `json:"number_of_ratings,omitempty"` OrgID string `json:"org_id"` OrgName string `json:"org_name"` ParentID string `json:"parent_id"` ParentName string `json:"parent_name"` ParentType string `json:"parent_type"` PreviewImageURL string `json:"preview_image_url"` PriceRange struct { AmountMax int `json:"amount_max"` AmountMin int `json:"amount_min"` PerUnit string `json:"per_unit"` } `json:"price_range,omitempty"` Rate []struct { EndDate time.Time `json:"end_date"` Prices []struct { Amount int `json:"amount"` Attribute string `json:"attribute"` } `json:"prices"` RateMap map[string]struct { GroupFees interface{} `json:"group_fees"` SingleAmountFees Fees `json:"single_amount_fees"` } `json:"rate_map"` SeasonDescription string `json:"season_description"` SeasonType string `json:"season_type"` StartDate time.Time `json:"start_date"` } `json:"rate"` Reservable bool `json:"reservable"` StateCode string `json:"state_code"` TimeZone string `json:"time_zone,omitempty"` Type string `json:"type"` }
type Campsite ¶
type Campsite struct { // keeping this as a string even though it's a time object for less processing Availabilities map[string]string `json:"availabilities"` CampsiteID string `json:"campsite_id"` CampsiteReserveType string `json:"campsite_reserve_type"` CampsiteType string `json:"campsite_type"` CapacityRating string `json:"capacity_rating"` Loop string `json:"loop"` MaxNumPeople int `json:"max_num_people"` MinNumPeople int `json:"min_num_people"` Site string `json:"site"` // not sure what this represents TypeOfUse string `json:"type_of_use"` // TODO: find example of this. haven't seen what form it takes yet. CampsiteRules interface{} `json:"campsite_rules"` // not sure what quantities means // TODO: figure out if we need it Quantities struct{} `json:"quantities"` }
type ErrCloudFlare ¶ added in v0.0.3
func (ErrCloudFlare) Error ¶ added in v0.0.3
func (e ErrCloudFlare) Error() string
type HTTPClient ¶ added in v0.0.2
type Obfuscator ¶ added in v0.0.2
type Obfuscator struct {
// contains filtered or unexported fields
}
Obfuscator is what will set all the headers required to avoid detection by cloudflare. It also rate limits you to ensure you don't go over the cloudflare limit. TODO: make the rate limiting dynamic, ie increase limiting if it's no good
type SearchResults ¶ added in v0.0.2
type SearchResults struct { Latitude string `json:"latitude"` Location string `json:"location"` Longitude string `json:"longitude"` Radius string `json:"radius"` Results []CampGround `json:"results"` Size int `json:"size"` SpellingAutocorrected bool `json:"spelling_autocorrected"` Start string `json:"start"` Total int `json:"total"` }
type Server ¶ added in v0.0.4
type Server struct {
// contains filtered or unexported fields
}
func InitServer ¶ added in v0.0.4
func (*Server) GetAvailability ¶ added in v0.0.4
Click to show internal directories.
Click to hide internal directories.