twitter4j.api
Interface NotificationMethods

All Known Subinterfaces:
Twitter
All Known Implementing Classes:
TwitterImpl

public interface NotificationMethods

Author:
Joern Huxhorn - jhuxhorn at googlemail.com

Method Summary
 User disableNotification(long userId)
          Disables notifications for updates from the specified user to the authenticating user.
 User disableNotification(java.lang.String screenName)
          Disables notifications for updates from the specified user to the authenticating user.
 User enableNotification(long userId)
          Enables notifications for updates from the specified user to the authenticating user.
 User enableNotification(java.lang.String screenName)
          Enables notifications for updates from the specified user to the authenticating user.
 

Method Detail

enableNotification

User enableNotification(java.lang.String screenName)
                        throws TwitterException
Enables notifications for updates from the specified user to the authenticating user. Returns the specified user when successful.
This method calls http://api.twitter.com/1/notifications/follow.json

Parameters:
screenName - Specifies the screen name of the user to follow with device updates.
Returns:
User
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.1
See Also:
POST notifications/follow | dev.twitter.com

enableNotification

User enableNotification(long userId)
                        throws TwitterException
Enables notifications for updates from the specified user to the authenticating user. Returns the specified user when successful.
This method calls http://api.twitter.com/1/notifications/follow.json

Parameters:
userId - Specifies the ID of the user to follow with device updates.
Returns:
User
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.1.0
See Also:
POST notifications/follow | dev.twitter.com

disableNotification

User disableNotification(java.lang.String screenName)
                         throws TwitterException
Disables notifications for updates from the specified user to the authenticating user. Returns the specified user when successful.
This method calls http://api.twitter.com/1/notifications/leave.json

Parameters:
screenName - Specifies the screen name of the user to disable device notifications.
Returns:
User
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.0.1
See Also:
POST notifications/leave | dev.twitter.com

disableNotification

User disableNotification(long userId)
                         throws TwitterException
Disables notifications for updates from the specified user to the authenticating user. Returns the specified user when successful.
This method calls http://api.twitter.com/1/notifications/leave.json

Parameters:
userId - Specifies the ID of the user to disable device notifications.
Returns:
User
Throws:
TwitterException - when Twitter service or network is unavailable
Since:
Twitter4J 2.1.0
See Also:
POST notifications/leave | dev.twitter.com