Example #1
0
        public static void ProcessCodex(CodexEntry codexEntry)
        {
            if (Properties.Observatory.Default.SendToIGAU && codexEntry.VoucherAmount > 0)
            {
                JObject POST_content = JObject.FromObject(
                    new
                {
                    timestamp = codexEntry.Timestamp.ToString("yyyy-MM-ddTHH:mm:ssZ"),
                    codexEntry.EntryID,
                    codexEntry.Name,
                    Name_Localised = codexEntry.NameLocalised,
                    codexEntry.System,
                    codexEntry.SystemAddress
                });

                var request = new HttpRequestMessage
                {
                    Method     = HttpMethod.Post,
                    RequestUri = new Uri($"https://ddss70885k.execute-api.us-west-1.amazonaws.com/Prod"),
                    Content    = new StringContent(POST_content.ToString(Formatting.None))
                };

                QueueRequest(request);
            }
        }
Example #2
0
        public static void ProcessCodex(CodexEntry codexEntry)
        {
            if (Properties.Observatory.Default.SendToIGAU && codexEntry.VoucherAmount > 0)
            {
                JObject POST_content = JObject.FromObject(
                    new
                {
                    timestamp = codexEntry.Timestamp.ToString("yyyy-MM-ddTHH:mm:ssZ"),
                    EntryID   = codexEntry.EntryID.ToString(),
                    Name      = codexEntry.Name
                                .Replace("$", string.Empty)
                                .Replace(";", string.Empty)
                                .Replace("_Name", string.Empty)
                                .ToLower(),
                    Name_Localised = codexEntry.NameLocalised,
                    codexEntry.System,
                    SystemAddress = codexEntry.SystemAddress.ToString(),
                    App_Name      = "Elite_Observatory",
                    App_Version   = Application.ProductVersion
                });

                var request = new HttpRequestMessage
                {
                    Method     = HttpMethod.Post,
                    RequestUri = new Uri($"https://ddss70885k.execute-api.us-west-1.amazonaws.com/Prod"),
                    Content    = new StringContent(POST_content.ToString(Formatting.None))
                };

                QueueRequest(request);
            }
        }