Sha256: cb4c6c0b9e5164451d6eb2d1f4a39688af33d580907e99eb6d40972e1d92bae0
Contents?: true
Size: 560 Bytes
Versions: 1
Compression:
Stored size: 560 Bytes
Contents
module DiscourseApi module API module Posts def create_post(args) post("/posts", API.params(args) .required(:topic_id, :raw)) end def get_post(id, args = {}) response = get("/posts/#{id}.json", API.params(args) .optional(:version)) response[:body] end def wikify_post(id) put("/posts/#{id}/wiki", wiki: true) end def edit_post(id, raw) put("/posts/#{id}", post: {raw: raw}) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
discourse_api-0.3.6 | lib/discourse_api/api/posts.rb |