All Downloads are FREE. Search and download functionalities are using the official Maven repository.

twitter4jads.api.internal.UsersResources Maven / Gradle / Ivy

The newest version!
package twitter4jads.api.internal;

import twitter4jads.internal.models4j.*;

import java.io.File;
import java.io.InputStream;

public interface UsersResources {
    /**
     * Returns the current trend, geo, language, timezone and sleep time information for the authenticating user.
     * 
This method has not been finalized and the interface is subject to change in incompatible ways. *
This method calls http://api.twitter.com/1.1/account/settings.json * * @return the current trend, geo and sleep time information for the authenticating user. * @throws TwitterException when Twitter service or network is unavailable * @see GET account/settings | Twitter Developers * @since Twitter4J 2.1.9 */ AccountSettings getAccountSettings() throws TwitterException; /** * 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. Use this method to test if supplied user credentials are valid. *
This method calls http://api.twitter.com/1.1/account/verify_credentials.json * * @return user * @see GET account/verify_credentials | Twitter Developers * @since Twitter4J 2.0.0 */ User verifyCredentials() throws TwitterException; /** * Updates the current trend, geo, language, timezone and sleep time information for the authenticating user. *
This method has not been finalized and the interface is subject to change in incompatible ways. *
This method calls http://api.twitter.com/1.1/account/settings.json * * @param trendLocationWoeid Optional. The Yahoo! Where On Earth ID to use as the user's default trend location. * @param sleepTimeEnabled Optional. Whether sleep time is enabled for the user * @param startSleepTime Optional. The hour that sleep time should begin if it is enabled. * @param endSleepTime Optional. The hour that sleep time should end if it is enabled. * @param timeZone Optional. The timezone dates and times should be displayed in for the user. * @param lang Optional. The language which Twitter should render in for this user. (two letter ISO 639-1) * @return the current trend, geo and sleep time information for the authenticating user. * @throws TwitterException when Twitter service or network is unavailable * @see POST account/settings | Twitter Developers * @since Twitter4J 2.2.4 */ AccountSettings updateAccountSettings(Integer trendLocationWoeid, Boolean sleepTimeEnabled, String startSleepTime, String endSleepTime, String timeZone, String lang) throws TwitterException; // update delivery device /** * Sets values that users are able to set under the "Account" tab of their settings page. Only the parameters specified(non-null) will be updated. *
This method calls http://api.twitter.com/1.1/account/update_profile.json * * @param name Optional. Maximum of 20 characters. * @param url Optional. Maximum of 100 characters. Will be prepended with "http://" if not present. * @param location Optional. Maximum of 30 characters. The contents are not normalized or geocoded in any way. * @param description Optional. Maximum of 160 characters. * @return the updated user * @throws TwitterException when Twitter service or network is unavailable * @see POST account/update_profile | Twitter Developers * @since Twitter4J 2.1.8 */ User updateProfile(String name, String url, String location, String description) throws TwitterException; /** * Updates the authenticating user's profile background image. *
This method calls http://api.twitter.com/1.1/account/update_profile_background_image.json * * @param 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 forceably scaled down. * @param tile If set to true the background image will be displayed tiled. The image will not be tiled otherwise. * @return the updated user * @throws TwitterException when Twitter service or network is unavailable, * or when the specified file is not found (FileNotFoundException will be nested), * or when the specified file object in not representing a file (IOException will be nested) * @see POST account/update_profile_background_image | Twitter Developers * @since Twitter4J 2.1.0 */ User updateProfileBackgroundImage(File image, boolean tile) throws TwitterException; /** * Updates the authenticating user's profile background image. *
This method calls http://api.twitter.com/1.1/account/update_profile_background_image.json * * @param 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 forceably scaled down. * @param tile If set to true the background image will be displayed tiled. The image will not be tiled otherwise. * @return the updated user * @throws TwitterException when Twitter service or network is unavailable, * or when the specified file is not found (FileNotFoundException will be nested), * or when the specified file object in not representing a file (IOException will be nested) * @see POST account/update_profile_background_image | Twitter Developers * @since Twitter4J 2.1.11 */ User updateProfileBackgroundImage(InputStream image, boolean tile) throws TwitterException; /** * Sets one or more hex values that control the color scheme of the authenticating user's profile page on twitter.com. Each parameter's value must be a valid hexidecimal value, and may be either three or six characters (ex: #fff or #ffffff). *
This method calls http://api.twitter.com/1.1/account/update_profile_colors.json * * @param profileBackgroundColor optional, can be null * @param profileTextColor optional, can be null * @param profileLinkColor optional, can be null * @param profileSidebarFillColor optional, can be null * @param profileSidebarBorderColor optional, can be null * @return the updated user * @throws TwitterException when Twitter service or network is unavailable * @see POST account/update_profile_colors | Twitter Developers * @since Twitter4J 2.0.0 */ User updateProfileColors(String profileBackgroundColor, String profileTextColor, String profileLinkColor, String profileSidebarFillColor, String profileSidebarBorderColor) throws TwitterException; /** * Updates the authenticating user's profile image. *
This method calls http://api.twitter.com/1.1/account/update_profile_image.json * * @param 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. * @return the updated user * @throws TwitterException when Twitter service or network is unavailable, * or when the specified file is not found (FileNotFoundException will be nested), * or when the specified file object in not representing a file (IOException will be nested) * @see POST account/update_profile_image | Twitter Developers * @since Twitter4J 2.1.0 */ User updateProfileImage(File image) throws TwitterException; /** * Updates the authenticating user's profile image. *
This method calls http://api.twitter.com/1.1/account/update_profile_image.json * * @param 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. * @return the updated user * @throws TwitterException when Twitter service or network is unavailable, * or when the specified file is not found (FileNotFoundException will be nested), * or when the specified file object in not representing a file (IOException will be nested) * @see POST account/update_profile_image | Twitter Developers * @since Twitter4J 2.1.11 */ User updateProfileImage(InputStream image) throws TwitterException; /** * Returns a list of user objects that the authenticating user is blocking. *
This method calls http://api.twitter.com/1.1/blocks/blocking.json * * @return a list of user objects that the authenticating user * @throws TwitterException when Twitter service or network is unavailable * @see GET blocks/blocking | Twitter Developers * @since Twitter4J 2.0.4 */ PagableResponseList getBlocksList() throws TwitterException; /** * Returns a list of user objects that the authenticating user is blocking. *
This method calls http://api.twitter.com/1.1/blocks/blocking.json * * @param 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." * @return a list of user objects that the authenticating user * @throws TwitterException when Twitter service or network is unavailable * @see GET blocks/blocking | Twitter Developers * @since Twitter4J 2.0.4 */ PagableResponseList getBlocksList(long cursor) throws TwitterException; /** * Blocks the user specified in the ID parameter as the authenticating user. Returns the blocked user in the requested format when successful. *
This method calls http://api.twitter.com/1.1/blocks/create/[id].json * * @param userId the ID of the user to block * @return the blocked user * @throws TwitterException when Twitter service or network is unavailable * @see POST blocks/create | Twitter Developers * @since Twitter4J 2.1.0 */ User createBlock(long userId) throws TwitterException; /** * Blocks the user specified in the ID parameter as the authenticating user. Returns the blocked user in the requested format when successful. *
This method calls http://api.twitter.com/1.1/blocks/create/[id].json * * @param screenName the screen_name of the user to block * @return the blocked user * @throws TwitterException when Twitter service or network is unavailable * @see POST blocks/create | Twitter Developers * @since Twitter4J 2.0.1 */ User createBlock(String screenName) throws TwitterException; /** * Un-blocks the user specified in the ID parameter as the authenticating user. Returns the un-blocked user in the requested format when successful. *
This method calls http://api.twitter.com/1.1/blocks/destroy/[id].json * * @param userId the ID of the user to block * @return the unblocked user * @throws TwitterException when Twitter service or network is unavailable * @see POST blocks/destroy | Twitter Developers * @since Twitter4J 2.0.1 */ User destroyBlock(long userId) throws TwitterException; /** * Un-blocks the user specified in the ID parameter as the authenticating user. Returns the un-blocked user in the requested format when successful. *
This method calls http://api.twitter.com/1.1/blocks/destroy/[id].json * * @param screen_name the screen_name of the user to block * @return the unblocked user * @throws TwitterException when Twitter service or network is unavailable * @see POST blocks/destroy | Twitter Developers * @since Twitter4J 2.0.1 */ User destroyBlock(String screen_name) throws TwitterException; /** * Return up to 100 users worth of extended information, specified by either ID, screen name, or combination of the two. The author's most recent status (if the authenticating user has permission) will be returned inline. *
This method calls http://api.twitter.com/1.1/users/lookup.json * * @param ids Specifies the screen names of the users to return. * @return users * @throws TwitterException when Twitter service or network is unavailable * @see GET users/lookup | Twitter Developers * @since Twitter4J 2.1.1 */ ResponseList lookupUsers(long[] ids) throws TwitterException; /** * Return up to 100 users worth of extended information, specified by either ID, screen name, or combination of the two. The author's most recent status (if the authenticating user has permission) will be returned inline. *
This method calls http://api.twitter.com/1.1/users/lookup.json * * @param screenNames Specifies the screen names of the users to return. * @return users * @throws TwitterException when Twitter service or network is unavailable * @see GET users/lookup | Twitter Developers * @since Twitter4J 2.1.1 */ ResponseList lookupUsers(String[] screenNames) throws TwitterException; /** * Returns extended information of a given user, specified by ID or screen name as per the required id parameter. The author's most recent status will be returned inline. *
This method calls http://api.twitter.com/1.1/users/show.json * * @param userId the ID of the user for whom to request the detail * @return users * @throws TwitterException when Twitter service or network is unavailable * @see GET users/show | Twitter Developers * @since Twitter4J 2.1.0 */ User showUser(long userId) throws TwitterException; /** * Returns extended information of a given user, specified by ID or screen name as per the required id parameter. The author's most recent status will be returned inline. *
This method calls http://api.twitter.com/1.1/users/show.json * * @param screenName the screen name of the user for whom to request the detail * @return User * @throws TwitterException when Twitter service or network is unavailable * @see GET users/show | Twitter Developers */ User showUser(String screenName) throws TwitterException; /** * 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. *
This method calls http://api.twitter.com/1.1/users/search.json * * @param query The query to run against people search. * @param page Specifies the page of results to retrieve. Number of statuses per page is fixed to 20. * @return the list of Users matches the provided * @throws TwitterException when Twitter service or network is unavailable * @see GET users/search | Twitter Developers */ ResponseList searchUsers(String query, int page) throws TwitterException; /** * Returns an array of users that the specified user can contribute to. * * @param userId The user id of the user for whom to return results for * @return list of contributors * @throws TwitterException when Twitter service or network is unavailable * @see GET users/contributors | Twitter Developers * @since Twitter4J 3.0.0 */ ResponseList getContributees(long userId) throws TwitterException; /** * Returns an array of users that the specified user can contribute to. * * @param screenName The screen name of the user for whom to return results for * @return list of contributors * @throws TwitterException when Twitter service or network is unavailable * @see GET users/contributors | Twitter Developers * @since Twitter4J 3.0.0 */ ResponseList getContributees(String screenName) throws TwitterException; /** * Returns an array of users who can contribute to the specified account. * * @param userId The user id of the user for whom to return results for * @return list of contributors * @throws TwitterException when Twitter service or network is unavailable * @see GET users/contributors | Twitter Developers * @since Twitter4J 3.0.0 */ ResponseList getContributors(long userId) throws TwitterException; /** * Returns an array of users who can contribute to the specified account. * * @param screenName The screen name of the user for whom to return results for * @return list of contributors * @throws TwitterException when Twitter service or network is unavailable * @see GET users/contributors | Twitter Developers * @since Twitter4J 3.0.0 */ ResponseList getContributors(String screenName) throws TwitterException; /** * Removes the uploaded profile banner for the authenticating user. Returns HTTP 200 upon success. *
This method calls https://api.twitter.com/1.1/account/remove_profile_banner.json * * @see POST account/remove_profile_banner | Twitter Developers * @since Twitter4J 3.0.0 */ void removeProfileBanner() throws TwitterException; /** * Uploads a profile banner on behalf of the authenticating user. For best results, upload an <5MB image that is exactly 1252px by 626px. Images will be resized for a number of display options. Users with an uploaded profile banner will have a profile_banner_url node in their Users objects. More information about sizing variations can be found in User Profile Images and Banners.
* Profile banner images are processed asynchronously. The profile_banner_url and its variant sizes will not necessary be available directly after upload.
*
This method calls https://api.twitter.com/1.1/account/update_profile_banner.json * * @param image For best results, upload an <5MB image that is exactly 1252px by 626px. * @throws TwitterException when Twitter service or network is unavailable, * or when the specified file is not found (FileNotFoundException will be nested), * or when the specified file object in not representing a file (IOException will be nested) * @see POST account/update_profile_banner | Twitter Developers * @since Twitter4J 3.0.0 */ void updateProfileBanner(File image) throws TwitterException; /** * Uploads a profile banner on behalf of the authenticating user. For best results, upload an <5MB image that is exactly 1252px by 626px. Images will be resized for a number of display options. Users with an uploaded profile banner will have a profile_banner_url node in their Users objects. More information about sizing variations can be found in User Profile Images and Banners.
* Profile banner images are processed asynchronously. The profile_banner_url and its variant sizes will not necessary be available directly after upload.
*
This method calls https://api.twitter.com/1.1/account/update_profile_banner.json * * @param image For best results, upload an <5MB image that is exactly 1252px by 626px. * @throws TwitterException when Twitter service or network is unavailable, * or when the specified file is not found (FileNotFoundException will be nested), * or when the specified file object in not representing a file (IOException will be nested) * @see POST account/update_profile_banner | Twitter Developers * @since Twitter4J 3.0.0 */ void updateProfileBanner(InputStream image) throws TwitterException; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy