class Supercamp::Criteria::Campground

Constants

AMENITIES

Public Instance Methods

amenity(key) click to toggle source

amenity: Campground Feature

There are all sorts of things to do at campgrounds. Only one amenity can be specified per query.

# File lib/supercamp/criteria/campground.rb, line 60
def amenity(key)
  code = AMENITIES.fetch(key.to_s)
  merge_option(:amenity, code)
  self
end
geo(lat, lng) click to toggle source

landmarkLat, landmarkLong (latitude/longitude)

These two parameters allow for campground searches around a fixed geo-point.

# File lib/supercamp/criteria/campground.rb, line 26
def geo(lat, lng)
  merge_option("landmarkLat", lat)
  merge_option("landmarkLong", lng)
  self
end
has(*perks) click to toggle source

has: Campture Features

Specify 1 or more optional perks: # water

# sewer

# pull

# pets

# waterfront

# File lib/supercamp/criteria/campground.rb, line 76
def has(*perks)
  perks.each do |perk|
    next unless PERKS.has_key?(perk.to_s)
    merge_option(perk, PERKS[perk.to_s])
  end
  self
end
name(park) click to toggle source

pname: Park Name

The name of the park. When this parameter is specified, the API performs a string-match query for parks containing the character string specified.

# File lib/supercamp/criteria/campground.rb, line 49
def name(park)
  merge_option(:pname, park)
  self
end
state(abbr) click to toggle source

pstate: State or Province

The two character abbreviation for US state

# File lib/supercamp/criteria/campground.rb, line 37
def state(abbr)
  merge_option(:pstate, abbr)
  self
end