Keep hitting the API for more edits until there are none left.