public async void Log(string action, string status) { var payload = new Api.Payload(); payload.Add("action", action); payload.Add("status", status); await Program.api.post( Url(@"clients/{0}/logs"), payload.Data() ); }
public async void Register() { var payload = new Api.Payload(); payload.Add("version", Program.version); payload.Add("os", os()); await Program.api.post( Url(@"clients/{0}"), payload.Data() ); }
public async void MatchedFile(string file, string pattern) { if (file.Trim().Length < 2 || pattern.Trim().Length < 2) { // do nothing, not a real file pattern combination return; } var f = new FileInfo(file); var payload = new Api.Payload(); payload.Add("file", file); payload.Add("pattern", pattern); payload.Add("file_created_at", f.CreationTime.ToString("yyyy-MM-dd HH:mm:ss.000")); payload.Add("file_modified_at", f.LastWriteTime.ToString("yyyy-MM-dd HH:mm:ss.000")); await Program.api.post( Url(@"clients/{0}/matches"), payload.Data() ); }