twitter4j.api
Interface TrendsMethods

All Known Implementing Classes:
Twitter

public interface TrendsMethods

Since:
Twitter4J 2.1.3
Author:
Yusuke Yamamoto - yusuke at mac.com

Method Summary
 Trends getCurrentTrends()
          Returns the current top 10 trending topics on Twitter.
 Trends getCurrentTrends(boolean excludeHashTags)
          Returns the current top 10 trending topics on Twitter.
 java.util.List<Trends> getDailyTrends()
          Returns the top 20 trending topics for each hour in a given day.
 java.util.List<Trends> getDailyTrends(java.util.Date date, boolean excludeHashTags)
          Returns the top 20 trending topics for each hour in a given day.
 Trends getTrends()
          Returns the top ten topics that are currently trending on Twitter.
 java.util.List<Trends> getWeeklyTrends()
          Returns the top 30 trending topics for each day in a given week.
 java.util.List<Trends> getWeeklyTrends(java.util.Date date, boolean excludeHashTags)
          Returns the top 30 trending topics for each day in a given week.
 

Method Detail

getTrends

Trends getTrends()
                 throws TwitterException
Returns the top ten topics that are currently trending on Twitter. The response includes the time of the request, the name of each trend, and the url to the Twitter Search results page for that topic.
This method calls http://search.twitter.com/trends.json

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

getCurrentTrends

Trends getCurrentTrends()
                        throws TwitterException
Returns the current top 10 trending topics on Twitter. The response includes the time of the request, the name of each trending topic, and query used on Twitter Search results page for that topic.
This method calls http://search.twitter.com/trends/current.json

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

getCurrentTrends

Trends getCurrentTrends(boolean excludeHashTags)
                        throws TwitterException
Returns the current top 10 trending topics on Twitter. The response includes the time of the request, the name of each trending topic, and query used on Twitter Search results page for that topic.
This method calls http://search.twitter.com/trends/current.json

Parameters:
excludeHashTags - Setting this to true will remove all hashtags from the trends list.
Returns:
the result
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.2
See Also:
GET trends/current | dev.twitter.com

getDailyTrends

java.util.List<Trends> getDailyTrends()
                                      throws TwitterException
Returns the top 20 trending topics for each hour in a given day.
This method calls http://search.twitter.com/trends/daily.json

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

getDailyTrends

java.util.List<Trends> getDailyTrends(java.util.Date date,
                                      boolean excludeHashTags)
                                      throws TwitterException
Returns the top 20 trending topics for each hour in a given day.
This method calls http://search.twitter.com/trends/daily.json

Parameters:
date - Permits specifying a start date for the report.
excludeHashTags - Setting this to true will remove all hashtags from the trends list.
Returns:
the result
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.2
See Also:
GET trends/daily | dev.twitter.com

getWeeklyTrends

java.util.List<Trends> getWeeklyTrends()
                                       throws TwitterException
Returns the top 30 trending topics for each day in a given week.
This method calls http://search.twitter.com/trends/weekly.json

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

getWeeklyTrends

java.util.List<Trends> getWeeklyTrends(java.util.Date date,
                                       boolean excludeHashTags)
                                       throws TwitterException
Returns the top 30 trending topics for each day in a given week.
This method calls http://search.twitter.com/trends/weekly.json

Parameters:
date - Permits specifying a start date for the report.
excludeHashTags - Setting this to true will remove all hashtags from the trends list.
Returns:
the result
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.2
See Also:
GET trends/weekly | dev.twitter.com