lib/discourse_api/api/posts.rb in discourse_api-0.3.6 vs lib/discourse_api/api/posts.rb in discourse_api-0.4.0

- old
+ new

@@ -1,15 +1,17 @@ module DiscourseApi module API module Posts def create_post(args) - post("/posts", API.params(args) - .required(:topic_id, :raw)) + args = API.params(args) + .required(:topic_id, :raw) + post("/posts", args) end def get_post(id, args = {}) - response = get("/posts/#{id}.json", API.params(args) - .optional(:version)) + args = API.params(args) + .optional(:version) + response = get("/posts/#{id}.json", args) response[:body] end def wikify_post(id) put("/posts/#{id}/wiki", wiki: true)