Sha256: 398f4ee99200fc4455ffa384972d3d5564a7611d94852aa715a83bbc5ce6eb91
Contents?: true
Size: 665 Bytes
Versions: 6
Compression:
Stored size: 665 Bytes
Contents
class Twitter::Client @@SEARCH_URIS = { :basic => "/search.json", } # Provides access to Twitter's Search API. # # Example: # # For keyword search # iterator = @twitter.search(:q => "coworking") # while (tweet = iterator.next) # puts tweet.text # end # # An <tt>ArgumentError</tt> will be raised if an invalid <tt>action</tt> # is given. Valid actions are: # * +:received+ # * +:sent+ def search(options = {}) uri = @@SEARCH_URIS[:basic] response = search_oauth_connect(:get, uri, options) json = JSON.parse(response.body) bless_models(Twitter::Status.unmarshal(JSON.dump(json["results"]))) end end
Version data entries
6 entries across 6 versions & 1 rubygems