module Mattermost::Endpoint::Compliance
Public Instance Methods
create_compliance_report()
click to toggle source
# File lib/mattermost/endpoint/compliance.rb, line 7 def create_compliance_report post("/compliance/reports") end
download_compliance_report(report_id, file_name)
click to toggle source
# File lib/mattermost/endpoint/compliance.rb, line 19 def download_compliance_report(report_id, file_name) File.open(file_name, "w") do |file| file.binmode get(download_compliance_report_url(report_id), stream_body: true) do |fragment| file.write(fragment) end end end
download_compliance_report_url(report_id)
click to toggle source
# File lib/mattermost/endpoint/compliance.rb, line 28 def download_compliance_report_url(report_id) "/compliance/reports/#{report_id}/download" end
get_compliance_report(report_id)
click to toggle source
# File lib/mattermost/endpoint/compliance.rb, line 15 def get_compliance_report(report_id) get("/compliance/reports/#{report_id}") end
get_compliance_reports(max = 60)
click to toggle source
# File lib/mattermost/endpoint/compliance.rb, line 11 def get_compliance_reports(max = 60) get("/compliance/reports?per_page=#{max}") end