Looks mostly true.
See if it works for one or two before you loop through a hundred, though!
You can check Reverse engineer the Discourse API to see that you get all of your group settings like you want them.
See also Use the Discourse API ruby gem