Fixed a small bug in how list references were being parsed.
This commit is contained in:
parent
3b1d919c5a
commit
68cc604d6b
@ -1,7 +1,7 @@
|
|||||||
#Mon, 29 Nov 2010 15:37:58 -0600
|
#Fri, 10 Dec 2010 11:26:36 -0600
|
||||||
lib.local=true
|
lib.local=true
|
||||||
name=gritter
|
name=gritter
|
||||||
version=0.1
|
version=0.1
|
||||||
build.number=143
|
build.number=145
|
||||||
linux.nailgun.classpath.dir=/home/jdbernard/programs/nailgun/classpath
|
linux.nailgun.classpath.dir=/home/jdbernard/programs/nailgun/classpath
|
||||||
nailgun.classpath.dir=C\:/Documents and Settings/jbernard/My Documents/ng-classpath
|
nailgun.classpath.dir=C\:/Documents and Settings/jbernard/My Documents/ng-classpath
|
||||||
|
@ -402,7 +402,7 @@ public class TwitterCLI {
|
|||||||
/* ======== WORKER FUNCTIONS ========*/
|
/* ======== WORKER FUNCTIONS ========*/
|
||||||
|
|
||||||
public void deleteListMember(LinkedList args) {
|
public void deleteListMember(LinkedList args) {
|
||||||
def listRef = args.poll()
|
def listRef = parseListReference(args)
|
||||||
def user = args.poll()
|
def user = args.poll()
|
||||||
|
|
||||||
log.debug("Deleting a member from a list: list='{}', user='{}'",
|
log.debug("Deleting a member from a list: list='{}', user='{}'",
|
||||||
@ -415,9 +415,6 @@ public class TwitterCLI {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse the list reference
|
|
||||||
listRef = parseListReference(listRef)
|
|
||||||
|
|
||||||
// look up the user id if neccessary
|
// look up the user id if neccessary
|
||||||
if (user.isLong()) user = user as long
|
if (user.isLong()) user = user as long
|
||||||
else user = twitter.showUser(user).id
|
else user = twitter.showUser(user).id
|
||||||
@ -426,7 +423,7 @@ public class TwitterCLI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void deleteListSubscribtion(LinkedList args) {
|
public void deleteListSubscribtion(LinkedList args) {
|
||||||
def listRef = args.poll()
|
def listRef = parseListReference(args)
|
||||||
|
|
||||||
log.debug("Unsubscribing from a list: listRef='{}', user='{}'",
|
log.debug("Unsubscribing from a list: listRef='{}', user='{}'",
|
||||||
listRef, user)
|
listRef, user)
|
||||||
@ -438,14 +435,11 @@ public class TwitterCLI {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse the list reference
|
|
||||||
listRef = parseListReference(listRef)
|
|
||||||
|
|
||||||
twitter.unsubscribeUserList(listRef.username, listRef.listId)
|
twitter.unsubscribeUserList(listRef.username, listRef.listId)
|
||||||
}
|
}
|
||||||
|
|
||||||
public void doDeleteList(LinkedList args) {
|
public void doDeleteList(LinkedList args) {
|
||||||
def listRef = args.poll()
|
def listRef = parseListReference(args)
|
||||||
|
|
||||||
log.debug("Destroying a list: listRef='{}'", listRef)
|
log.debug("Destroying a list: listRef='{}'", listRef)
|
||||||
|
|
||||||
@ -456,9 +450,6 @@ public class TwitterCLI {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse the list reference
|
|
||||||
listRef = parseListReference(listRef)
|
|
||||||
|
|
||||||
twitter.destroyUserList(listRef.listId)
|
twitter.destroyUserList(listRef.listId)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -585,7 +576,7 @@ public class TwitterCLI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void addListMember(LinkedList args) {
|
public void addListMember(LinkedList args) {
|
||||||
def listRef = args.poll()
|
def listRef = parseListReference(args)
|
||||||
def user = args.poll()
|
def user = args.poll()
|
||||||
|
|
||||||
log.debug("Adding a member to a list: list='{}', user='{}'",
|
log.debug("Adding a member to a list: list='{}', user='{}'",
|
||||||
@ -604,13 +595,11 @@ public class TwitterCLI {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
listRef = parseListReference(listRef)
|
|
||||||
|
|
||||||
// look up the user id if neccessary
|
// look up the user id if neccessary
|
||||||
if (user.isLong()) user = user as long
|
if (user.isLong()) user = user as long
|
||||||
else user = twitter.showUser(user).id
|
else user = twitter.showUser(user).id
|
||||||
|
|
||||||
twitter.addUserListMember(listRef.ListId, user)
|
twitter.addUserListMember(listRef.listId, user)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user