Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #259 from aspriddell/update-data-api
Browse files Browse the repository at this point in the history
Update data api
  • Loading branch information
aspriddell authored Sep 10, 2021
2 parents 1c03718 + 0bfcf56 commit be78083
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 27 deletions.
28 changes: 4 additions & 24 deletions DragonFruit.Six.Api/Dragon6Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,18 @@

namespace DragonFruit.Six.Api
{
public abstract class Dragon6Client : ApiClient
public abstract class Dragon6Client : ApiClient<ApiJsonSerializer>
{
private readonly object _lock = new();
public static readonly CultureInfo Culture = new("en-US", false);

#region Constructors

protected Dragon6Client(string userAgent)
: this()
{
UserAgent = userAgent;
}

protected Dragon6Client(string userAgent, UbisoftService app)
: this(userAgent)
protected Dragon6Client(string userAgent = null, UbisoftService app = UbisoftService.RainbowSix)
{
AppId = app.AppId();
UserAgent = userAgent ?? "Dragon6-API";
Serializer.Configure<ApiJsonSerializer>(o => o.Serializer.Culture = Culture);
}

protected Dragon6Client()
{
Serializer = new ApiJsonSerializer(Culture);
AppId = UbisoftService.RainbowSix.AppId();

if (string.IsNullOrEmpty(UserAgent))
{
UserAgent = "Dragon6 API";
}
}

#endregion

private TokenBase Token { get; set; }

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion DragonFruit.Six.Api/DragonFruit.Six.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="DragonFruit.Common.Data" Version="2021.828.42" />
<PackageReference Include="DragonFruit.Common.Data" Version="2021.910.47" />
</ItemGroup>

</Project>
2 changes: 0 additions & 2 deletions DragonFruit.Six.Api/Utils/OperatorData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ public static class OperatorData
/// <summary>
/// Loads the operator info datasheet from a local file
/// </summary>
/// <param name="location"></param>
/// <returns></returns>
public static IEnumerable<OperatorStats> FromFile(string location)
{
return FileServices.ReadFile<IEnumerable<OperatorStats>>(location);
Expand Down

0 comments on commit be78083

Please sign in to comment.