* {@inheritDoc}
*/
public UserList updateUserList(int listId, String newListName, boolean isPublicList, String newDescription) throws TwitterException {
ensureAuthorizationEnabled();
List<HttpParameter> httpParams = new ArrayList<HttpParameter>();
httpParams.add(new HttpParameter("list_id", listId));
if (newListName != null) {
httpParams.add(new HttpParameter("name", newListName));
}
httpParams.add(new HttpParameter("mode", isPublicList ? "public" : "private"));
if (newDescription != null) {
httpParams.add(new HttpParameter("description", newDescription));
}
return factory.createAUserList(post(conf.getRestBaseURL() + "lists/update.json", httpParams.toArray(new HttpParameter[httpParams.size()])));
}