public interface UserOperations
Modifier and Type | Method and Description |
---|---|
AccountSettings |
getAccountSettings()
Retrives the authenticating user's account settings.
|
long |
getProfileId()
Retrieves the authenticated user's Twitter ID.
|
Map<ResourceFamily,List<RateLimitStatus>> |
getRateLimitStatus(ResourceFamily... resources)
Retrieves the rate limit statuses for each of the resource families passed as arguments
Supports either user or application authorization.
|
String |
getScreenName()
Retrieves the authenticated user's Twitter screen name
|
List<SuggestionCategory> |
getSuggestionCategories()
Retrieves a list of categories from which suggested users to follow may be found.
|
List<TwitterProfile> |
getSuggestions(String slug)
Retrieves a list of suggestions of users to follow for a given category.
|
TwitterProfile |
getUserProfile()
Retrieves the authenticated user's Twitter profile details.
|
TwitterProfile |
getUserProfile(long userId)
Retrieves a specific user's Twitter profile details.
|
TwitterProfile |
getUserProfile(String screenName)
Retrieves a specific user's Twitter profile details.
|
List<TwitterProfile> |
getUsers(long... userIds)
Retrieves a list of Twitter profiles for the given list of user IDs.
|
List<TwitterProfile> |
getUsers(String... screenNames)
Retrieves a list of Twitter profiles for the given list of screen names.
|
List<TwitterProfile> |
searchForUsers(String query)
Searches for up to 20 users that match a given query.
|
List<TwitterProfile> |
searchForUsers(String query,
int page,
int pageSize)
Searches for users that match a given query.
|
AccountSettings |
updateAccountSettings(AccountSettingsData accountSettingsData)
Updates the authenticating user's account settings.
|
long getProfileId()
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.String getScreenName()
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.TwitterProfile getUserProfile()
TwitterProfile
object representing the user's profile.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.TwitterProfile getUserProfile(String screenName)
screenName
- the screen name for the user whose details are to be retrieved.TwitterProfile
object representing the user's profile.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.TwitterProfile getUserProfile(long userId)
userId
- the user ID for the user whose details are to be retrieved.TwitterProfile
object representing the user's profile.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.List<TwitterProfile> getUsers(long... userIds)
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.List<TwitterProfile> getUsers(String... screenNames)
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.List<TwitterProfile> searchForUsers(String query)
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.List<TwitterProfile> searchForUsers(String query, int page, int pageSize)
page
- the page of search results to returnpageSize
- the number of TwitterProfile
s per page. Maximum of 20 per page.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.List<SuggestionCategory> getSuggestionCategories()
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.List<TwitterProfile> getSuggestions(String slug)
slug
- the category's slugorg.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.Map<ResourceFamily,List<RateLimitStatus>> getRateLimitStatus(ResourceFamily... resources)
resources
- the list of resource families to inquire aboutorg.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.AccountSettings getAccountSettings()
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.AccountSettings updateAccountSettings(AccountSettingsData accountSettingsData)
accountSettingsData
- An AccountSettingsData with the settings to be changed.