Permalink
Browse files

Merge pull request #27 from yoyoyojomo/master

Fix venue_tips to send options as query params
  • Loading branch information...
2 parents 2a4720a + ed9271c commit e25907842f58fe81465c9c8bc4171d831e86d7f6 @mattmueller committed Feb 5, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 lib/foursquare2/tips.rb
View
@@ -36,10 +36,13 @@ def search_tips(options={})
# @option options String :query - Only find tips matching this term.
def venue_tips(venue_id, options={})
- response = connection.get("venues/#{venue_id}/tips")
+ query = options.delete(:query)
+ response = connection.get do |req|
+ req.url "venues/#{venue_id}/tips", options
+ end
tips = return_error_or_body(response, response.body.response.tips)
- tips = Foursquare2.filter(tips, options[:query]) if options.has_key? :query
- tips
+ tips = Foursquare2.filter(tips, query) if query
+ tips
end
# Add a tip

0 comments on commit e259078

Please sign in to comment.