This is a .NET library to interact with the MARTA API for getting transit arrival information in Atlanta.
A .NET library to interact with the MARTA API
MartaApiClient client = new MartaApiClient(new ClientSettings("http://developer.itsmarta.com", "fake-api-key"));
IList<TrainArrival> arrivals = await client.GetRealTimeTrainArrivalsAsync();
string myStation = "SANDY SPRINGS STATION";
var stationArrivals = arrivals.Where(arrival => myStation.Equals(arrival.Station, StringComparison.InvariantCultureIgnoreCase));
string nextArrival = stationArrivals.FirstOrDefault()?.WaitingTime ?? "unknown";
Console.WriteLine($"{myStation} {nextArrival}"); //SANDY SPRINGS STATION 9 min
This library is built using .NET Core. To build:
dotnet build
To run the tests:
dotnet test
We are committed to fostering an open and welcoming environment. Please read our code of conduct before participating in or contributing to this project.
We welcome contributions and collaboration on this project. Please read our contributor's guide to understand how best to work with us.
This software is made available by GMV Syncromatics Engineering under the MIT license.