public interface SearchService
| Modifier and Type | Method and Description |
|---|---|
SavedSearch |
createSavedSearch(String query)
Creates a new saved search for the authenticating user.
|
void |
deleteSavedSearch(long searchId)
Deletes a saved search
|
List<Trends> |
getDailyTrends()
Retrieves the top 20 trending topics, hourly for the past 24 hours.
|
List<Trends> |
getDailyTrends(boolean excludeHashtags)
Retrieves the top 20 trending topics, hourly for the past 24 hours.
|
List<Trends> |
getDailyTrends(boolean excludeHashtags,
String startDate)
Retrieves the top 20 trending topics, hourly for a 24-hour period starting at the specified date.
|
Trends |
getLocalTrends(long whereOnEarthId)
Retrieves the top 10 trending topics for a given location, identified by its "Where on Earth" (WOE) ID.
|
Trends |
getLocalTrends(long whereOnEarthId,
boolean excludeHashtags)
Retrieves the top 10 trending topics for a given location, identified by its "Where on Earth" (WOE) ID.
|
SavedSearch |
getSavedSearch(long searchId)
Retrieves a single saved search by the saved search's ID.
|
List<SavedSearch> |
getSavedSearches()
Retrieves the authenticating user's saved searches.
|
List<Trends> |
getWeeklyTrends()
Retrieves the top 30 trending topics for each day in the past week.
|
List<Trends> |
getWeeklyTrends(boolean excludeHashtags)
Retrieves the top 30 trending topics for each day in the past week.
|
List<Trends> |
getWeeklyTrends(boolean excludeHashtags,
String startDate)
Retrieves the top 30 trending topics for each day in a given week.
|
SearchResults |
search(String query)
Searches Twitter, returning the first 50 matching
Tweets |
SearchResults |
search(String query,
int page,
int pageSize)
Searches Twitter, returning a specific page out of the complete set of results.
|
SearchResults |
search(String query,
int page,
int pageSize,
long sinceId,
long maxId)
Searches Twitter, returning a specific page out of the complete set of results.
|
SearchResults search(String query)
Tweetsquery - The search query stringSearchResults containing the search results metadata and a list of matching TweetsApiException - if there is an error while communicating with Twitter.SearchResults,
TweetSearchResults search(String query, int page, int pageSize)
query - The search query stringpage - The page to returnpageSize - The number of Tweets per pageSearchResults containing the search results metadata and a list of matching TweetsApiException - if there is an error while communicating with Twitter.SearchResults,
TweetSearchResults search(String query, int page, int pageSize, long sinceId, long maxId)
query - The search query stringpage - The page to returnpageSize - The number of Tweets per pagesinceId - The minimum Tweet ID to return in the resultsmaxId - The maximum Tweet ID to return in the resultsSearchResults containing the search results metadata and a list of matching TweetsApiException - if there is an error while communicating with Twitter.SearchResults,
TweetList<SavedSearch> getSavedSearches()
ApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.SavedSearch getSavedSearch(long searchId)
searchId - the ID of the saved searchApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.SavedSearch createSavedSearch(String query)
query - the search query to saveApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.void deleteSavedSearch(long searchId)
searchId - the ID of the saved searchApiException - if there is an error while communicating with Twitter.MissingAuthorizationException - if TwitterTemplate was not created with OAuth credentials.List<Trends> getDailyTrends()
ApiException - if there is an error while communicating with Twitter.List<Trends> getDailyTrends(boolean excludeHashtags)
excludeHashtags - if true, hashtagged topics will be excluded from the trends list.ApiException - if there is an error while communicating with Twitter.List<Trends> getDailyTrends(boolean excludeHashtags, String startDate)
excludeHashtags - if true, hashtagged topics will be excluded from the trends list.startDate - the date to start retrieving trending data for, in MM-DD-YYYY format.ApiException - if there is an error while communicating with Twitter.List<Trends> getWeeklyTrends()
ApiException - if there is an error while communicating with Twitter.List<Trends> getWeeklyTrends(boolean excludeHashtags)
excludeHashtags - if true, hashtagged topics will be excluded from the trends list.ApiException - if there is an error while communicating with Twitter.List<Trends> getWeeklyTrends(boolean excludeHashtags, String startDate)
excludeHashtags - if true, hashtagged topics will be excluded from the trends list.startDate - the date to start retrieving trending data for, in MM-DD-YYYY format.ApiException - if there is an error while communicating with Twitter.Trends getLocalTrends(long whereOnEarthId)
whereOnEarthId - the Where on Earth ID for the location to retrieve trend data.ApiException - if there is an error while communicating with Twitter.Trends getLocalTrends(long whereOnEarthId, boolean excludeHashtags)
whereOnEarthId - the Where on Earth ID for the location to retrieve trend data.excludeHashtags - if true, hashtagged topics will be excluded from the trends list.ApiException - if there is an error while communicating with Twitter.Copyright © 2013. All Rights Reserved.