lib/discourse_api/api/topics.rb in discourse_api-0.44.0 vs lib/discourse_api/api/topics.rb in discourse_api-0.45.0
- old
+ new
@@ -76,8 +76,15 @@
url.push(post_ids.map { |id| "post_ids[]=#{id}" }.join('&'))
end
response = get(url.join)
response[:body]
end
+
+ def change_owner(topic_id, params = {})
+ params = API.params(params)
+ .required(:username, :post_ids)
+
+ post("/t/#{topic_id}/change-owner.json", params)
+ end
end
end
end