Skip to content

Commit

Permalink
TFJ-452 removing UpdateDeliveryDevice as the method has been deprecated.
Browse files Browse the repository at this point in the history
  • Loading branch information
AndroMocel committed Nov 25, 2010
1 parent 27b4653 commit 5a4063f
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 122 deletions.
10 changes: 4 additions & 6 deletions twitter4j-core/src/main/java/twitter4j/api/AccountMethods.java
Expand Up @@ -56,10 +56,9 @@ public interface AccountMethods {
* @since Twitter4J 1.1.4
* @see <a href="http://dev.twitter.com/doc/get/account/rate_limit_status">GET account/rate_limit_status | dev.twitter.com</a>
*/
RateLimitStatus getRateLimitStatus()
throws TwitterException;
RateLimitStatus getRateLimitStatus() throws TwitterException;

/**
/**
* Sets which device Twitter delivers updates to for the authenticating user. Sending none as the device parameter will disable IM or SMS updates.
* <br>This method calls http://api.twitter.com/1/account/update_delivery_device.json
*
Expand All @@ -70,10 +69,9 @@ RateLimitStatus getRateLimitStatus()
* @see <a href="http://dev.twitter.com/doc/post/account/update_delivery_device">POST account/update_delivery_device | dev.twitter.com</a>
* @deprecated This endpoint is deprecated and should no longer be used.
*/
User updateDeliveryDevice(Device device)
throws TwitterException;
User updateDeliveryDevice(Device device) 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).
* <br>This method calls http://api.twitter.com/1/account/update_profile_colors.json
* @param profileBackgroundColor optional, can be null
Expand Down
9 changes: 0 additions & 9 deletions twitter4j-examples/bin/account/updateDeliveryDevice.cmd

This file was deleted.

7 changes: 0 additions & 7 deletions twitter4j-examples/bin/account/updateDeliveryDevice.sh

This file was deleted.

This file was deleted.

Expand Up @@ -42,13 +42,13 @@ public final class UpdateProfile {
* @param args message
*/
public static void main(String[] args) {
if (args.length < 5) {
System.out.println("Usage: java twitter4j.examples.account.UpdateProfile [name] [email] [url] [location] [description]");
if (args.length < 4) {
System.out.println("Usage: java twitter4j.examples.account.UpdateProfile [name] [url] [location] [description]");
System.exit(-1);
}
try {
Twitter twitter = new TwitterFactory().getInstance();
twitter.updateProfile(args[0], args[1], args[2], args[3], args[4]);
twitter.updateProfile(args[0], null, args[1], args[2], args[3]);
System.out.println("Successfully updated profile.");
System.exit(0);
} catch (TwitterException te) {
Expand Down
Expand Up @@ -49,10 +49,12 @@ public static void main(String[] args) {
do {
messages = twitter.getDirectMessages(paging);
for (DirectMessage message : messages) {
System.out.println("From: @" + message.getSenderScreenName() + " " + message.getText());
System.out.println("From: @" + message.getSenderScreenName() + " id:" + message.getId() + " - "
+ message.getText());
}
paging.setPage(paging.getPage() + 1);
} while (messages.size() > 0);
} while (messages.size() > 0 && paging.getPage() < 10);
System.out.println("done.");
System.exit(0);
} catch (TwitterException te) {
System.out.println("Failed to get messages: " + te.getMessage());
Expand Down
Expand Up @@ -31,7 +31,6 @@
import twitter4j.Twitter;
import twitter4j.TwitterException;
import twitter4j.TwitterFactory;
import twitter4j.User;

import java.util.List;

Expand All @@ -53,9 +52,9 @@ public static void main(String[] args) {
List<DirectMessage> directMessages;
do {
directMessages = twitter.getSentDirectMessages(page);
for (DirectMessage directMessage : directMessages) {
System.out.println("To: @" + directMessage.getRecipientScreenName() + " - "
+ directMessage.getText());
for (DirectMessage message : directMessages) {
System.out.println("To: @" + message.getRecipientScreenName() + " id:" + message.getId() + " - "
+ message.getText());
}
page.setPage(page.getPage() + 1);
} while (directMessages.size() > 0 && page.getPage() < 10);
Expand Down
Expand Up @@ -47,6 +47,7 @@ public static void main(String[] args) {
Twitter twitter = new TwitterFactory().getInstance();
long cursor = -1;
IDs ids;
System.out.println("Listing followers's ids.");
do {
ids = twitter.getFollowersIDs(cursor);
for (int id : ids.getIDs()) {
Expand Down
Expand Up @@ -47,6 +47,7 @@ public static void main(String[] args) {
Twitter twitter = new TwitterFactory().getInstance();
long cursor = -1;
IDs ids;
System.out.println("Listing following ids.");
do {
ids = twitter.getFriendsIDs(cursor);
for (int id : ids.getIDs()) {
Expand Down
Expand Up @@ -48,8 +48,8 @@ public static void main(String[] args) {
}
try {
Twitter twitter = new TwitterFactory().getInstance();
System.out.println("Existence of friendship between @" + args[0] + " and @" + args[1]
+ twitter.existsFriendship(args[0], args[1]));
boolean isAFollowingB = twitter.existsFriendship(args[0], args[1]);
System.out.println("@" + args[0] + (isAFollowingB ? " is" : " isn't") + " following @" + args[1]);
System.exit(0);
} catch (TwitterException te) {
te.printStackTrace();
Expand Down
Expand Up @@ -49,6 +49,7 @@ public static void main(String[] args) {
Twitter twitter = new TwitterFactory().getInstance();
long cursor = -1;
IDs ids;
System.out.println("Showing incoming pending follow request(s).");
do {
ids = twitter.getIncomingFriendships(cursor);
for (int id : ids.getIDs()) {
Expand Down
Expand Up @@ -24,43 +24,40 @@
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package twitter4j.examples.geo;
package twitter4j.examples.friendship;

import twitter4j.Place;
import twitter4j.IDs;
import twitter4j.Twitter;
import twitter4j.TwitterException;
import twitter4j.TwitterFactory;

/**
* Shows specified place's detailed information
* Shows outgoing friendship ids.
*
* @author Yusuke Yamamoto - yusuke at mac.com
*/
public final class GetGeoDetails {
public final class GetOutgoingFriendships {
/**
* Usage: java twitter4j.examples.geo.GetGeoDetails [place id]
* Usage: java twitter4j.examples.friendship.GetOutgoingFriendships
*
* @param args message
*/
public static void main(String[] args) {
if (args.length < 1) {
System.out.println("Usage: java twitter4j.examples.geo.GetGeoDetails [place id]");
System.exit(-1);
}
try {
Twitter twitter = new TwitterFactory().getInstance();
Place place = twitter.getGeoDetails(args[0]);
System.out.println("name: " + place.getName());
System.out.println("country: " + place.getCountry());
System.out.println("country code: " + place.getCountryCode());
System.out.println("full name: " + place.getFullName());
System.out.println("id: " + place.getId());
System.out.println("place type: " + place.getPlaceType());
System.out.println("street address: " + place.getStreetAddress());
long cursor = -1;
IDs ids;
System.out.println("Showing outgoing pending follow request(s).");
do {
ids = twitter.getOutgoingFriendships(cursor);
for (int id : ids.getIDs()) {
System.out.println(id);
}
} while ((cursor = ids.getNextCursor()) != 0);
System.exit(0);
} catch (TwitterException te) {
te.printStackTrace();
System.out.println("Failed to retrieve geo details: " + te.getMessage());
System.out.println("Failed to get outgoing friendships: " + te.getMessage());
System.exit(-1);
}
}
Expand Down

0 comments on commit 5a4063f

Please sign in to comment.