Skip to content

h0useRus/EliteDangerousAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

Frontier Elite Dangerous API

NugetNuget (with prereleases)Nuget

GitHub top languageGitHubGitHub Release DateGitHub last commit

Intro

Simple event-based library which is provide easy way to get events from Elite: Dangerous log journal.

Usage

Use AddEliteDangerousAPI() method to add API into your app:

// Use Microsoft.Extensions.DependencyInjection
var serviceProvider = new ServiceCollection()
                .AddLogging(cfg => cfg.AddConsole())
                .Configure<LoggerFilterOptions>(cfg => cfg.MinLevel=LogLevel.Debug)
                .AddEliteDangerousAPI()
                .BuildServiceProvider();
// Get instance from DI                
var api = serviceProvider.GetService<IEliteDangerousAPI>()
// Subscribe to all events or find events which you interested for.
api.AllEvents += (s, e) => Console.WriteLine($"API event at {e.Event.Timestamp:O} {e.EventName} type {e.EventType.Name}");
// Run api (you could define autostart in ApiOptions)
api.Start()
Console.ReadLine();
// Stop processing if you want
api.Stop()

About

Multi-platform Elite : Dangerous API Library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages