lib/firstfm/venue.rb in firstfm-0.2.0 vs lib/firstfm/venue.rb in firstfm-0.2.1
- old
+ new
@@ -11,10 +11,10 @@
def self.search(venue, page = 1, limit = 50, country = nil)
response = get("/2.0/", {:query => {:method => 'venue.search', :venue => venue, :page => page, :limit => limit, :country => country, :api_key => Firstfm::CONFIG['api_key']}})
venues = response && response['lfm'] ? Venue.init_venues_from_hash(response['lfm']) : []
collection = WillPaginate::Collection.create(page, limit) do |pager|
pager.replace venues
- pager.total_entries = response['lfm']['results']['opensearch:totalResults'].to_i
+ pager.total_entries = response['lfm']['results']['totalResults'].to_i
end
end
def self.get_events(venue_id)
response = get("/2.0/", {:query => {:method => 'venue.getEvents', :venue => venue_id, :api_key => Firstfm::CONFIG['api_key']}})
\ No newline at end of file