lib/twitter/api/trends.rb in twitter-4.4.2 vs lib/twitter/api/trends.rb in twitter-4.4.3
- old
+ new
@@ -20,11 +20,11 @@
# @example Return the top 10 trending topics for San Francisco
# Twitter.trends(2487956)
def trends(id=1, options={})
options[:id] = id
response = get("/1.1/trends/place.json", options)
- collection_from_array(Twitter::Trend, response[:body].first[:trends])
+ objects_from_array(Twitter::Trend, response[:body].first[:trends])
end
alias local_trends trends
alias trends_place trends
# Returns the locations that Twitter has trending topic information for
@@ -36,11 +36,11 @@
# @param options [Hash] A customizable set of options.
# @return [Array<Twitter::Place>]
# @example Return the locations that Twitter has trending topic information for
# Twitter.trends_available
def trends_available(options={})
- collection_from_response(Twitter::Place, :get, "/1.1/trends/available.json", options)
+ objects_from_response(Twitter::Place, :get, "/1.1/trends/available.json", options)
end
alias trend_locations trends_available
# Returns the locations that Twitter has trending topic information for, closest to a specified location.
#
@@ -53,10 +53,10 @@
# @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>]
# @example Return the locations that Twitter has trending topic information for
# Twitter.trends_closest
def trends_closest(options={})
- collection_from_response(Twitter::Place, :get, "/1.1/trends/closest.json", options)
+ objects_from_response(Twitter::Place, :get, "/1.1/trends/closest.json", options)
end
end
end
end