Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added basic Spansh support #265

Merged
merged 25 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9c6c9d0
Bumped version to 3.1.0-alpha82
github-actions[bot] Jul 13, 2023
393f25d
Merge branch 'main' into dev
Somfic Aug 7, 2023
2c3eb58
Seperated release and publish in CI
Somfic Aug 7, 2023
af81caf
Bumped version to 3.1.0-alpha154
github-actions[bot] Aug 7, 2023
9bf6f0d
Added property schema tests
Somfic Aug 7, 2023
776e391
Renamed CarrierNameChanged to CarrierNameChange
Somfic Aug 7, 2023
c617a00
Renamed BuyMicroResource to BuyMicroResources
Somfic Aug 7, 2023
a7bcce9
Updated several events to be up-to-date
Somfic Aug 7, 2023
af061aa
Improved test suite
Somfic Aug 7, 2023
7c88084
Removed unused project
Somfic Aug 7, 2023
099863b
Bumped version to 3.1.0-alpha161
github-actions[bot] Aug 7, 2023
154d8eb
Added EliteAPI.Web project
Somfic Aug 9, 2023
ae5f64d
Added EliteAPI.Web.Spansh project
Somfic Aug 9, 2023
61ab3b5
Added web example
Somfic Aug 9, 2023
3b888cb
Updated web example
Somfic Aug 9, 2023
06da8bb
Bumped version to 3.1.0-alpha166
github-actions[bot] Aug 9, 2023
5f55cd5
Set IsPackable for Example.Web project to false
Somfic Aug 9, 2023
8630d1c
Merge branch 'dev' of https://github.com/Somfic/EliteAPI into dev
Somfic Aug 9, 2023
09e608e
Bumped version to 3.1.0-alpha169
github-actions[bot] Aug 9, 2023
c5b1d2c
Added Spansh trade tool
Somfic Aug 10, 2023
da65114
Added Qodana to CI/CD
Somfic Aug 10, 2023
f3bb71f
Bumped version to 3.1.0-alpha172
github-actions[bot] Aug 10, 2023
0bb663a
Merge branch 'main' into dev
Somfic Aug 10, 2023
0fd6d5a
Added EliteAPI reference to example project
Somfic Aug 10, 2023
904fcbe
Bumped version to 3.1.0-alpha182
github-actions[bot] Aug 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/qodana_code_quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Qodana
on:
workflow_dispatch:
pull_request:
push:
branches:
- dev
- main

jobs:
qodana:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 'Qodana Scan'
uses: JetBrains/[email protected]
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
8 changes: 4 additions & 4 deletions EliteAPI.Abstractions/EliteAPI.Abstractions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<LangVersion>10</LangVersion>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<FileVersion>3.0.0.0</FileVersion>
<InformationalVersion>3.0.15+13.Branch.main.Sha.aa3bd21915f470956d90f87a2d089e6d67be09ae</InformationalVersion>
<InformationalVersion>3.1.0-alpha.182+Branch.dev.Sha.0fd6d5a6f5a17cbe313c176d121f8bf359e348de</InformationalVersion>
<Version>3.0.0-alpha5155</Version>
<AssemblyVersion>3.0.15.0</AssemblyVersion>
<FileVersion>3.0.15.0</FileVersion>
<AssemblyVersion>3.1.0.0</AssemblyVersion>
<FileVersion>3.1.0.0</FileVersion>
<PackageProjectUrl>https://github.com/EliteAPI/EliteAPI</PackageProjectUrl>
<RepositoryUrl>https://github.com/EliteAPI/EliteAPI</RepositoryUrl>
<PackageIconUrl />
Expand All @@ -18,7 +18,7 @@
<Description>Abstractions for EliteAPI</Description>
<Copyright>© Somfic 2022</Copyright>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Version>3.0.15</Version>
<Version>3.1.0-alpha0182</Version>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<PackageIcon>icon.png</PackageIcon>
<IsWindows Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true</IsWindows>
Expand Down
2 changes: 1 addition & 1 deletion EliteAPI.Abstractions/Events/IEvents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public interface IEvents
IReadOnlyCollection<(IEvent @event, EventContext context)> Backlog { get; }

/// <summary>All event types that have been registered.</summary>
IEnumerable<Type> EventTypes { get; }
IReadOnlyCollection<Type> EventTypes { get; }

/// <summary>A collection of previous events since the API was started.</summary>
IReadOnlyCollection<(IEvent @event, EventContext context)> PreviousEvents { get; }
Expand Down
10 changes: 6 additions & 4 deletions EliteAPI.Events/Carriers/CarrierBankTransferEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ namespace EliteAPI.Events;

public struct CarrierBankTransferEvent : IEvent
{
[JsonProperty("timestamp")]
public DateTime Timestamp { get; init; }

[JsonProperty("event")]
public string Event { get; init; }

[JsonProperty("CarrierID")]
public string CarrierId { get; init; }

Expand All @@ -19,8 +25,4 @@ public struct CarrierBankTransferEvent : IEvent

[JsonProperty("CarrierBalance")]
public long CarrierBalance { get; init; }

public DateTime Timestamp { get; }

public string Event { get; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace EliteAPI.Events;

public readonly struct CarrierNameChangedEvent : IEvent
public readonly struct CarrierNameChangeEvent : IEvent
{
[JsonProperty("timestamp")]
public DateTime Timestamp { get; init; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ namespace EliteAPI.Events;
public string BodyId { get; init; }

[JsonProperty("OnStation")]
public bool OnStation { get; init; }
public bool IsOnStation { get; init; }

[JsonProperty("OnPlanet")]
public bool OnPlanet { get; init; }
public bool IsOnPlanet { get; init; }
}
8 changes: 4 additions & 4 deletions EliteAPI.Events/EliteAPI.Events.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>10</LangVersion>
<AssemblyVersion>3.0.15.0</AssemblyVersion>
<FileVersion>3.0.15.0</FileVersion>
<InformationalVersion>3.0.15+13.Branch.main.Sha.aa3bd21915f470956d90f87a2d089e6d67be09ae</InformationalVersion>
<AssemblyVersion>3.1.0.0</AssemblyVersion>
<FileVersion>3.1.0.0</FileVersion>
<InformationalVersion>3.1.0-alpha.182+Branch.dev.Sha.0fd6d5a6f5a17cbe313c176d121f8bf359e348de</InformationalVersion>
<Version>3.0.0-alpha5167</Version>
<IsPackable>true</IsPackable>
<PackageProjectUrl>https://github.com/EliteAPI/EliteAPI</PackageProjectUrl>
Expand All @@ -17,7 +17,7 @@
<Description>Events for EliteAPI</Description>
<Copyright>© Somfic 2022</Copyright>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Version>3.0.15</Version>
<Version>3.1.0-alpha0182</Version>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<PackageIcon>icon.png</PackageIcon>
<TargetFramework>netstandard2.0</TargetFramework>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace EliteAPI.Events;

public readonly struct BuyMicroResourceEvent : IEvent
public readonly struct BuyMicroResourcesEvent : IEvent
{
[JsonProperty("timestamp")]
public DateTime Timestamp { get; init; }
Expand Down
13 changes: 13 additions & 0 deletions EliteAPI.Events/Station/ResupplyEvent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using EliteAPI.Abstractions.Events;
using Newtonsoft.Json;

namespace EliteAPI.Events;

public readonly struct ResupplyEvent : IEvent
{
[JsonProperty("timestamp")]
public DateTime Timestamp { get; init; }

[JsonProperty("event")]
public string Event { get; init; }
}
4 changes: 2 additions & 2 deletions EliteAPI.Events/Status/Ship/Events/AltitudeStatusEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace EliteAPI.Events.Status.Ship.Events;

public readonly struct AltitudeStatusEvent : IStatusEvent<float>
public readonly struct AltitudeStatusEvent : IStatusEvent<double>
{
public DateTime Timestamp => DateTime.Now;

public string Event => "Altitude";

public float Value { get; init; }
public double Value { get; init; }
}
4 changes: 2 additions & 2 deletions EliteAPI.Events/Status/Ship/Events/BodyRadiusStatusEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace EliteAPI.Events.Status.Ship.Events;

public readonly struct BodyRadiusStatusEvent : IStatusEvent<float>
public readonly struct BodyRadiusStatusEvent : IStatusEvent<double>
{
public DateTime Timestamp => DateTime.Now;

public string Event => "BodyRadius";

public float Value { get; init; }
public double Value { get; init; }
}
4 changes: 2 additions & 2 deletions EliteAPI.Events/Status/Ship/Events/GravityStatusEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace EliteAPI.Events.Status.Ship.Events;

public readonly struct GravityStatusEvent : IStatusEvent<float>
public readonly struct GravityStatusEvent : IStatusEvent<double>
{
public DateTime Timestamp => DateTime.Now;

public string Event => "Gravity";

public float Value { get; init; }
public double Value { get; init; }
}
4 changes: 2 additions & 2 deletions EliteAPI.Events/Status/Ship/Events/HeadingStatusEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace EliteAPI.Events.Status.Ship.Events;

public readonly struct HeadingStatusEvent : IStatusEvent<float>
public readonly struct HeadingStatusEvent : IStatusEvent<double>
{
public DateTime Timestamp => DateTime.Now;

public string Event => "Heading";

public float Value { get; init; }
public double Value { get; init; }
}
4 changes: 2 additions & 2 deletions EliteAPI.Events/Status/Ship/Events/HealthStatusEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace EliteAPI.Events.Status.Ship.Events;

public readonly struct HealthStatusEvent : IStatusEvent<float>
public readonly struct HealthStatusEvent : IStatusEvent<double>
{
public DateTime Timestamp => DateTime.Now;

public string Event => "Health";

public float Value { get; init; }
public double Value { get; init; }
}
4 changes: 2 additions & 2 deletions EliteAPI.Events/Status/Ship/Events/LatitudeStatusEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace EliteAPI.Events.Status.Ship.Events;

public readonly struct LatitudeStatusEvent : IStatusEvent<float>
public readonly struct LatitudeStatusEvent : IStatusEvent<double>
{
public DateTime Timestamp => DateTime.Now;

public string Event => "Latitude";

public float Value { get; init; }
public double Value { get; init; }
}
4 changes: 2 additions & 2 deletions EliteAPI.Events/Status/Ship/Events/LongitudeStatusEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace EliteAPI.Events.Status.Ship.Events;

public readonly struct LongitudeStatusEvent : IStatusEvent<float>
public readonly struct LongitudeStatusEvent : IStatusEvent<double>
{
public DateTime Timestamp => DateTime.Now;

public string Event => "Longitude";

public float Value { get; init; }
public double Value { get; init; }
}
4 changes: 2 additions & 2 deletions EliteAPI.Events/Status/Ship/Events/OxygenStatusEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace EliteAPI.Events.Status.Ship.Events;

public readonly struct OxygenStatusEvent : IStatusEvent<float>
public readonly struct OxygenStatusEvent : IStatusEvent<double>
{
public DateTime Timestamp => DateTime.Now;

public string Event => "Oxygen";

public float Value { get; init; }
public double Value { get; init; }
}
4 changes: 2 additions & 2 deletions EliteAPI.Events/Status/Ship/Events/TemperatureStatusEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace EliteAPI.Events.Status.Ship.Events;

public readonly struct TemperatureStatusEvent : IStatusEvent<float>
public readonly struct TemperatureStatusEvent : IStatusEvent<double>
{
public DateTime Timestamp => DateTime.Now;

public string Event => "Temperature";

public float Value { get; init; }
public double Value { get; init; }
}
18 changes: 9 additions & 9 deletions EliteAPI.Events/Status/Ship/StatusEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,34 +100,34 @@ namespace EliteAPI.Events.Status.Ship;
public ShipDestination Destination { get; init; }

[JsonProperty("PlanetRadius")]
public float BodyRadius { get; init; }
public double BodyRadius { get; init; }

[JsonProperty("Oxygen")]
public float Oxygen { get; init; }
public double Oxygen { get; init; }

[JsonProperty("Health")]
public float Health { get; init; }
public double Health { get; init; }

[JsonProperty("Temperature")]
public float Temperature { get; init; }
public double Temperature { get; init; }

[JsonProperty("SelectedWeapon")]
public Localised SelectedWeapon { get; init; }

[JsonProperty("Gravity")]
public float Gravity { get; init; }
public double Gravity { get; init; }

[JsonProperty("Latitude")]
public float Latitude { get; init; }
public double Latitude { get; init; }

[JsonProperty("Longitude")]
public float Longitude { get; init; }
public double Longitude { get; init; }

[JsonProperty("Heading")]
public float Heading { get; init; }
public double Heading { get; init; }

[JsonProperty("Altitude")]
public long Altitude { get; init; }
public double Altitude { get; init; }

[JsonProperty("BodyName")]
public string Body { get; init; }
Expand Down
Loading