twitter4j.api
Interface LocalTrendsMethods

All Known Subinterfaces:
Twitter
All Known Implementing Classes:
TwitterImpl

public interface LocalTrendsMethods

Author:
Joern Huxhorn - jhuxhorn at googlemail.com

Method Summary
 ResponseList<Location> getAvailableTrends()
          Returns the locations that Twitter has trending topic information for.
 ResponseList<Location> getAvailableTrends(GeoLocation location)
          Returns the sorted locations that Twitter has trending topic information for.
 Trends getLocationTrends(int woeid)
          Returns the top 10 trending topics for a specific location Twitter has trending topic information for.
 

Method Detail

getAvailableTrends

ResponseList<Location> getAvailableTrends()
                                          throws TwitterException
Returns the locations that Twitter has trending topic information for. The response is an array of "locations" that encode the location's WOEID (a Yahoo! Where On Earth ID) and some other human-readable information such as a canonical name and country the location belongs in.
This method calls http://api.twitter.com/1/trends/available.json

Returns:
the locations
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.1.1
See Also:
GET trends/available | dev.twitter.com

getAvailableTrends

ResponseList<Location> getAvailableTrends(GeoLocation location)
                                          throws TwitterException
Returns the sorted locations that Twitter has trending topic information for. The response is an array of "locations" that encode the location's WOEID (a Yahoo! Where On Earth ID) and some other human-readable information such as a canonical name and country the location belongs in.
This method calls http://api.twitter.com/1/trends/available.json

Parameters:
location - the available trend locations will be sorted by distance to the lat and long passed in. The sort is nearest to furthest.
Returns:
the locations
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.1.1
See Also:
GET trends/available | dev.twitter.com

getLocationTrends

Trends getLocationTrends(int woeid)
                         throws TwitterException
Returns the top 10 trending topics for a specific location Twitter has trending topic information for. The response is an array of "trend" objects that encode the name of the trending topic, the query parameter that can be used to search for the topic on Search, and the direct URL that can be issued against Search. This information is cached for five minutes, and therefore users are discouraged from querying these endpoints faster than once every five minutes. Global trends information is also available from this API by using a WOEID of 1.
This method calls http://api.twitter.com/1/trends/:woeid.json

Parameters:
woeid - The WOEID of the location to be querying for
Returns:
trends
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.1.1
See Also:
GET trends/:woeid | dev.twitter.com