2018-10-08 10:50:39 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-12-13 13:52:41 -05:00
|
|
|
module Mattermost
|
2016-12-19 18:22:10 -05:00
|
|
|
class Command < Client
|
|
|
|
def create(params)
|
2018-05-15 11:13:49 -04:00
|
|
|
response = session_post('/api/v4/commands',
|
2016-12-19 17:53:19 -05:00
|
|
|
body: params.to_json)
|
2016-12-13 13:52:41 -05:00
|
|
|
|
2016-12-19 18:22:10 -05:00
|
|
|
response['token']
|
2016-12-13 13:52:41 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|