Skip to content

Commit

Permalink
Add aliases for search methods
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Sep 24, 2010
1 parent 0fc68f1 commit 05dd3e5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/twitter/search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def per_page(num)
@query[:rpp] = num
self
end
alias :rpp :per_page

# Which page of results to fetch
def page(num)
Expand All @@ -104,10 +105,11 @@ def page(num)

# Only searches tweets since a given id.
# Recommended to use this when possible.
def since(since_id)
@query[:since_id] = since_id
def since_id(id)
@query[:since_id] = id
self
end
alias :since :since_id

# From the advanced search form, not documented in the API
# Format YYYY-MM-DD
Expand All @@ -129,10 +131,11 @@ def geocode(lat, long, range)
self
end

def max(id)
def max_id(id)
@query[:max_id] = id
self
end
alias :max :max_id

# Clears all the query filters to make a new search
def clear
Expand Down

0 comments on commit 05dd3e5

Please sign in to comment.