Campgrounds

This is a ruby wrapper for the Active Network campground API.

Installation

Add this line to your application's Gemfile:

gem 'campgrounds'

And then execute:

$ bundle

Or install it yourself as:

$ gem install campgrounds

Usage

If you haven't already, you'll need to create an account with Active Network to get an API key.

For details on the various methods and parameters available, see the comments in the lib/campground files.

Examples

campground = Campgrounds.client('yourkey')

Returns campgrounds matching a set of filters.

Get all campgrounds:

campground.campground_search.all()

Get campgrounds in Colorado with sites for trailers, water hookups, and fishing nearby:

campground.campground_search.find({:pstate => 'CO', :siteType => "trailer", :water => true, :amenity => 'fishing'})

Get campgrounds within 50 miles of Boulder, CO that allow pets:

campground.campground_search.find_by_address("boulder, co", 50, {:pets => true})

Campground Details

Get the details on a particular campground:

campground.campground_details.find({:contractCode => 'CO', :parkId => '50032'})

Get any sites in a particular campground that are pull-through and offer amp hookups with 20 amps or more:

campground.campsite_search.find({:contractCode => 'CO', :parkId => '50032', :pull => true, :hookups => "20+"})

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request