Sha256: d566626debd50a635ceacdc9783df4d53e50ab0853ebdd654b7ae303965b46b7

Contents?: true

Size: 954 Bytes

Versions: 23

Compression:

Stored size: 954 Bytes

Contents

module Foursquare2
  module Specials

    # Retrieve information about a special
    #
    # param [String] special_id The ID of the special

    def special(special_id)
      response = connection.get("specials/#{special_id}")
      return_error_or_body(response, response.body.response.special)
    end    

    # Search for specials
    #
    # @param [Hash]  options
    # @option options String :ll - Latitude and longitude in format LAT,LON
    # @option options Integer :llAcc - Accuracy of the lat/lon in meters.
    # @option options Integer :alt - Altitude in meters
    # @option options Integer :altAcc - Accuracy of the altitude in meters
    # @option options Integer :limit - The limit of results to return.

    def search_specials(options={})
      response = connection.get do |req|
        req.url "specials/search", options
      end
      return_error_or_body(response, response.body.response.specials.items)
    end
    
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
foursquare2-1.6.0 lib/foursquare2/specials.rb
foursquare2-1.5.0 lib/foursquare2/specials.rb
foursquare2-1.4.2 lib/foursquare2/specials.rb
foursquare2-1.4.0 lib/foursquare2/specials.rb
foursquare2-1.3.6 lib/foursquare2/specials.rb
foursquare2-1.3.5 lib/foursquare2/specials.rb
foursquare2-1.3.4 lib/foursquare2/specials.rb
foursquare2-1.3.3 lib/foursquare2/specials.rb
foursquare2-1.3.2 lib/foursquare2/specials.rb
foursquare2-1.3.1 lib/foursquare2/specials.rb
foursquare2-1.3.0 lib/foursquare2/specials.rb
foursquare2-1.2.0 lib/foursquare2/specials.rb
foursquare2-1.1.2 lib/foursquare2/specials.rb
foursquare2-1.1.1 lib/foursquare2/specials.rb
foursquare2-1.1.0 lib/foursquare2/specials.rb
foursquare2-1.0.0 lib/foursquare2/specials.rb
foursquare2-0.9.9 lib/foursquare2/specials.rb
foursquare2-0.9.8 lib/foursquare2/specials.rb
foursquare2-0.9.6 lib/foursquare2/specials.rb
foursquare2-0.9.5 lib/foursquare2/specials.rb