Module: Mattermost::Endpoint::System
- Included in:
- Mattermost::Endpoint
- Defined in:
- lib/mattermost/endpoint/system.rb
Instance Method Summary collapse
- #add_log_message(level, message) ⇒ Object
- #get_analytics(team_id, name = 'standard') ⇒ Object
- #get_audits(max = 60) ⇒ Object
- #get_client_configuration ⇒ Object
- #get_client_license ⇒ Object
- #get_configuration ⇒ Object
- #get_logs(max = 60) ⇒ Object
- #get_webrtc_token ⇒ Object
- #invalidate_server_caches ⇒ Object
- #ping ⇒ Object
- #recycle_database_connections ⇒ Object
- #reload_configuration ⇒ Object
- #remove_license_file ⇒ Object
- #send_test_email ⇒ Object
- #update_configuration(config) ⇒ Object
- #upload_license_file(file_name) ⇒ Object
Instance Method Details
#add_log_message(level, message) ⇒ Object
60 61 62 63 64 65 |
# File 'lib/mattermost/endpoint/system.rb', line 60 def (level, ) post("/logs", :body => { :level => level, :message => }.to_json) end |
#get_analytics(team_id, name = 'standard') ⇒ Object
71 72 73 74 75 76 77 |
# File 'lib/mattermost/endpoint/system.rb', line 71 def get_analytics(team_id, name = 'standard') url = "/analytics/old?name=#{name}" if team_id != nil url = "#{url}&team_id=#{team_id}" end get(url) end |
#get_audits(max = 60) ⇒ Object
48 49 50 |
# File 'lib/mattermost/endpoint/system.rb', line 48 def get_audits(max = 60) get("/audits?per_page=#{max}") end |
#get_client_configuration ⇒ Object
31 32 33 |
# File 'lib/mattermost/endpoint/system.rb', line 31 def get_client_configuration get("/config/client?format=old") end |
#get_client_license ⇒ Object
44 45 46 |
# File 'lib/mattermost/endpoint/system.rb', line 44 def get_client_license get("/license/client?format=old") end |
#get_configuration ⇒ Object
19 20 21 |
# File 'lib/mattermost/endpoint/system.rb', line 19 def get_configuration get("/config") end |
#get_logs(max = 60) ⇒ Object
56 57 58 |
# File 'lib/mattermost/endpoint/system.rb', line 56 def get_logs(max = 60) get("/logs?per_page=#{max}") end |
#get_webrtc_token ⇒ Object
67 68 69 |
# File 'lib/mattermost/endpoint/system.rb', line 67 def get_webrtc_token get("/webrtc/token") end |
#invalidate_server_caches ⇒ Object
52 53 54 |
# File 'lib/mattermost/endpoint/system.rb', line 52 def invalidate_server_caches post("/caches/invalidate") end |
#ping ⇒ Object
7 8 9 |
# File 'lib/mattermost/endpoint/system.rb', line 7 def ping get("/system/ping") end |
#recycle_database_connections ⇒ Object
11 12 13 |
# File 'lib/mattermost/endpoint/system.rb', line 11 def recycle_database_connections post("/database/recycle") end |
#reload_configuration ⇒ Object
27 28 29 |
# File 'lib/mattermost/endpoint/system.rb', line 27 def reload_configuration post("/config/reload") end |
#remove_license_file ⇒ Object
40 41 42 |
# File 'lib/mattermost/endpoint/system.rb', line 40 def remove_license_file delete("/license") end |
#send_test_email ⇒ Object
15 16 17 |
# File 'lib/mattermost/endpoint/system.rb', line 15 def send_test_email post("/email/test") end |
#update_configuration(config) ⇒ Object
23 24 25 |
# File 'lib/mattermost/endpoint/system.rb', line 23 def update_configuration(config) put("/config", :body => config.to_json) end |
#upload_license_file(file_name) ⇒ Object
35 36 37 38 |
# File 'lib/mattermost/endpoint/system.rb', line 35 def upload_license_file(file_name) #post("/license", license) raise NotImplementedError end |