You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library contains some tools for working with Google's Distance Matrix API.
To find how long it will take to get from Paradise, CA to Chico, CA, you can call:
conststringendPoint="https://maps.googleapis.com/maps/api/distancematrix/json?sensor=false&origins=95969&destinations=95928";// The UnderscoreContractResolver is included in Devlord.Utilities.using(varclient=newApiCall(endPoint,newJsonSerializerSettings{ContractResolver=newUnderscoreContractResolver()})){varresult=client.Execute<DistanceResults>();varresultDuration=ParseDuration((string)result.DataItem.GetResult(0).Duration.Text);resultDuration.ShouldBeInRange(20,30);}