lib/discourse_api/api/topics.rb in discourse_api-0.1.2 vs lib/discourse_api/api/topics.rb in discourse_api-0.2.2
- old
+ new
@@ -1,18 +1,12 @@
module DiscourseApi
module API
module Topics
- def hot_topics(*args)
- response = get('/hot.json', args)
- response[:body]['topic_list']['topics']
+ def create_topic(params={})
+ post("/posts", params)
end
- def invite_user_to_topic(user_email, topic_id)
- params = { email: user_email, topic_id: topic_id }
- post "/t/#{topic_id}/invite.json", params
- end
-
def latest_topics(*args)
response = get('/latest.json', args)
response[:body]['topic_list']['topics']
end
@@ -30,6 +24,6 @@
response = get("/topics/created-by/#{username}.json", args)
response[:body]['topic_list']['topics']
end
end
end
-end
\ No newline at end of file
+end