Module: Foursquared::Specials

Included in:
Client
Defined in:
lib/foursquared/specials.rb

Overview

Specials module

Instance Method Summary collapse

Instance Method Details

#flag_special(special_id, options = {}) ⇒ Object

Flag a Special

Parameters:

  • special_id (String)

    required ID of special to flag

  • options (Hash) (defaults to: {})
  • option (Hash)

    a customizable set of options



21
22
23
# File 'lib/foursquared/specials.rb', line 21

def flag_special special_id, options={}
  response = post("/specials/#{special_id}/flag", options)["response"]
end

#special(special_id, options = {}) ⇒ Foursquared::Response::Special

Gives details about a special

Parameters:

  • special_id (String)

    required ID of special to retrieve

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :venueId (String)

    required ID of a venue the special is running at

  • :userId (String)

    ID of the user to check whether the special is unlocked for. Only available if the current user is the manager of the venue. If not provided, checks wher the special is unlocked for the current user.

Returns:



10
11
12
13
# File 'lib/foursquared/specials.rb', line 10

def special special_id, options={}
  response = get("/specials/#{special_id}")["response"]
  @special = Foursquared::Response::Special.new(self, response["special"])
end