Exemplo n.º 1
0
        static void RetrieveTracking(string tracking)
        {
            using WebClient wc = new WebClient();
            string url = "https://api.correoargentino.com.ar/backendappcorreo/api/api/shipping-tracking-int-nac?id_shipping=" + tracking;

            Console.WriteLine("Obteniendo informacion del tracking...");
            string json = wc.DownloadString(url);

            TrackingIntNac intNac = TrackingIntNac.FromJson(json);

            if (intNac.Rta == "OK")
            {
                PrintTracking(intNac);
            }
            else
            {
                WriteLineColor(ConsoleColor.Red, "Error: " + json);
            }
        }