You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
foursquare requires either :ll or :near to be specified. The gem forces a check on :ll presence in venue_proxy.rb so you cannot do :near searches. the code also fails since its expecting 'groups' returned while foursquare returns venues immediatelly.
I monkey patched it this way (extended the if statement and commented out what doesnt work)
def search(options={})
raise ArgumentError, "You must include :ll or :near" unless options[:ll] || options[:near]
#response = @foursquare.get('venues/search', options)["groups"].inject({}) do |venues, group|
venues = @foursquare.get('venues/search', options)
=begin
venues[group["type"]] ||= []
venues[group["type"]] += group["items"].map do |json|
Foursquare::Venue.new(@foursquare, json)
end
venues
end
=end
end
The text was updated successfully, but these errors were encountered:
foursquare requires either :ll or :near to be specified. The gem forces a check on :ll presence in venue_proxy.rb so you cannot do :near searches. the code also fails since its expecting 'groups' returned while foursquare returns venues immediatelly.
I monkey patched it this way (extended the if statement and commented out what doesnt work)
def search(options={})
raise ArgumentError, "You must include :ll or :near" unless options[:ll] || options[:near]
#response = @foursquare.get('venues/search', options)["groups"].inject({}) do |venues, group|
venues = @foursquare.get('venues/search', options)
=begin
venues[group["type"]] ||= []
venues[group["type"]] += group["items"].map do |json|
Foursquare::Venue.new(@foursquare, json)
end
venues
=end
end
The text was updated successfully, but these errors were encountered: