Skip to content

Commit

Permalink
changed backtweets params to options hash
Browse files Browse the repository at this point in the history
  • Loading branch information
Wynn Netherland committed Dec 31, 2009
1 parent 7d7db54 commit 1656555
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/twitterland/back_tweets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ class BackTweets
# Get your api_key at http://www.backtype.com/developers
#
# Twitterland::BackTweets.search('http://squeejee.com', 'OU812')
def self.search(q, api_key, items_per_page=25, page=1, since_id=0)
rubyize_response(Mash.new(get("/search.json", :query => {:q => q, :key => api_key, :itemsperpage => items_per_page, :page => page, :since_id => since_id})))
def self.search(q, api_key, options={})
options['itemsperpage'] = options.delete(:items_per_page) if options[:items_per_page]
rubyize_response(Mash.new(get("/search.json", :query => {:q => q, :key => api_key}.merge(options))))
end


Expand Down

0 comments on commit 1656555

Please sign in to comment.