Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

venue search doesnt work with :near #24

Open
kprzywara opened this issue Sep 13, 2014 · 0 comments
Open

venue search doesnt work with :near #24

kprzywara opened this issue Sep 13, 2014 · 0 comments

Comments

@kprzywara
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant