Class: Foursquare::Merchant::VenueGroups
- Inherits:
-
Base
- Object
- Base
- Foursquare::Merchant::VenueGroups
show all
- Defined in:
- lib/foursquare/venue_groups.rb
Constant Summary
Constants included
from Requests
Requests::API, Requests::OAUTH
Instance Attribute Summary
Attributes inherited from Base
#consumer
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Methods included from Requests
#get, #post
Instance Method Details
#add(params) ⇒ Object
12
13
14
15
|
# File 'lib/foursquare/venue_groups.rb', line 12
def add(params)
response = self.post("/add", params)
Foursquare::Merchant::VenueGroup.new(response['venueGroup'], @consumer)
end
|
#find(venue_group_id, params = {}) ⇒ Object
7
8
9
10
|
# File 'lib/foursquare/venue_groups.rb', line 7
def find(venue_group_id, params={})
response = self.get("/#{venue_group_id}", params)
Foursquare::Merchant::VenueGroup.new(response['venueGroup'], @consumer)
end
|
#list(params = {}) ⇒ Object
17
18
19
20
21
|
# File 'lib/foursquare/venue_groups.rb', line 17
def list(params={})
response = self.get("/list", params)
venue_groups = response['venueGroups']['items']
venue_groups.map { |item| Foursquare::Merchant::VenueGroup.new(item, @consumer) }
end
|