public interface SearchOperations
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
|
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.
|
SearchResults |
search(SearchParameters searchParameters)
Searches Twitter, returning a set of results
Supports either user or application authorization.
|
SearchResults |
search(String query)
Searches Twitter, returning the first 50 matching
Tweet s
Supports either user or application authorization. |
SearchResults |
search(String query,
int pageSize)
Searches Twitter, returning a specific page out of the complete set of results.
|
SearchResults |
search(String query,
int pageSize,
long sinceId,
long maxId)
Searches Twitter, returning a specific page out of the complete set of
results.
|
SearchResults search(String query)
Tweet
s
Supports either user or application authorization.query
- The search query stringSearchResults
containing the search results metadata and a list of matching Tweet
sorg.springframework.social.ApiException
- if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException
- if TwitterTemplate was not created with OAuth credentials or an application access token.SearchResults
,
Tweet
SearchResults search(String query, int pageSize)
query
- The search query stringpageSize
- The number of Tweet
s per querySearchResults
containing the search results metadata and a list of matching Tweet
sorg.springframework.social.ApiException
- if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException
- if TwitterTemplate was not created with OAuth credentials or an application access token.SearchResults
,
Tweet
SearchResults search(String query, int pageSize, long sinceId, long maxId)
query
- The search query stringpageSize
- The number of Tweet
s per querysinceId
- 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 Tweet
sorg.springframework.social.ApiException
- if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException
- if TwitterTemplate was not created with OAuth credentials or an application access token.SearchResults
,
Tweet
SearchResults search(SearchParameters searchParameters)
searchParameters
- The search parametersSearchResults
containing the search results metadata and a list of matching Tweet
sorg.springframework.social.ApiException
- if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException
- if TwitterTemplate was not created with OAuth credentials or an application access token.SearchResults
,
Tweet
List<SavedSearch> getSavedSearches()
org.springframework.social.ApiException
- if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException
- if TwitterTemplate was not created with OAuth credentials.SavedSearch getSavedSearch(long searchId)
searchId
- the ID of the saved searchorg.springframework.social.ApiException
- if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException
- if TwitterTemplate was not created with OAuth credentials.SavedSearch createSavedSearch(String query)
query
- the search query to saveorg.springframework.social.ApiException
- if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException
- if TwitterTemplate was not created with OAuth credentials.void deleteSavedSearch(long searchId)
searchId
- the ID of the saved searchorg.springframework.social.ApiException
- if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException
- if TwitterTemplate was not created with OAuth credentials.Trends getLocalTrends(long whereOnEarthId)
whereOnEarthId
- the Where on Earth ID for the location to retrieve trend data.org.springframework.social.ApiException
- if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException
- if TwitterTemplate was not created with OAuth credentials or an application access token.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.org.springframework.social.ApiException
- if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException
- if TwitterTemplate was not created with OAuth credentials or an application access token.