lib/pupil/search.rb in pupil-0.6.3 vs lib/pupil/search.rb in pupil-0.7
- old
+ new
@@ -1,12 +1,12 @@
class Pupil
# @param [String] keyword Search word
# @param [Hash] option
# @return [Array] Tweets
def search(keyword, option={})
- response = self.get("http://search.twitter.com/search.json", {:q => keyword}.update(option))
+ response = self.get("search/tweets.json", {:q => keyword}.update(option))
statuses = Array.new
- response["results"].each do |element|
+ response["statuses"].each do |element|
status = Status.new element
statuses << status
end
return statuses
end
\ No newline at end of file