Ok… I’ll look at the scripts… I’m an experienced coder in other languages, just not Ruby/RoR.
…
Ok I’m back from looking at the existing import scripts in github.
From what I see, it looks very much like the code I’ve already written to do my importing… lots of loops to get the users, the topic and finally the messages. Special code to deal with attachments (uploading them separately, getting the Discourse internal URL, appending that to the message body).
Are there any special API calls or anything else I’m missing in these scripts that might help me? The issue isn’t that I can’t write my own import script (using the API), my issue is that it seems clunky and I wonder if there is a smoother/more elegant solution. If there are any “tricks” (like special API calls?) in the sample scripts that I can borrow in another language, I’d love to understand.