groupme / quimby Goto Github PK
View Code? Open in Web Editor NEWRuby wrapper for the Foursquare API. Patches welcome.
License: MIT License
Ruby wrapper for the Foursquare API. Patches welcome.
License: MIT License
Let's try to get support for this, it would rock:
https://developer.foursquare.com/docs/lists/suggestvenues.html
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
Hello,
I am getting the following runtime error when running the foursquare example app from my localhost:
JSON::ParserError in SessionsController#callback
"A JSON text must at least contain two octets!"
app/controllers/sessions_controller.rb:10:in `callback'
Here is the first few lines of the framework trace:
"json (1.5.3) lib/json/common.rb:148:in initialize'
json (1.5.3) lib/json/common.rb:148:innew'
json (1.5.3) lib/json/common.rb:148:in parse'
quimby (0.4.5) lib/foursquare/base.rb:91:inaccess_token'
actionpack (3.0.3) lib/action_controller/metal/implicit_render.rb:4:in send_action'
actionpack (3.0.3) lib/abstract_controller/base.rb:151:inprocess_action'
actionpack (3.0.3) lib/action_controller/metal/rendering.rb:11:in process_action'
actionpack (3.0.3) lib/abstract_controller/callbacks.rb:18:inblock in process_action'
activesupport (3.0.3) lib/active_support/callbacks.rb:435:in _run__434586317__process_action__929587020__callbacks'
activesupport (3.0.3) lib/active_support/callbacks.rb:409:in_run_process_action_callbacks' "
I have followed all the instructions in readme.md and still no results.
My callback url is: "http://localhost:3000/session/callback".
Any comment/ guidance will be really appreciated.
Thanks,
Muntasir
Foursquare will be using the latest API version by default starting Nov 7th.
http://groups.google.com/group/foursquare-api/browse_thread/thread/3862de3d953c5574
This means the venue search (which pulls by 'group') won't work anymore.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.