Skip to content
Browse files

Fix venue_tips to send options as query params

  • Loading branch information...
1 parent 70affe7 commit ed9271c1a14fb53ceacab2d4b1f531a868c39bb0 @yoyoyojomo yoyoyojomo committed Jan 31, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 lib/foursquare2/tips.rb
View
9 lib/foursquare2/tips.rb
@@ -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 ed9271c

Please sign in to comment.
Something went wrong with that request. Please try again.