lib/twitter/rest/trends.rb in twitter-7.0.0 vs lib/twitter/rest/trends.rb in twitter-8.0.0.rc.1
- old
+ new
@@ -1,9 +1,9 @@
-require 'twitter/place'
-require 'twitter/rest/request'
-require 'twitter/rest/utils'
-require 'twitter/trend_results'
+require "twitter/place"
+require "twitter/rest/request"
+require "twitter/rest/utils"
+require "twitter/trend_results"
module Twitter
module REST
module Trends
include Twitter::REST::Utils
@@ -19,11 +19,11 @@
# @option options [String] :exclude Setting this equal to 'hashtags' will remove all hashtags from the trends list.
# @return [Array<Twitter::Trend>]
def trends(id = 1, options = {})
options = options.dup
options[:id] = id
- response = perform_get('/1.1/trends/place.json', options).first
+ response = perform_get("/1.1/trends/place.json", options).first
Twitter::TrendResults.new(response)
end
alias local_trends trends
alias trends_place trends
@@ -34,11 +34,11 @@
# @authentication Requires user context
# @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid.
# @param options [Hash] A customizable set of options.
# @return [Array<Twitter::Place>]
def trends_available(options = {})
- perform_get_with_objects('/1.1/trends/available.json', options, Twitter::Place)
+ perform_get_with_objects("/1.1/trends/available.json", options, Twitter::Place)
end
alias trend_locations trends_available
# Returns the locations that Twitter has trending topic information for, closest to a specified location.
#
@@ -49,10 +49,10 @@
# @param options [Hash] A customizable set of options.
# @option options [Float] :lat If provided with a :long option the available trend locations will be sorted by distance, nearest to furthest, to the co-ordinate pair. The valid ranges for latitude are -90.0 to +90.0 (North is positive) inclusive.
# @option options [Float] :long If provided with a :lat option the available trend locations will be sorted by distance, nearest to furthest, to the co-ordinate pair. The valid ranges for longitude are -180.0 to +180.0 (East is positive) inclusive.
# @return [Array<Twitter::Place>]
def trends_closest(options = {})
- perform_get_with_objects('/1.1/trends/closest.json', options, Twitter::Place)
+ perform_get_with_objects("/1.1/trends/closest.json", options, Twitter::Place)
end
end
end
end