public void sendStarMapComment(string systemName, string comment)
        {
            var client  = new RestClient(baseUrl);
            var request = new RestRequest("api-logs-v1/set-comment");

            request.AddParameter("apiKey", apiKey);
            request.AddParameter("commanderName", commanderName);
            request.AddParameter("systemName", systemName);
            request.AddParameter("comment", comment);

            var clientResponse          = client.Execute <StarMapLogResponse>(request);
            StarMapLogResponse response = clientResponse.Data;
            // TODO check response
        }
        public Dictionary <string, StarMapLogInfo> getStarMapLog(DateTime?since = null)
        {
            var client  = new RestClient(baseUrl);
            var request = new RestRequest("api-logs-v1/get-logs");

            request.AddParameter("apiKey", apiKey);
            request.AddParameter("commanderName", commanderName);
            if (since.HasValue)
            {
                request.AddParameter("startdatetime", since.Value.ToString("yyyy-MM-dd HH:mm:ss"));
            }
            var starMapLogResponse      = client.Execute <StarMapLogResponse>(request);
            StarMapLogResponse response = starMapLogResponse.Data;

            Dictionary <string, StarMapLogInfo> vals = new Dictionary <string, StarMapLogInfo>();

            if (response != null)
            {
                foreach (StarMapResponseLogEntry entry in response.logs)
                {
                    Console.WriteLine("Entry found for " + entry.system);
                    if (vals.ContainsKey(entry.system))
                    {
                        vals[entry.system].visits = vals[entry.system].visits + 1;
                        if (entry.date > vals[entry.system].lastVisit)
                        {
                            vals[entry.system].previousVisit = vals[entry.system].lastVisit;
                            vals[entry.system].lastVisit     = entry.date;
                        }
                        else if (vals[entry.system].previousVisit == null || entry.date > vals[entry.system].previousVisit)
                        {
                            vals[entry.system].previousVisit = entry.date;
                        }
                    }
                    else
                    {
                        vals[entry.system]           = new StarMapLogInfo();
                        vals[entry.system].system    = entry.system;
                        vals[entry.system].visits    = 1;
                        vals[entry.system].lastVisit = entry.date;
                    }
                }
            }
            return(vals);
        }