コード例 #1
0
        // TODO: Define ParcelInformation object
        public async Task <object> GetParcelStatus(ParcelDefinition parcelDefinition)
        {
            var barcode    = parcelDefinition.Barcode;
            var postalCode = parcelDefinition.PostalCode;
            var country    = parcelDefinition.DestinationCountry;
            var apiUrl     = $"{API_URL}/shipment?barcode={barcode}&country={country}&language=en&postalCode={postalCode}";

            var httpClient  = new HttpClient();
            var apiResponse = await httpClient.GetStringAsync(apiUrl);

            // TODO: Parse JSON into ParcelInformation object
            var parcelStatus = JObject.Parse(apiResponse);

            return(parcelStatus);
        }
コード例 #2
0
ファイル: DhlTracker.cs プロジェクト: nvanmeurs/ParcelTracker
 public Task <object> GetParcelStatus(ParcelDefinition parcelDefinition)
 {
     throw new NotImplementedException();
 }