public async Task <List <LogHeader> > Monitor(string gameName, string playerName) { if (String.IsNullOrEmpty(gameName)) { throw new ArgumentException("names can't be null or empty"); } string url = $"{HostName}/api/catan/monitor/{gameName}/{playerName}"; string json = await Get <string>(url); ServiceLogCollection serviceLogCollection = CatanProxy.Deserialize <ServiceLogCollection>(json); List <LogHeader> records = ParseLogRecords(serviceLogCollection); //Debug.WriteLine($"[Game={gameName}] [Player={playerName}] [LogCount={logList.Count}]"); return(records); }
public async Task <List <LogHeader> > GetAllLogs(string gameName, string playerName, int startAt) { if (String.IsNullOrEmpty(gameName)) { throw new Exception("names can't be null or empty"); } string url = $"{HostName}/api/catan/monitor/logs/{gameName}/{playerName}/{startAt}"; string json = await Get <string>(url); if (String.IsNullOrEmpty(json)) { return(null); } ServiceLogCollection serviceLogCollection = CatanProxy.Deserialize <ServiceLogCollection>(json); List <LogHeader> records = ParseLogRecords(serviceLogCollection); return(records); }