module Mattermost::Endpoint::Commands

Public Instance Methods

create_command(command) click to toggle source
# File lib/mattermost/endpoint/commands.rb, line 7
def create_command(command)
        post("/commands", :body => command.to_json)
end
delete_command(command_id) click to toggle source
# File lib/mattermost/endpoint/commands.rb, line 23
def delete_command(command_id)
        delete("/commands/#{command_id}")
end
execute_command(channel_id, command) click to toggle source
# File lib/mattermost/endpoint/commands.rb, line 31
def execute_command(channel_id, command)
        post("/commands/execute", :body => {
                :channel_id => channel_id,
                :command => command
        }.to_json)
end
list_autocomplete_commands(team_id) click to toggle source
# File lib/mattermost/endpoint/commands.rb, line 15
def list_autocomplete_commands(team_id)
        get("/teams/#{team_id}/commands/autocomplete")
end
list_commands(team_id, custom_only = false) click to toggle source
# File lib/mattermost/endpoint/commands.rb, line 11
def list_commands(team_id, custom_only = false)
        get("/commands?team_id=#{team_id}&custom_only#{custom_only}")
end
regenerate_command_token(command_id) click to toggle source
# File lib/mattermost/endpoint/commands.rb, line 27
def regenerate_command_token(command_id)
        put("/commands/#{command_id}/regen_token")
end
update_command(command_id, command) click to toggle source
# File lib/mattermost/endpoint/commands.rb, line 19
def update_command(command_id, command)
        put("/commands/#{command_id}", :body => command.to_json)
end