Simple library for INARA integration based on documentation.
Use AddEliteDangerousINARA()
method to add API into your app:
// Use Microsoft.Extensions.DependencyInjection
var inara = new ServiceCollection()
.AddLogging(cfg => cfg.AddDebug())
.Configure<LoggerFilterOptions>(cfg => cfg.MinLevel = LogLevel.Warning)
.AddEliteDangerousINARA(o =>
{
o.ApiKey = "your_apikey_from_inara";
o.ApplicationName = "your_application_name";
o.ApplicationVersion = "1.2.3";
o.IsDevelopment = true; // set this while you debugging
})
.BuildServiceProvider()
.GetService<IEliteDangerousINARA>();
or with known Commander
// Use Microsoft.Extensions.DependencyInjection
var inara = new ServiceCollection()
.AddLogging(cfg => cfg.AddDebug())
.Configure<LoggerFilterOptions>(cfg => cfg.MinLevel = LogLevel.Warning)
.AddEliteDangerousINARA(o =>
{
o.ApiKey = "your_apikey_from_inara";
o.ApplicationName = "your_application_name";
o.ApplicationVersion = "1.2.3";
o.Commander = "Your Commander";
o.FrontierId = "F1234567"; // this optional
})
.BuildServiceProvider()
.GetService<IEliteDangerousINARA>();