public Dictionary <string, string> getStarMapComments() { var client = new RestClient(baseUrl); var request = new RestRequest("api-logs-v1/get-comments"); request.AddParameter("apiKey", apiKey); request.AddParameter("commanderName", commanderName); var starMapCommentResponse = client.Execute <StarMapCommentResponse>(request); StarMapCommentResponse response = starMapCommentResponse.Data; Dictionary <string, string> vals = new Dictionary <string, string>(); if (response != null && response.comments != null) { foreach (StarMapResponseCommentEntry entry in response.comments) { if (entry.comment != null && entry.comment != "") { Logging.Debug("Comment found for " + entry.system); vals[entry.system] = entry.comment; } } } return(vals); }
public Dictionary <string, string> getStarMapComments() { if (!EdsmCredentialsSet()) { return(new Dictionary <string, string>()); } var request = new RestRequest("api-logs-v1/get-comments", Method.POST); request.AddParameter("apiKey", apiKey); request.AddParameter("commanderName", commanderName); var starMapCommentResponse = restClient.Execute <StarMapCommentResponse>(request); StarMapCommentResponse response = starMapCommentResponse.Data; Dictionary <string, string> vals = new Dictionary <string, string>(); if (response != null && response.comments != null) { foreach (StarMapResponseCommentEntry entry in response.comments) { if (!string.IsNullOrEmpty(entry.comment)) { Logging.Debug("Comment found for " + entry.system); vals[entry.system] = entry.comment; } } } return(vals); }