This repository has been archived by the owner on Apr 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #307 from aspriddell/add-modern-operator-info
add modern operator info database models
- Loading branch information
Showing
6 changed files
with
90 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// Dragon6 API Copyright DragonFruit Network <inbox@dragonfruit.network> | ||
// Licensed under Apache-2. Refer to the LICENSE file for more info | ||
|
||
using System; | ||
using DragonFruit.Six.Api.Enums; | ||
using Newtonsoft.Json; | ||
|
||
namespace DragonFruit.Six.Api.Modern.Entities | ||
{ | ||
/// <summary> | ||
/// Represents a DragonFruit-maintained operator info database entry, compatible with the modern stats api | ||
/// </summary> | ||
[Serializable] | ||
public class ModernOperatorInfo | ||
{ | ||
/// <summary> | ||
/// Operator Identifier | ||
/// </summary> | ||
[JsonProperty("id")] | ||
public string OperatorId { get; set; } | ||
|
||
/// <summary> | ||
/// Operator name | ||
/// </summary> | ||
[JsonProperty("name")] | ||
public string Name { get; set; } | ||
|
||
/// <summary> | ||
/// Numeric value representing the relative release order of the operator | ||
/// </summary> | ||
[JsonProperty("ord")] | ||
public ushort Order { get; set; } | ||
|
||
/// <summary> | ||
/// Fully qualified operator icon url | ||
/// </summary> | ||
[JsonProperty("img")] | ||
public string ImageUrl { get; set; } | ||
|
||
/// <summary> | ||
/// The name of the organisation the operator is from | ||
/// </summary> | ||
[JsonProperty("org")] | ||
public string Organisation { get; set; } | ||
|
||
/// <summary> | ||
/// The subtitle, as seen underneath the operator's name in game | ||
/// </summary> | ||
[JsonProperty("sub")] | ||
public string Subtitle { get; set; } | ||
|
||
/// <summary> | ||
/// The operator's use, attacker/defender | ||
/// </summary> | ||
[JsonProperty("type")] | ||
public OperatorType Type { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
DragonFruit.Six.Api/Modern/Requests/ModernOperatorInfoRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Dragon6 API Copyright DragonFruit Network <inbox@dragonfruit.network> | ||
// Licensed under Apache-2. Refer to the LICENSE file for more info | ||
|
||
using DragonFruit.Data; | ||
|
||
namespace DragonFruit.Six.Api.Modern.Requests | ||
{ | ||
public class ModernOperatorInfoRequest : ApiRequest | ||
{ | ||
public override string Path => $"{Endpoints.AssetsEndpoint}/data/operators-v2.json"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters