module Teamlab::CommunityForums
Methods for working with community forums
Public Instance Methods
add_post_to_topic(topic_id, subject, content, options = {})
click to toggle source
# File lib/teamlab/modules/community/community_forums.rb, line 34 def add_post_to_topic(topic_id, subject, content, options = {}) @request.post(['forum', 'topic', topic_id.to_s], { subject: subject, content: content }.merge(options)) end
add_thread_to_category(category_id, category_name, thread_name, description)
click to toggle source
# File lib/teamlab/modules/community/community_forums.rb, line 26 def add_thread_to_category(category_id, category_name, thread_name, description) @request.post(%w[forum], categoryId: category_id, categoryName: category_name.to_s, threadName: thread_name, threadDescription: description) end
add_topic_to_thread(thread_id, subject, content, options = {})
click to toggle source
# File lib/teamlab/modules/community/community_forums.rb, line 30 def add_topic_to_thread(thread_id, subject, content, options = {}) @request.post(['forum', thread_id], { subject: subject, content: content }.merge(options)) end
delete_category(category_id)
click to toggle source
@param category_id [Integer] category to delete @return [Teamlab::Response] result of delete
# File lib/teamlab/modules/community/community_forums.rb, line 66 def delete_category(category_id) @request.delete(['forum', 'category', category_id.to_s]) end
delete_forum_post(post_id)
click to toggle source
@param post_id [Integer] post to delete @return [Teamlab::Response] result of delete
# File lib/teamlab/modules/community/community_forums.rb, line 48 def delete_forum_post(post_id) @request.delete(['forum', 'post', post_id.to_s]) end
delete_forum_topic(topic_id)
click to toggle source
@param topic_id [Integer] topic to delete @return [Teamlab::Response] result of delete
# File lib/teamlab/modules/community/community_forums.rb, line 54 def delete_forum_topic(topic_id) @request.delete(['forum', 'topic', topic_id.to_s]) end
delete_thread(thread_id)
click to toggle source
@param thread_id [Integer] thread to delete @return [Teamlab::Response] result of delete
# File lib/teamlab/modules/community/community_forums.rb, line 60 def delete_thread(thread_id) @request.delete(['forum', 'thread', thread_id.to_s]) end
get_forums()
click to toggle source
# File lib/teamlab/modules/community/community_forums.rb, line 6 def get_forums @request.get(%w[forum]) end
get_last_updated_topics()
click to toggle source
# File lib/teamlab/modules/community/community_forums.rb, line 14 def get_last_updated_topics @request.get(%w[forum topic recent]) end
get_posts(topic_id)
click to toggle source
# File lib/teamlab/modules/community/community_forums.rb, line 18 def get_posts(topic_id) @request.get(['forum', 'topic', topic_id.to_s]) end
get_thread_topics(id)
click to toggle source
# File lib/teamlab/modules/community/community_forums.rb, line 10 def get_thread_topics(id) @request.get(['forum', id.to_s]) end
search_topics(query)
click to toggle source
# File lib/teamlab/modules/community/community_forums.rb, line 22 def search_topics(query) @request.get(['forum', '@search', query.to_s]) end
update_post_in_topic(topic_id, post_id, options = {})
click to toggle source
# File lib/teamlab/modules/community/community_forums.rb, line 42 def update_post_in_topic(topic_id, post_id, options = {}) @request.put(['forum', 'topic', topic_id.to_s, post_id.to_s], options) end
update_topic_in_thread(topic_id, subject, options = {})
click to toggle source
# File lib/teamlab/modules/community/community_forums.rb, line 38 def update_topic_in_thread(topic_id, subject, options = {}) @request.put(['forum', 'topic', topic_id.to_s], { subject: subject }.merge(options)) end