public interface UsersResourcesAsync
Modifier and Type | Method and Description |
---|---|
void |
createBlock(long userId)
Blocks the user specified in the ID parameter as the authenticating user.
|
void |
createBlock(String screenName)
Blocks the user specified in the ID parameter as the authenticating user.
|
void |
createMute(long userId)
Mutes the user specified in the ID parameter as the authenticating user.
|
void |
createMute(String screenName)
Mutes the user specified in the screen name parameter as the authenticating user.
|
void |
destroyBlock(long userId)
Un-blocks the user specified in the ID parameter as the authenticating user.
|
void |
destroyBlock(String screenName)
Un-blocks the user specified in the ID parameter as the authenticating user.
|
void |
destroyMute(long userId)
Un-mutes the user specified in the ID parameter as the authenticating user.
|
void |
destroyMute(String screenName)
Un-mutes the user specified in the screen name parameter as the authenticating user.
|
void |
getAccountSettings()
Returns the current trend, geo and sleep time information for the authenticating user.
|
void |
getBlocksIDs()
Returns an array of numeric user ids the authenticating user is blocking.
|
void |
getBlocksIDs(long cursor)
Returns an array of numeric user ids the authenticating user is blocking.
|
void |
getBlocksList()
Returns a list of user objects that the authenticating user is blocking.
|
void |
getBlocksList(long cursor)
Returns a list of user objects that the authenticating user is blocking.
|
void |
getContributees(long userId)
Returns an array of users that the specified user can contribute to.
|
void |
getContributees(String screenName)
Returns an array of users that the specified user can contribute to.
|
void |
getContributors(long userId)
Returns an array of users who can contribute to the specified account.
|
void |
getContributors(String screenName)
Returns an array of users who can contribute to the specified account.
|
void |
getMutesIDs(long cursor)
Returns an array of numeric user ids the authenticating user is muting.
|
void |
getMutesList(long cursor)
Returns a list of user objects that the authenticating user is muting.
|
void |
lookupUsers(long... ids)
Return up to 100 users worth of extended information, specified by either ID, screen name, or combination of the two.
|
void |
lookupUsers(String... screenNames)
Return up to 100 users worth of extended information, specified by either ID, screen name, or combination of the two.
|
void |
removeProfileBanner()
Removes the uploaded profile banner for the authenticating user.
|
void |
searchUsers(String query,
int page)
Run a search for users similar to the Find People button on Twitter.com; the same results returned by people search on Twitter.com will be returned by using this API.
Usage note: It is only possible to retrieve the first 1000 matches from this API. |
void |
showUser(long userId)
Returns extended information of a given user, specified by ID or screen name as per the required id parameter.
|
void |
showUser(String screenName)
Returns extended information of a given user, specified by ID or screen name as per the required id parameter.
|
void |
updateAccountSettings(Integer trendLocationWoeid,
Boolean sleepTimeEnabled,
String startSleepTime,
String endSleepTime,
String timeZone,
String lang)
Updates the current trend, geo, language, timezone and sleep time information for the authenticating user.
|
void |
updateProfile(String name,
String url,
String location,
String description)
Sets values that users are able to set under the "Account" tab of their settings page.
|
void |
updateProfileBackgroundImage(File image,
boolean tile)
Updates the authenticating user's profile background image.
|
void |
updateProfileBackgroundImage(InputStream image,
boolean tile)
Updates the authenticating user's profile background image.
|
void |
updateProfileBanner(File image)
Uploads a profile banner on behalf of the authenticating user.
|
void |
updateProfileBanner(InputStream image)
Uploads a profile banner on behalf of the authenticating user.
|
void |
updateProfileColors(String profileBackgroundColor,
String profileTextColor,
String profileLinkColor,
String profileSidebarFillColor,
String profileSidebarBorderColor)
Deprecated.
Since Twitter4J 4.0.5
|
void |
updateProfileImage(File image)
Updates the authenticating user's profile image.
|
void |
updateProfileImage(InputStream image)
Updates the authenticating user's profile image.
|
void |
verifyCredentials()
Returns an HTTP 200 OK response code and a representation of the requesting user if authentication was successful; returns a 401 status code and an error message if not.
|
void getAccountSettings()
void verifyCredentials()
void updateAccountSettings(Integer trendLocationWoeid, Boolean sleepTimeEnabled, String startSleepTime, String endSleepTime, String timeZone, String lang)
trendLocationWoeid
- Optional. The Yahoo! Where On Earth ID to use as the user's default trend location.sleepTimeEnabled
- Optional. Whether sleep time is enabled for the userstartSleepTime
- Optional. The hour that sleep time should begin if it is enabled.endSleepTime
- Optional. The hour that sleep time should end if it is enabled.timeZone
- Optional. The timezone dates and times should be displayed in for the user.lang
- Optional. The language which Twitter should render in for this user. (two letter ISO 639-1)void updateProfile(String name, String url, String location, String description)
name
- Optional. Maximum of 20 characters.url
- Optional. Maximum of 100 characters. Will be prepended with "http://" if not present.location
- Optional. Maximum of 30 characters. The contents are not normalized or geocoded in any way.description
- Optional. Maximum of 160 characters.void updateProfileBackgroundImage(File image, boolean tile)
image
- Must be a valid GIF, JPG, or PNG image of less than 800 kilobytes in size. Images with width larger than 2048 pixels will be forcibly scaled down.tile
- If set to true the background image will be displayed tiled. The image will not be tiled otherwise.void updateProfileBackgroundImage(InputStream image, boolean tile)
image
- Must be a valid GIF, JPG, or PNG image of less than 800 kilobytes in size. Images with width larger than 2048 pixels will be forcibly scaled down.tile
- If set to true the background image will be displayed tiled. The image will not be tiled otherwise.void updateProfileColors(String profileBackgroundColor, String profileTextColor, String profileLinkColor, String profileSidebarFillColor, String profileSidebarBorderColor)
profileBackgroundColor
- optional, can be nullprofileTextColor
- optional, can be nullprofileLinkColor
- optional, can be nullprofileSidebarFillColor
- optional, can be nullprofileSidebarBorderColor
- optional, can be nullvoid updateProfileImage(File image)
image
- Must be a valid GIF, JPG, or PNG image of less than 700 kilobytes in size. Images with width larger than 500 pixels will be scaled down.void updateProfileImage(InputStream image)
image
- Must be a valid GIF, JPG, or PNG image of less than 700 kilobytes in size. Images with width larger than 500 pixels will be scaled down.void getBlocksList()
void getBlocksList(long cursor)
cursor
- Causes the list of blocked users to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filtered out after connections are queried. If no cursor is provided, a value of -1 will be assumed, which is the first "page."void getBlocksIDs()
void getBlocksIDs(long cursor)
cursor
- cursorvoid createBlock(long userId)
userId
- the screen_name of the user to blockvoid createBlock(String screenName)
screenName
- the screen_name of the user to blockvoid destroyBlock(long userId)
userId
- the ID of the user to blockvoid destroyBlock(String screenName)
screenName
- the screen_name of the user to blockvoid getMutesList(long cursor)
cursor
- Causes the list of blocked users to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filtered out after connections are queried. If no cursor is provided, a value of -1 will be assumed, which is the first "page."void getMutesIDs(long cursor)
cursor
- Causes the list of muted users to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filtered out after connections are queried. If no cursor is provided, a value of -1 will be assumed, which is the first "page."void createMute(long userId)
userId
- the ID of the user to mutevoid createMute(String screenName)
screenName
- the screen_name of the user to mutevoid destroyMute(long userId)
userId
- the ID of the user to mutevoid destroyMute(String screenName)
screenName
- the screen_name of the user to mutevoid lookupUsers(long... ids)
ids
- Specifies the screen names of the users to retrieve.void lookupUsers(String... screenNames)
screenNames
- Specifies the screen names of the users to retrieve.void showUser(long userId)
userId
- the ID of the user for whom to request the retrievevoid showUser(String screenName)
screenName
- the screen name of the user for whom to request the detailvoid searchUsers(String query, int page)
query
- The query to run against people search.page
- Specifies the page of results to retrieve. Number of statuses per page is fixed to 20.void getContributees(long userId)
userId
- The user id of the user for whom to return results forvoid getContributees(String screenName)
screenName
- The screen name of the user for whom to return results forvoid getContributors(long userId)
userId
- The user id of the user for whom to return results forvoid getContributors(String screenName)
screenName
- The screen name of the user for whom to return results forvoid removeProfileBanner()
void updateProfileBanner(File image)
image
- For best results, upload an <5MB image that is exactly 1252px by 626px.void updateProfileBanner(InputStream image)
image
- For best results, upload an <5MB image that is exactly 1252px by 626px.Copyright © 2018. All rights reserved.