diff --git a/project.properties b/project.properties index 5723476..036dfaf 100644 --- a/project.properties +++ b/project.properties @@ -1,7 +1,7 @@ -#Mon, 29 Nov 2010 15:37:58 -0600 +#Fri, 10 Dec 2010 11:26:36 -0600 lib.local=true name=gritter version=0.1 -build.number=143 +build.number=145 linux.nailgun.classpath.dir=/home/jdbernard/programs/nailgun/classpath nailgun.classpath.dir=C\:/Documents and Settings/jbernard/My Documents/ng-classpath diff --git a/src/com/jdbernard/twitter/TwitterCLI.groovy b/src/com/jdbernard/twitter/TwitterCLI.groovy index 316bfc1..ec51d9d 100644 --- a/src/com/jdbernard/twitter/TwitterCLI.groovy +++ b/src/com/jdbernard/twitter/TwitterCLI.groovy @@ -402,7 +402,7 @@ public class TwitterCLI { /* ======== WORKER FUNCTIONS ========*/ public void deleteListMember(LinkedList args) { - def listRef = args.poll() + def listRef = parseListReference(args) def user = args.poll() log.debug("Deleting a member from a list: list='{}', user='{}'", @@ -415,9 +415,6 @@ public class TwitterCLI { return } - // parse the list reference - listRef = parseListReference(listRef) - // look up the user id if neccessary if (user.isLong()) user = user as long else user = twitter.showUser(user).id @@ -426,7 +423,7 @@ public class TwitterCLI { } public void deleteListSubscribtion(LinkedList args) { - def listRef = args.poll() + def listRef = parseListReference(args) log.debug("Unsubscribing from a list: listRef='{}', user='{}'", listRef, user) @@ -438,14 +435,11 @@ public class TwitterCLI { return } - // parse the list reference - listRef = parseListReference(listRef) - twitter.unsubscribeUserList(listRef.username, listRef.listId) } public void doDeleteList(LinkedList args) { - def listRef = args.poll() + def listRef = parseListReference(args) log.debug("Destroying a list: listRef='{}'", listRef) @@ -456,9 +450,6 @@ public class TwitterCLI { return } - // parse the list reference - listRef = parseListReference(listRef) - twitter.destroyUserList(listRef.listId) } @@ -585,7 +576,7 @@ public class TwitterCLI { } public void addListMember(LinkedList args) { - def listRef = args.poll() + def listRef = parseListReference(args) def user = args.poll() log.debug("Adding a member to a list: list='{}', user='{}'", @@ -604,13 +595,11 @@ public class TwitterCLI { return } - listRef = parseListReference(listRef) - // look up the user id if neccessary if (user.isLong()) user = user as long else user = twitter.showUser(user).id - twitter.addUserListMember(listRef.ListId, user) + twitter.addUserListMember(listRef.listId, user) }