Module: Groupon
- Defined in:
- lib/groupon.rb,
lib/groupon/client.rb,
lib/groupon/version.rb
Defined Under Namespace
Classes: Client, GrouponError
Constant Summary collapse
- VERSION =
"1.0.1"
Class Attribute Summary collapse
-
.api_key ⇒ String
Get/sets the required Groupon API token.
Class Method Summary collapse
-
.deals(options = {}) ⇒ Array<Hashie::Mash>
Returns a list of deals.
-
.divisions ⇒ Array<Hashie::Mash>
Returns a list of divisions - cities where Groupon is live.
Class Attribute Details
.api_key ⇒ String
Get/sets the required Groupon API token
37 38 39 |
# File 'lib/groupon.rb', line 37 def api_key @api_key end |
Class Method Details
.deals(options = {}) ⇒ Array<Hashie::Mash>
Returns a list of deals.
The API returns an ordered list of deals currently running for a given Division.
Priority is based on position within the response (top deals are higher in priority).
26 27 28 |
# File 'lib/groupon.rb', line 26 def self.deals(={}) Groupon::Client.new.deals() end |