class Mattermost::Post
Public Class Methods
new(attributes = {})
click to toggle source
# File lib/mattermost/post.rb, line 4 def self.new(attributes = {}) ::Post.new(attributes) end
search(terms)
click to toggle source
# File lib/mattermost/post.rb, line 8 def self.search(terms) request = Mattermost.post("/teams/#{Mattermost.team.id}/posts/search", :body => { :terms => terms }.to_json) response = [] request.parsed_response['posts'].each do |_, post| response << self.new(post) end response end