Module: Skittles::Client::Special

Included in:
Skittles::Client
Defined in:
lib/skittles/client/special.rb

Overview

Define methods related to specials.

See Also:

Instance Method Summary (collapse)

Instance Method Details

- (Object) flag_special(special_id, venue_id, problem, options = {})

Allows users to indicate a special is improper in some way.

Options Hash (options):

  • text (String)

    Additional text about why the user has flagged this special.

See Also:



15
16
17
18
# File 'lib/skittles/client/special.rb', line 15

def flag_special(special_id, venue_id, problem, options = {})
  post("specials/#{special_id}/flag", { :venueId => venue_id, :problem => problem }.merge(options))
  nil
end

- (Hashie::Mash) special(special_id, venue_id)

Gives details about a special, including text and unlock rules.



26
27
28
# File 'lib/skittles/client/special.rb', line 26

def special(special_id, venue_id)
  get("specials/#{special_id}", :venueId => venue_id).special
end

- (Hashie::Mash) special_search(ll, options = {})

Note:

This is an experimental API.

Returns a list of specials near the current location.

Options Hash (options):

  • llAcc (Decimal)

    Accuracy of latitude and longitude, in meters.

  • alt (Decimal)

    Altitude of the user's location, in meters.

  • altAcc (Decimal)

    Accuracy of the user's altitude, in meters.

  • limit (Integer)

    Number of results to return, up to 50.

See Also:

Requires Acting User:

  • Yes



42
43
44
# File 'lib/skittles/client/special.rb', line 42

def special_search(ll, options = {})
  get('specials/search', { :ll => ll }.merge(options)).specials
end