twitter4j.api
Interface SearchMethods

All Known Implementing Classes:
Twitter

public interface SearchMethods

Author:
Joern Huxhorn - jhuxhorn at googlemail.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.
 QueryResult search(Query query)
          Returns tweets that match a specified query.
 

Method Detail

search

QueryResult search(Query query)
                   throws TwitterException
Returns tweets that match a specified query.
This method calls http://search.twitter.com/search

Parameters:
query - - the search condition
Returns:
the result
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 1.1.7
See Also:
Twitter API Wiki / Twitter Search API Method: search

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

Returns:
the result
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.2
See Also:
Twitter Search API Method: trends

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

Returns:
the result
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.2
See Also:
Twitter Search API Method: trends

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

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:
Twitter Search API Method: trends

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

Returns:
the result
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.2
See Also:
Twitter Search API Method: trends daily

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

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:
Twitter Search API Method: trends daily

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

Returns:
the result
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.2
See Also:
Twitter Search API Method: trends weekly

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

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:
Twitter Search API Method: trends weekly