Documentation
¶
Index ¶
- type AvailabilityResponse
- type Client
- func (c *Client) Availability(campgroundID string, start, end time.Time) (models.Campsites, error)
- func (c *Client) Do(path string, queryParams url.Values) (*http.Response, error)
- func (c *Client) Poll(ctx context.Context, campgroundID string, start, end time.Time, ...) (models.Campsites, error)
- func (c *Client) SearchByID(campgroundID string) (*models.Campground, error)
- func (c *Client) Suggest(query string) ([]*models.Campground, error)
- type SearchResponse
- type SuggestResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AvailabilityResponse ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an HTTP client that interacts with the recreation.gov API.
func (*Client) Availability ¶
func (*Client) Poll ¶
func (c *Client) Poll(ctx context.Context, campgroundID string, start, end time.Time, interval time.Duration) (models.Campsites, error)
Poll is a blocking operation. To poll multiple campgrounds call this method in its own goroutine.
func (*Client) SearchByID ¶ added in v0.2.0
func (c *Client) SearchByID(campgroundID string) (*models.Campground, error)
type SearchResponse ¶
type SuggestResponse ¶ added in v0.2.0
type SuggestResponse struct {
Campgrounds []*models.Campground `json:"inventory_suggestions"`
}
Click to show internal directories.
Click to hide internal directories.