module Mattermost::Endpoint::Webhooks

Public Instance Methods

create_incoming_webhook(incoming_webhook) click to toggle source
# File lib/mattermost/endpoint/webhooks.rb, line 7
def create_incoming_webhook(incoming_webhook)
        post("/hooks/incoming", :body => incoming_webhook.to_json)
end
create_outgoing_webhook(outgoing_webhook) click to toggle source
# File lib/mattermost/endpoint/webhooks.rb, line 27
def create_outgoing_webhook(outgoing_webhook)
        post("/hooks/outgoing", :body => outgoing_webhook.to_json)
end
delete_outgoing_webhook(hook_id) click to toggle source
# File lib/mattermost/endpoint/webhooks.rb, line 47
def delete_outgoing_webhook(hook_id)
        delete("/hooks/outgoing/#{hook_id}")
end
get_incoming_webhook(hook_id) click to toggle source
# File lib/mattermost/endpoint/webhooks.rb, line 19
def get_incoming_webhook(hook_id)
        get("/hooks/incoming/#{hook_id}")
end
get_outgoing_webhook(hook_id) click to toggle source
# File lib/mattermost/endpoint/webhooks.rb, line 43
def get_outgoing_webhook(hook_id)
        get("/hooks/outgoing/#{hook_id}")
end
list_incoming_webhooks(team_id, max = 60) click to toggle source
# File lib/mattermost/endpoint/webhooks.rb, line 11
def list_incoming_webhooks(team_id, max = 60)
        get("/hooks/incoming?per_page=#{max}&team_id=#{team_id}")
end
list_incoming_webhooks_for_system(max = 60) click to toggle source
# File lib/mattermost/endpoint/webhooks.rb, line 15
def list_incoming_webhooks_for_system(max = 60)
        get("/hooks/incoming?per_page=#{max}")
end
list_outgoing_webhooks(team_id, max = 60) click to toggle source
# File lib/mattermost/endpoint/webhooks.rb, line 31
def list_outgoing_webhooks(team_id, max = 60)
        get("/hooks/outgoing?per_page=#{max}&team_id=#{team_id}")
end
list_outgoing_webhooks_for_system(max = 60) click to toggle source
# File lib/mattermost/endpoint/webhooks.rb, line 39
def list_outgoing_webhooks_for_system(max = 60)
        get("/hooks/outgoing?per_page=#{max}")
end
regenerate_outgoing_webhook_token(hook_id) click to toggle source
# File lib/mattermost/endpoint/webhooks.rb, line 55
def regenerate_outgoing_webhook_token(hook_id)
        post("/hooks/outgoing/#{hook_id}/regen_token")
end
update_incoming_webhook(hook_id, incoming_webhook) click to toggle source
# File lib/mattermost/endpoint/webhooks.rb, line 23
def update_incoming_webhook(hook_id, incoming_webhook)
        put("/hooks/incoming/#{hook_id}", :body => incoming_webhook.to_json)
end
update_outgoing_webhook(hook_id, outgoing_webhook) click to toggle source
# File lib/mattermost/endpoint/webhooks.rb, line 51
def update_outgoing_webhook(hook_id, outgoing_webhook)
        put("/hooks/outgoing/#{hook_id}", outgoing_webhook.to_json)
end