FrontierSharp is a .NET library that provides access to basic Character and Starmap Information for EVE Frontier. It includes an API client and a command-line tool for interacting with the EVE Frontier services via both official and third-party services.
- Access to character information,
- Access to starmap information,
- Command-line interface for easy interaction from the prompt.
You can install the FrontierSharp packages via NuGet:
dotnet add package FrontierSharp.WorldApiFrontierShip is Dependency Injection ready, so all you need to do to add it to an existing project is install the NuGet packages and configure the World API client, for example:
services.AddHttpClient();
services.AddFusionCache().AsHybridCache();
services.AddKeyedSingleton<IFrontierSharpHttpClient, FrontierSharpHttpClient>(nameof(WorldApiClient))
.Configure<FrontierSharpHttpClientOptions>(options => {
options.BaseUri = "https://blockchain-gateway-stillness.live.tech.evefrontier.com";
options.HttpClientName = nameof(WorldApiClient);
});
services.AddSingleton<IWorldApiClient, WorldApiClient>();FrontierSharp comes with a command-line tool that can be used to interact with the EVE Frontier services. The tool is available from the Releases page and is documented in the FrontierSharp.CommandLine README.md.
The project uses the standard .NET configuration system. You can configure the API client by adding the following
configuration to your appsettings.json file:
{
"FrontierSharp": {
"BaseUri": "https://api.frontierdevtools.com/",
"HttpClientName": "WorldApi",
"TribeMembersLimit": 25,
"TribeFuzzyWarningThreshold": 3
}
}You can then load this into the dependency injection provider with:
services.Configure<FrontierSharpHttpClientOptions>(Configuration.GetSection("FrontierSharp"));Here is a complete example of how to use the FrontierSharp API client in a .NET application:
var services = new ServiceCollection();
services.AddHttpClient();
services.AddFusionCache().AsHybridCache();
services.AddKeyedSingleton<IFrontierSharpHttpClient, FrontierSharpHttpClient>(nameof(WorldApiClient))
.Configure<FrontierSharpHttpClientOptions>(options => {
options.BaseUri = "https://blockchain-gateway-stillness.live.tech.evefrontier.com";
options.HttpClientName = nameof(WorldApiClient);
});
services.AddSingleton<IWorldApiClient, WorldApiClient>();
var provider = services.BuildServiceProvider();
var client = provider.GetRequiredService<IWorldApiClient>();
var result = await client.GetTribesPage();
if (result.IsFailed) {
Console.WriteLine("Failed with the following reasons:");
foreach (var reason in result.Reasons) {
Console.WriteLine($" - {reason.Message}");
}
return;
}
foreach (var member in result.Value.Data) {
Console.WriteLine($"{member.Id}: {member.Name} [{member.NameShort}]");
}You can easily integrate FrontierSharp into an ASP.NET Core application by adding the necessary services in the Startup.cs file, then consuming the IResult returned by the FrontierSharp:
[HttpGet]
public async Task<ActionResult<Tribe>> GetTribes() {
return await client.GetTribes().ToActionResult();
}Contributions are welcome! For bug reports, feature requests, or questions, please open an issue. For code contributions, please create a pull request.
Important
If you find a security issue with the solution, I would appreciate it if you followed a responsible disclosure process and contacted me directly or via the GitHub Security Reporting programme.
FrontierSharp is licensed under the MIT License. See the LICENSE file for more information.