Sha256: 4d495615e4e735ef40d76a3c5d0a72fd9e7f3ceb4562b08a414f946c2d4b4f01
Contents?: true
Size: 771 Bytes
Versions: 9
Compression:
Stored size: 771 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 = {}) # raise ArgumentError, "Invalid messaging action: #{action}" uri = @@SEARCH_URIS[:basic] response = http_connect(nil, false, :search) {|conn| create_http_get_request(uri, options) } json = JSON.parse(response.body) bless_models(Twitter::Status.unmarshal(JSON.dump(json["results"]))) end end
Version data entries
9 entries across 9 versions & 8 rubygems