Sha256: 745da42714eac3afc06074221d05a26643b5fc0c0ffc4d0f26ca52f466bd5de2
Contents?: true
Size: 731 Bytes
Versions: 8
Compression:
Stored size: 731 Bytes
Contents
module Twitter class LocalTrends include HTTParty base_uri "api.twitter.com/#{API_VERSION}/trends" format :json def self.available(query={}) before_test(query) query.delete(:api_endpoint) get("/available.json", :query => query).map{|location| Twitter.mash(location)} end def self.for_location(woeid,options = {}) before_test(options) get("/#{woeid}.json").map{|location| Twitter.mash(location)} end private def self.before_test(options) configure_base_uri(options) end def self.configure_base_uri(options) new_base_url = options[:api_endpoint] base_uri "#{new_base_url}/#{API_VERSION}/trends" if new_base_url end end end
Version data entries
8 entries across 8 versions & 4 rubygems