Yes, in fact, there is! I linked to examples.
If that were true, you’d not have posted. ![]()
No, because the way to solve your problem is to use one of the dozens of examples that I linked to is the way to solve your problem. I promise it will be much, much easier. I wrote several import scripts before I really even learned ruby.
Even if you wanted to use the API, you still need to create the posts in the created_at order. There are ways to sort them in a plugin v(or maybe theme component?) , but you really don’t want to do that.
@JammyDodger points out that there is a rake task
rake posts:reorder_posts
That might solve your problem. If you are importing a few dozens of topics and a few hundreds of posts, you might give that a try.