public RestResponse AddResult(int monitorId, long checktime, List <MonResult> results) { var parameters = new Dictionary <String, Object>(); parameters.Add("results", URLObject.ToUrlString(results)); parameters.Add("monitorId", monitorId); parameters.Add("checktime", checktime); return(MakePostRequest(MonitorAction.addResult, parameters)); }
public RestResponse EditMonitor(int monitorId, String name, String tag, List <MonitorParameter> monitorParams) { var parameters = new Dictionary <String, Object>(); if (monitorParams != null) { parameters.Add("monitorParams", URLObject.ToUrlString(monitorParams)); } parameters.Add("name", StringUtils.UrlEncode(name)); parameters.Add("monitorId", monitorId); parameters.Add("tag", StringUtils.UrlEncode(tag)); return(MakePostRequest(MonitorAction.editMonitor, parameters)); }
public RestResponse AddMonitor(int customUserAgentId, String name, String tag, String type, List <MonitorParameter> monitorParams, List <MonResultParameter> resultParams, List <MonResultParameter> additionalResultParams) { var parameters = new Dictionary <String, Object>(); if (monitorParams != null) { parameters.Add("monitorParams", URLObject.ToUrlString(monitorParams)); } parameters.Add("resultParams", URLObject.ToUrlString(resultParams)); if (additionalResultParams != null) { parameters.Add("additionalResultParams", URLObject.ToUrlString(additionalResultParams)); } parameters.Add("customUserAgentId", customUserAgentId); parameters.Add("name", StringUtils.UrlEncode(name)); parameters.Add("tag", StringUtils.UrlEncode(tag)); if (type != null) { parameters.Add("type", StringUtils.UrlEncode(type)); } return(MakePostRequest(MonitorAction.addMonitor, parameters)); }