Skip to content

csharp library for accessing MARTA real-time API πŸš‹ 🚌

License

Notifications You must be signed in to change notification settings

Justbeingjustin/marta-csharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

marta-csharp

This repository was inspired by marta-python. The Metropolitan Atlanta Rapid Transit Authority (MARTA) is the principal public transport operator in the Atlanta metropolitan area. MARTA operates a network of bus routes linked to a rapid transit system consisting of 48 miles of rail track with 38 train stations. It is the eighth-largest rapid transit system in the United States by ridership. This library will get real-time data for the trains and buses.

Table of Contents

Available For
Nuget
Usage
Trains
Buses
Contributing

Available For

  • .NET Standard 2.0
  • .NET 4.6.1
  • .NET 4.5

Nuget

   PM> Install-Package marta-csharp

Usage

Obtain an API Key here.

Trains

using Marta.Services;

namespace ConsoleApp1
{
    public class Program
    {
        public static void Main(string[] args)
        {
            var apiKey = "API_KEY";
            ITrainRepository trainRepository = new TrainRepository(apiKey);
            var trains = trainRepository.GetTrains();
        }
    }
}

Buses

using Marta.Services;

namespace ConsoleApp1
{
    public class Program
    {
        public static void Main(string[] args)
        {
            var apiKey = "API_KEY";
            IBusRepository busRepository = new BusRepository(apiKey);
            var buses = busRepository.GetBuses();
            var route3Buses = busRepository.GetBusesByRoute(3);
        }
    }
}

Contributing

Pull requests are welcome.

For large changes, please open an issue first to discuss what you would like to add.

About

csharp library for accessing MARTA real-time API πŸš‹ 🚌

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages