Rename an Item List on the server

        :type item_list_url: String or ItemList
        :param item_list_url: the URL of the list to which to add the items,
            or an ItemList object
        :type new_name: String
        :param new_name: the new name to give the Item List

        :rtype: ItemList
        :returns: the item list, if successful

        :raises: APIError if the request was not successful

def rename_item_list(self, item_list_url, new_name):
        """ Rename an Item List on the server

        :type item_list_url: String or ItemList
        :param item_list_url: the URL of the list to which to add the items,
            or an ItemList object
        :type new_name: String
        :param new_name: the new name to give the Item List

        :rtype: ItemList
        :returns: the item list, if successful

        :raises: APIError if the request was not successful


        """
        data = json.dumps({'name': new_name})
        resp = self.api_request(str(item_list_url), data, method="PUT")

        try:
            return ItemList(resp['items'], self, item_list_url, resp['name'])
        except KeyError:
            try:
                raise APIError('200', 'Rename operation failed', resp['error'])
            except KeyError:
                raise APIError('200', 'Rename operation failed', resp)