mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-21 02:17:20 +02:00
feat: reorganized achevements queries and added client achievements request
This commit is contained in:
1 parent
8da5bdbfa8
commit
11b8b15a2a
37 files changed
+1940
-781
No files matched your search
@@ -13,6 +13,8 @@ namespace WotBlitzStatisticsPro.Blazor.Tests.Services
|
|||||||
{
|
{
|
||||||
public class GraphQlBackendServiceTests
|
public class GraphQlBackendServiceTests
|
||||||
{
|
{
|
||||||
|
private const long CurrentAccountId = 123456789;
|
||||||
|
|
||||||
private Mock<IFindClansQuery> _findClanQueryMock;
|
private Mock<IFindClansQuery> _findClanQueryMock;
|
||||||
private Mock<IFindPlayersQuery> _findPlayersQueryMock;
|
private Mock<IFindPlayersQuery> _findPlayersQueryMock;
|
||||||
private Mock<IPlayerQuery> _playerQueryMock;
|
private Mock<IPlayerQuery> _playerQueryMock;
|
||||||
@@ -30,6 +32,11 @@ namespace WotBlitzStatisticsPro.Blazor.Tests.Services
|
|||||||
private List<IClientError> _findClansErrors;
|
private List<IClientError> _findClansErrors;
|
||||||
private Mock<IOperationResult<IFindClansResult>> _findClansOperationResultMock;
|
private Mock<IOperationResult<IFindClansResult>> _findClansOperationResultMock;
|
||||||
|
|
||||||
|
private Mock<IPlayerResult> _playerInfoResultMock;
|
||||||
|
private List<IClientError> _playerInfoErrors;
|
||||||
|
private Mock<IOperationResult<IPlayerResult>> _playerInfoOperationResultMock;
|
||||||
|
|
||||||
|
|
||||||
[SetUp]
|
[SetUp]
|
||||||
public async Task Init()
|
public async Task Init()
|
||||||
{
|
{
|
||||||
@@ -39,6 +46,7 @@ namespace WotBlitzStatisticsPro.Blazor.Tests.Services
|
|||||||
|
|
||||||
await SetUpFindClans();
|
await SetUpFindClans();
|
||||||
await SetUpFindPlayers();
|
await SetUpFindPlayers();
|
||||||
|
await SetUpGetPlayer();
|
||||||
|
|
||||||
_generatedClient =
|
_generatedClient =
|
||||||
new WotBlitzStatisticsProClient(_findClanQueryMock.Object, _findPlayersQueryMock.Object, _playerQueryMock.Object);
|
new WotBlitzStatisticsProClient(_findClanQueryMock.Object, _findPlayersQueryMock.Object, _playerQueryMock.Object);
|
||||||
@@ -110,6 +118,39 @@ namespace WotBlitzStatisticsPro.Blazor.Tests.Services
|
|||||||
_notificationServiceMock.Verify(n => n.ReportError(It.IsAny<string>(), It.IsAny<string>()), Times.Once);
|
_notificationServiceMock.Verify(n => n.ReportError(It.IsAny<string>(), It.IsAny<string>()), Times.Once);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task ShouldCallGetPlayerInfo()
|
||||||
|
{
|
||||||
|
var expectedRealm = RealmType.Ru;
|
||||||
|
_playerInfoOperationResultMock.SetupGet(r => r.Data).Returns(_playerInfoResultMock.Object);
|
||||||
|
|
||||||
|
var playerInfoResponse = await _service.GetPlayerInfo(CurrentAccountId, expectedRealm);
|
||||||
|
|
||||||
|
playerInfoResponse.Should().NotBeNull();
|
||||||
|
playerInfoResponse.accountInfo.Should().NotBeNull();
|
||||||
|
playerInfoResponse.achievementsBySection.Should().NotBeNull();
|
||||||
|
playerInfoResponse.achievementsBySection.Should().NotBeEmpty();
|
||||||
|
|
||||||
|
_playerQueryMock.Verify(q => q.ExecuteAsync(CurrentAccountId, expectedRealm, It.IsAny<RequestLanguage>(), It.IsAny<CancellationToken>()), Times.Once);
|
||||||
|
_notificationServiceMock.Verify(n => n.ReportError(It.IsAny<string>(), It.IsAny<string>()), Times.Never);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task ShouldNotifyAboutErrorIfGetPlayerInfoFails()
|
||||||
|
{
|
||||||
|
var expectedRealm = RealmType.Ru;
|
||||||
|
|
||||||
|
AddErrorToResult();
|
||||||
|
|
||||||
|
var playerInfoResponse = await _service.GetPlayerInfo(CurrentAccountId, expectedRealm);
|
||||||
|
|
||||||
|
playerInfoResponse.accountInfo.Should().BeNull();
|
||||||
|
playerInfoResponse.achievementsBySection.Should().BeNull();
|
||||||
|
|
||||||
|
_playerQueryMock.Verify(q => q.ExecuteAsync(CurrentAccountId, expectedRealm, It.IsAny<RequestLanguage>(), It.IsAny<CancellationToken>()), Times.Once);
|
||||||
|
_notificationServiceMock.Verify(n => n.ReportError(It.IsAny<string>(), It.IsAny<string>()), Times.Once);
|
||||||
|
}
|
||||||
|
|
||||||
private async Task SetUpFindPlayers()
|
private async Task SetUpFindPlayers()
|
||||||
{
|
{
|
||||||
var players = await _mockDataService.FindPlayers("foo", RealmType.Ru);
|
var players = await _mockDataService.FindPlayers("foo", RealmType.Ru);
|
||||||
@@ -146,6 +187,25 @@ namespace WotBlitzStatisticsPro.Blazor.Tests.Services
|
|||||||
.ReturnsAsync(_findClansOperationResultMock.Object);
|
.ReturnsAsync(_findClansOperationResultMock.Object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async Task SetUpGetPlayer()
|
||||||
|
{
|
||||||
|
var result = await _mockDataService.GetPlayerInfo(CurrentAccountId, RealmType.Ru);
|
||||||
|
|
||||||
|
_playerInfoErrors = new List<IClientError>();
|
||||||
|
_playerInfoResultMock = new();
|
||||||
|
_playerInfoOperationResultMock = new();
|
||||||
|
_playerInfoResultMock.SetupGet(r => r.AccountInfo).Returns(result.accountInfo);
|
||||||
|
_playerInfoResultMock.SetupGet(r => r.AccountMedals).Returns(new Player_AccountMedals_AccountAchievementsResponse(CurrentAccountId, result.achievementsBySection));
|
||||||
|
_playerInfoOperationResultMock.SetupGet(r => r.Errors).Returns(_findClansErrors);
|
||||||
|
|
||||||
|
_playerQueryMock.Setup(q => q.ExecuteAsync(
|
||||||
|
It.IsAny<long>(),
|
||||||
|
It.IsAny<RealmType>(),
|
||||||
|
It.IsAny<RequestLanguage>(),
|
||||||
|
It.IsAny<CancellationToken>()))
|
||||||
|
.ReturnsAsync(_playerInfoOperationResultMock.Object);
|
||||||
|
}
|
||||||
|
|
||||||
private void AddErrorToResult()
|
private void AddErrorToResult()
|
||||||
{
|
{
|
||||||
string graphQlErrorMessage = "{\"errors\": [{\"extensions\": {\"message\": \"GraphQL error message here\"}}]}";
|
string graphQlErrorMessage = "{\"errors\": [{\"extensions\": {\"message\": \"GraphQL error message here\"}}]}";
|
||||||
@@ -154,6 +214,7 @@ namespace WotBlitzStatisticsPro.Blazor.Tests.Services
|
|||||||
error.SetupGet(e => e.Extensions).Returns(errorDetails);
|
error.SetupGet(e => e.Extensions).Returns(errorDetails);
|
||||||
_findPlayersErrors.Add(error.Object);
|
_findPlayersErrors.Add(error.Object);
|
||||||
_findClansErrors.Add(error.Object);
|
_findClansErrors.Add(error.Object);
|
||||||
|
_playerInfoErrors.Add(error.Object);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
@@ -32,6 +32,7 @@ namespace Microsoft.Extensions.DependencyInjection
|
|||||||
var clientFactory = global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::System.Net.Http.IHttpClientFactory>(parentServices);
|
var clientFactory = global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::System.Net.Http.IHttpClientFactory>(parentServices);
|
||||||
return new global::StrawberryShake.Transport.Http.HttpConnection(() => clientFactory.CreateClient("WotBlitzStatisticsProClient"));
|
return new global::StrawberryShake.Transport.Http.HttpConnection(() => clientFactory.CreateClient("WotBlitzStatisticsProClient"));
|
||||||
});
|
});
|
||||||
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IEntityMapper<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementEntity, global::WotBlitzStatisticsPro.Blazor.GraphQl.Player_AccountMedals_Sections_Medals_Achievement>, global::WotBlitzStatisticsPro.Blazor.GraphQl.State.Player_AccountMedals_Sections_Medals_AchievementFromAchievementEntityMapper>(services);
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.Serialization.ISerializer, global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmTypeSerializer>(services);
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.Serialization.ISerializer, global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmTypeSerializer>(services);
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.Serialization.ISerializer, global::WotBlitzStatisticsPro.Blazor.GraphQl.RequestLanguageSerializer>(services);
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.Serialization.ISerializer, global::WotBlitzStatisticsPro.Blazor.GraphQl.RequestLanguageSerializer>(services);
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.Serialization.ISerializer, global::WotBlitzStatisticsPro.Blazor.GraphQl.MarkOfMasterySerializer>(services);
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.Serialization.ISerializer, global::WotBlitzStatisticsPro.Blazor.GraphQl.MarkOfMasterySerializer>(services);
|
||||||
|
|||||||
+27
@@ -99,6 +99,33 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
|||||||
/// normalImage
|
/// normalImage
|
||||||
/// }
|
/// }
|
||||||
/// }
|
/// }
|
||||||
|
/// accountMedals(accountId: $accountId, realmType: $realmType, requestLanguage: $requestLanguage) {
|
||||||
|
/// __typename
|
||||||
|
/// accountId
|
||||||
|
/// sections {
|
||||||
|
/// __typename
|
||||||
|
/// sectionId
|
||||||
|
/// order
|
||||||
|
/// name
|
||||||
|
/// medals {
|
||||||
|
/// __typename
|
||||||
|
/// id
|
||||||
|
/// name
|
||||||
|
/// medalType
|
||||||
|
/// condition
|
||||||
|
/// description
|
||||||
|
/// achievementValue
|
||||||
|
/// maxSeriesValue
|
||||||
|
/// image
|
||||||
|
/// imageBig
|
||||||
|
/// order
|
||||||
|
/// sectionId
|
||||||
|
/// ... on Achievement {
|
||||||
|
/// id
|
||||||
|
/// }
|
||||||
|
/// }
|
||||||
|
/// }
|
||||||
|
/// }
|
||||||
/// }
|
/// }
|
||||||
/// </code>
|
/// </code>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
+5
@@ -10,5 +10,10 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
|||||||
/// Gathers all account information
|
/// Gathers all account information
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountInfo AccountInfo { get; }
|
public global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountInfo AccountInfo { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns information about player's achievements
|
||||||
|
/// </summary>
|
||||||
|
public global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals AccountMedals { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents information about player's achievements
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||||
|
public interface IPlayer_AccountMedals
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Player Id
|
||||||
|
/// </summary>
|
||||||
|
public global::System.Int64 AccountId { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Player Achievements by sections
|
||||||
|
/// </summary>
|
||||||
|
public global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals_Sections>? Sections { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents information about player's achievements
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||||
|
public interface IPlayer_AccountMedals_AccountAchievementsResponse : IPlayer_AccountMedals
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
+32
@@ -0,0 +1,32 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents achievement section info and it's achievements list
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||||
|
public interface IPlayer_AccountMedals_Sections
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Section Identifier
|
||||||
|
/// </summary>
|
||||||
|
public global::System.String SectionId { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Section order
|
||||||
|
/// </summary>
|
||||||
|
public global::System.Int32 Order { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Section Name
|
||||||
|
/// </summary>
|
||||||
|
public global::System.String Name { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Achievements in the section
|
||||||
|
/// </summary>
|
||||||
|
public global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals_Sections_Medals>? Medals { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents achievement section info and it's achievements list
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||||
|
public interface IPlayer_AccountMedals_Sections_AchievementSection : IPlayer_AccountMedals_Sections
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
+67
@@ -0,0 +1,67 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Player's achievement information
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||||
|
public interface IPlayer_AccountMedals_Sections_Medals
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Achievement Id
|
||||||
|
/// </summary>
|
||||||
|
public global::System.String Id { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Achievement name
|
||||||
|
/// </summary>
|
||||||
|
public global::System.String? Name { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Achievement type
|
||||||
|
/// </summary>
|
||||||
|
public global::System.String? MedalType { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Achievement condition
|
||||||
|
/// </summary>
|
||||||
|
public global::System.String? Condition { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Achievement description
|
||||||
|
/// </summary>
|
||||||
|
public global::System.String? Description { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Achievement value
|
||||||
|
/// </summary>
|
||||||
|
public global::System.Int32 AchievementValue { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Achievement max series value
|
||||||
|
/// </summary>
|
||||||
|
public global::System.Int32? MaxSeriesValue { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Achievement normal sized image
|
||||||
|
/// </summary>
|
||||||
|
public global::System.String? Image { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Achievement big image
|
||||||
|
/// </summary>
|
||||||
|
public global::System.String? ImageBig { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Order
|
||||||
|
/// </summary>
|
||||||
|
public global::System.Int64? Order { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Section Id
|
||||||
|
/// </summary>
|
||||||
|
public global::System.String SectionId { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Player's achievement information
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||||
|
public interface IPlayer_AccountMedals_Sections_Medals_Achievement : IPlayer_AccountMedals_Sections_Medals
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
+27
@@ -99,6 +99,33 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
|||||||
/// normalImage
|
/// normalImage
|
||||||
/// }
|
/// }
|
||||||
/// }
|
/// }
|
||||||
|
/// accountMedals(accountId: $accountId, realmType: $realmType, requestLanguage: $requestLanguage) {
|
||||||
|
/// __typename
|
||||||
|
/// accountId
|
||||||
|
/// sections {
|
||||||
|
/// __typename
|
||||||
|
/// sectionId
|
||||||
|
/// order
|
||||||
|
/// name
|
||||||
|
/// medals {
|
||||||
|
/// __typename
|
||||||
|
/// id
|
||||||
|
/// name
|
||||||
|
/// medalType
|
||||||
|
/// condition
|
||||||
|
/// description
|
||||||
|
/// achievementValue
|
||||||
|
/// maxSeriesValue
|
||||||
|
/// image
|
||||||
|
/// imageBig
|
||||||
|
/// order
|
||||||
|
/// sectionId
|
||||||
|
/// ... on Achievement {
|
||||||
|
/// id
|
||||||
|
/// }
|
||||||
|
/// }
|
||||||
|
/// }
|
||||||
|
/// }
|
||||||
/// }
|
/// }
|
||||||
/// </code>
|
/// </code>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
+29
-2
@@ -99,6 +99,33 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
|||||||
/// normalImage
|
/// normalImage
|
||||||
/// }
|
/// }
|
||||||
/// }
|
/// }
|
||||||
|
/// accountMedals(accountId: $accountId, realmType: $realmType, requestLanguage: $requestLanguage) {
|
||||||
|
/// __typename
|
||||||
|
/// accountId
|
||||||
|
/// sections {
|
||||||
|
/// __typename
|
||||||
|
/// sectionId
|
||||||
|
/// order
|
||||||
|
/// name
|
||||||
|
/// medals {
|
||||||
|
/// __typename
|
||||||
|
/// id
|
||||||
|
/// name
|
||||||
|
/// medalType
|
||||||
|
/// condition
|
||||||
|
/// description
|
||||||
|
/// achievementValue
|
||||||
|
/// maxSeriesValue
|
||||||
|
/// image
|
||||||
|
/// imageBig
|
||||||
|
/// order
|
||||||
|
/// sectionId
|
||||||
|
/// ... on Achievement {
|
||||||
|
/// id
|
||||||
|
/// }
|
||||||
|
/// }
|
||||||
|
/// }
|
||||||
|
/// }
|
||||||
/// }
|
/// }
|
||||||
/// </code>
|
/// </code>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -111,8 +138,8 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
|||||||
|
|
||||||
public static PlayerQueryDocument Instance { get; } = new PlayerQueryDocument();
|
public static PlayerQueryDocument Instance { get; } = new PlayerQueryDocument();
|
||||||
public global::StrawberryShake.OperationKind Kind => global::StrawberryShake.OperationKind.Query;
|
public global::StrawberryShake.OperationKind Kind => global::StrawberryShake.OperationKind.Query;
|
||||||
public global::System.ReadOnlySpan<global::System.Byte> Body => new global::System.Byte[]{0x71, 0x75, 0x65, 0x72, 0x79, 0x20, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x28, 0x24, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x3a, 0x20, 0x4c, 0x6f, 0x6e, 0x67, 0x21, 0x2c, 0x20, 0x24, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x21, 0x2c, 0x20, 0x24, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3a, 0x20, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x21, 0x29, 0x20, 0x7b, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x28, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x3a, 0x20, 0x24, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x2c, 0x20, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x24, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x2c, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3a, 0x20, 0x24, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x29, 0x20, 0x7b, 0x20, 0x5f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x20, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6d, 0x61, 0x78, 0x46, 0x72, 0x61, 0x67, 0x73, 0x54, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x20, 0x6d, 0x61, 0x78, 0x58, 0x70, 0x54, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x20, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x73, 0x20, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x20, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x65, 0x61, 0x6c, 0x74, 0x20, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x20, 0x66, 0x72, 0x61, 0x67, 0x73, 0x20, 0x66, 0x72, 0x61, 0x67, 0x73, 0x38, 0x50, 0x20, 0x68, 0x69, 0x74, 0x73, 0x20, 0x6c, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x20, 0x6d, 0x61, 0x78, 0x46, 0x72, 0x61, 0x67, 0x73, 0x20, 0x6d, 0x61, 0x78, 0x58, 0x70, 0x20, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x20, 0x73, 0x70, 0x6f, 0x74, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x72, 0x76, 0x69, 0x76, 0x65, 0x64, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x73, 0x20, 0x77, 0x69, 0x6e, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x72, 0x76, 0x69, 0x76, 0x65, 0x64, 0x20, 0x77, 0x69, 0x6e, 0x73, 0x20, 0x78, 0x70, 0x20, 0x77, 0x6e, 0x37, 0x20, 0x77, 0x69, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x20, 0x61, 0x76, 0x67, 0x44, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x20, 0x61, 0x76, 0x67, 0x58, 0x70, 0x20, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x65, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x20, 0x73, 0x75, 0x72, 0x76, 0x69, 0x76, 0x61, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x20, 0x61, 0x76, 0x67, 0x54, 0x69, 0x65, 0x72, 0x20, 0x63, 0x6c, 0x61, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x20, 0x7b, 0x20, 0x5f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x63, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x20, 0x6a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x74, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x74, 0x6d, 0x6c, 0x20, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x64, 0x20, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x20, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6d, 0x6f, 0x74, 0x74, 0x6f, 0x20, 0x74, 0x61, 0x67, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x20, 0x7d, 0x20, 0x74, 0x61, 0x6e, 0x6b, 0x73, 0x20, 0x7b, 0x20, 0x5f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x74, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x20, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4c, 0x69, 0x66, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x4f, 0x66, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x79, 0x20, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x73, 0x20, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x20, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x65, 0x61, 0x6c, 0x74, 0x20, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x43, 0x61, 0x70,Line truncated
|
public global::System.ReadOnlySpan<global::System.Byte> Body => new global::System.Byte[]{0x71, 0x75, 0x65, 0x72, 0x79, 0x20, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x28, 0x24, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x3a, 0x20, 0x4c, 0x6f, 0x6e, 0x67, 0x21, 0x2c, 0x20, 0x24, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x21, 0x2c, 0x20, 0x24, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3a, 0x20, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x21, 0x29, 0x20, 0x7b, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x28, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x3a, 0x20, 0x24, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x2c, 0x20, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x24, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x2c, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3a, 0x20, 0x24, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x29, 0x20, 0x7b, 0x20, 0x5f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x20, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6d, 0x61, 0x78, 0x46, 0x72, 0x61, 0x67, 0x73, 0x54, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x20, 0x6d, 0x61, 0x78, 0x58, 0x70, 0x54, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x20, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x73, 0x20, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x20, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x65, 0x61, 0x6c, 0x74, 0x20, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x20, 0x66, 0x72, 0x61, 0x67, 0x73, 0x20, 0x66, 0x72, 0x61, 0x67, 0x73, 0x38, 0x50, 0x20, 0x68, 0x69, 0x74, 0x73, 0x20, 0x6c, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x20, 0x6d, 0x61, 0x78, 0x46, 0x72, 0x61, 0x67, 0x73, 0x20, 0x6d, 0x61, 0x78, 0x58, 0x70, 0x20, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x20, 0x73, 0x70, 0x6f, 0x74, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x72, 0x76, 0x69, 0x76, 0x65, 0x64, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x73, 0x20, 0x77, 0x69, 0x6e, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x72, 0x76, 0x69, 0x76, 0x65, 0x64, 0x20, 0x77, 0x69, 0x6e, 0x73, 0x20, 0x78, 0x70, 0x20, 0x77, 0x6e, 0x37, 0x20, 0x77, 0x69, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x20, 0x61, 0x76, 0x67, 0x44, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x20, 0x61, 0x76, 0x67, 0x58, 0x70, 0x20, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x65, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x20, 0x73, 0x75, 0x72, 0x76, 0x69, 0x76, 0x61, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x20, 0x61, 0x76, 0x67, 0x54, 0x69, 0x65, 0x72, 0x20, 0x63, 0x6c, 0x61, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x20, 0x7b, 0x20, 0x5f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x63, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x20, 0x6a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x74, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x74, 0x6d, 0x6c, 0x20, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x64, 0x20, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x20, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6d, 0x6f, 0x74, 0x74, 0x6f, 0x20, 0x74, 0x61, 0x67, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x20, 0x7d, 0x20, 0x74, 0x61, 0x6e, 0x6b, 0x73, 0x20, 0x7b, 0x20, 0x5f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x74, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x20, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4c, 0x69, 0x66, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x4f, 0x66, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x79, 0x20, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x73, 0x20, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x20, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x65, 0x61, 0x6c, 0x74, 0x20, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x43, 0x61, 0x70,Line truncated
|
||||||
public global::StrawberryShake.DocumentHash Hash { get; } = new global::StrawberryShake.DocumentHash("md5Hash", "15d5e03ef055dc951c047827ff49084b");
|
public global::StrawberryShake.DocumentHash Hash { get; } = new global::StrawberryShake.DocumentHash("md5Hash", "032972243d83d3556ee9d9b34cd35f25");
|
||||||
public override global::System.String ToString()
|
public override global::System.String ToString()
|
||||||
{
|
{
|
||||||
#if NETSTANDARD2_0
|
#if NETSTANDARD2_0
|
||||||
|
|||||||
+9
-2
@@ -6,9 +6,10 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
|||||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||||
public partial class PlayerResult : global::System.IEquatable<PlayerResult>, IPlayerResult
|
public partial class PlayerResult : global::System.IEquatable<PlayerResult>, IPlayerResult
|
||||||
{
|
{
|
||||||
public PlayerResult(global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountInfo accountInfo)
|
public PlayerResult(global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountInfo accountInfo, global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals accountMedals)
|
||||||
{
|
{
|
||||||
AccountInfo = accountInfo;
|
AccountInfo = accountInfo;
|
||||||
|
AccountMedals = accountMedals;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -16,6 +17,11 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountInfo AccountInfo { get; }
|
public global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountInfo AccountInfo { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns information about player's achievements
|
||||||
|
/// </summary>
|
||||||
|
public global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals AccountMedals { get; }
|
||||||
|
|
||||||
public virtual global::System.Boolean Equals(PlayerResult? other)
|
public virtual global::System.Boolean Equals(PlayerResult? other)
|
||||||
{
|
{
|
||||||
if (ReferenceEquals(null, other))
|
if (ReferenceEquals(null, other))
|
||||||
@@ -33,7 +39,7 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (AccountInfo.Equals(other.AccountInfo));
|
return (AccountInfo.Equals(other.AccountInfo)) && AccountMedals.Equals(other.AccountMedals);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override global::System.Boolean Equals(global::System.Object? obj)
|
public override global::System.Boolean Equals(global::System.Object? obj)
|
||||||
@@ -62,6 +68,7 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
|||||||
{
|
{
|
||||||
int hash = 5;
|
int hash = 5;
|
||||||
hash ^= 397 * AccountInfo.GetHashCode();
|
hash ^= 397 * AccountInfo.GetHashCode();
|
||||||
|
hash ^= 397 * AccountMedals.GetHashCode();
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+86
@@ -0,0 +1,86 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents information about player's achievements
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||||
|
public partial class Player_AccountMedals_AccountAchievementsResponse : global::System.IEquatable<Player_AccountMedals_AccountAchievementsResponse>, IPlayer_AccountMedals_AccountAchievementsResponse
|
||||||
|
{
|
||||||
|
public Player_AccountMedals_AccountAchievementsResponse(global::System.Int64 accountId, global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals_Sections>? sections)
|
||||||
|
{
|
||||||
|
AccountId = accountId;
|
||||||
|
Sections = sections;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Player Id
|
||||||
|
/// </summary>
|
||||||
|
public global::System.Int64 AccountId { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Player Achievements by sections
|
||||||
|
/// </summary>
|
||||||
|
public global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals_Sections>? Sections { get; }
|
||||||
|
|
||||||
|
public virtual global::System.Boolean Equals(Player_AccountMedals_AccountAchievementsResponse? other)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(null, other))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ReferenceEquals(this, other))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (other.GetType() != GetType())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (AccountId == other.AccountId) && global::StrawberryShake.Helper.ComparisonHelper.SequenceEqual(Sections, other.Sections);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override global::System.Boolean Equals(global::System.Object? obj)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(null, obj))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ReferenceEquals(this, obj))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (obj.GetType() != GetType())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Equals((Player_AccountMedals_AccountAchievementsResponse)obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override global::System.Int32 GetHashCode()
|
||||||
|
{
|
||||||
|
unchecked
|
||||||
|
{
|
||||||
|
int hash = 5;
|
||||||
|
hash ^= 397 * AccountId.GetHashCode();
|
||||||
|
if (Sections != null)
|
||||||
|
{
|
||||||
|
foreach (var Sections_elm in Sections)
|
||||||
|
{
|
||||||
|
hash ^= 397 * Sections_elm.GetHashCode();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+100
@@ -0,0 +1,100 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents achievement section info and it's achievements list
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||||
|
public partial class Player_AccountMedals_Sections_AchievementSection : global::System.IEquatable<Player_AccountMedals_Sections_AchievementSection>, IPlayer_AccountMedals_Sections_AchievementSection
|
||||||
|
{
|
||||||
|
public Player_AccountMedals_Sections_AchievementSection(global::System.String sectionId, global::System.Int32 order, global::System.String name, global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals_Sections_Medals>? medals)
|
||||||
|
{
|
||||||
|
SectionId = sectionId;
|
||||||
|
Order = order;
|
||||||
|
Name = name;
|
||||||
|
Medals = medals;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Section Identifier
|
||||||
|
/// </summary>
|
||||||
|
public global::System.String SectionId { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Section order
|
||||||
|
/// </summary>
|
||||||
|
public global::System.Int32 Order { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Section Name
|
||||||
|
/// </summary>
|
||||||
|
public global::System.String Name { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Achievements in the section
|
||||||
|
/// </summary>
|
||||||
|
public global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals_Sections_Medals>? Medals { get; }
|
||||||
|
|
||||||
|
public virtual global::System.Boolean Equals(Player_AccountMedals_Sections_AchievementSection? other)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(null, other))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ReferenceEquals(this, other))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (other.GetType() != GetType())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (SectionId.Equals(other.SectionId)) && Order == other.Order && Name.Equals(other.Name) && global::StrawberryShake.Helper.ComparisonHelper.SequenceEqual(Medals, other.Medals);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override global::System.Boolean Equals(global::System.Object? obj)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(null, obj))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ReferenceEquals(this, obj))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (obj.GetType() != GetType())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Equals((Player_AccountMedals_Sections_AchievementSection)obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override global::System.Int32 GetHashCode()
|
||||||
|
{
|
||||||
|
unchecked
|
||||||
|
{
|
||||||
|
int hash = 5;
|
||||||
|
hash ^= 397 * SectionId.GetHashCode();
|
||||||
|
hash ^= 397 * Order.GetHashCode();
|
||||||
|
hash ^= 397 * Name.GetHashCode();
|
||||||
|
if (Medals != null)
|
||||||
|
{
|
||||||
|
foreach (var Medals_elm in Medals)
|
||||||
|
{
|
||||||
|
hash ^= 397 * Medals_elm.GetHashCode();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+174
@@ -0,0 +1,174 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Player's achievement information
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||||
|
public partial class Player_AccountMedals_Sections_Medals_Achievement : global::System.IEquatable<Player_AccountMedals_Sections_Medals_Achievement>, IPlayer_AccountMedals_Sections_Medals_Achievement
|
||||||
|
{
|
||||||
|
public Player_AccountMedals_Sections_Medals_Achievement(global::System.String id, global::System.String? name, global::System.String? medalType, global::System.String? condition, global::System.String? description, global::System.Int32 achievementValue, global::System.Int32? maxSeriesValue, global::System.String? image, global::System.String? imageBig, global::System.Int64? order, global::System.String sectionId)
|
||||||
|
{
|
||||||
|
Id = id;
|
||||||
|
Name = name;
|
||||||
|
MedalType = medalType;
|
||||||
|
Condition = condition;
|
||||||
|
Description = description;
|
||||||
|
AchievementValue = achievementValue;
|
||||||
|
MaxSeriesValue = maxSeriesValue;
|
||||||
|
Image = image;
|
||||||
|
ImageBig = imageBig;
|
||||||
|
Order = order;
|
||||||
|
SectionId = sectionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Achievement Id
|
||||||
|
/// </summary>
|
||||||
|
public global::System.String Id { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Achievement name
|
||||||
|
/// </summary>
|
||||||
|
public global::System.String? Name { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Achievement type
|
||||||
|
/// </summary>
|
||||||
|
public global::System.String? MedalType { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Achievement condition
|
||||||
|
/// </summary>
|
||||||
|
public global::System.String? Condition { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Achievement description
|
||||||
|
/// </summary>
|
||||||
|
public global::System.String? Description { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Achievement value
|
||||||
|
/// </summary>
|
||||||
|
public global::System.Int32 AchievementValue { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Achievement max series value
|
||||||
|
/// </summary>
|
||||||
|
public global::System.Int32? MaxSeriesValue { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Achievement normal sized image
|
||||||
|
/// </summary>
|
||||||
|
public global::System.String? Image { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Achievement big image
|
||||||
|
/// </summary>
|
||||||
|
public global::System.String? ImageBig { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Order
|
||||||
|
/// </summary>
|
||||||
|
public global::System.Int64? Order { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Section Id
|
||||||
|
/// </summary>
|
||||||
|
public global::System.String SectionId { get; }
|
||||||
|
|
||||||
|
public virtual global::System.Boolean Equals(Player_AccountMedals_Sections_Medals_Achievement? other)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(null, other))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ReferenceEquals(this, other))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (other.GetType() != GetType())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (Id.Equals(other.Id)) && ((Name is null && other.Name is null) || Name != null && Name.Equals(other.Name)) && ((MedalType is null && other.MedalType is null) || MedalType != null && MedalType.Equals(other.MedalType)) && ((Condition is null && other.Condition is null) || Condition != null && Condition.Equals(other.Condition)) && ((Description is null && other.Description is null) || Description != null && Description.Equals(other.Description)) && AchievementValue == other.AchievementValue && MaxSeriesValue == other.MaxSeriesValue && ((Image is null && other.Image is null) || Image != null && Image.Equals(other.Image)) && ((ImageBig is null && other.ImageBig is null) || ImageBig != null && ImageBig.Equals(other.ImageBig)) && Order == other.Order && SectionId.Equals(other.SectionId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override global::System.Boolean Equals(global::System.Object? obj)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(null, obj))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ReferenceEquals(this, obj))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (obj.GetType() != GetType())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Equals((Player_AccountMedals_Sections_Medals_Achievement)obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override global::System.Int32 GetHashCode()
|
||||||
|
{
|
||||||
|
unchecked
|
||||||
|
{
|
||||||
|
int hash = 5;
|
||||||
|
hash ^= 397 * Id.GetHashCode();
|
||||||
|
if (Name != null)
|
||||||
|
{
|
||||||
|
hash ^= 397 * Name.GetHashCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (MedalType != null)
|
||||||
|
{
|
||||||
|
hash ^= 397 * MedalType.GetHashCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Condition != null)
|
||||||
|
{
|
||||||
|
hash ^= 397 * Condition.GetHashCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Description != null)
|
||||||
|
{
|
||||||
|
hash ^= 397 * Description.GetHashCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
hash ^= 397 * AchievementValue.GetHashCode();
|
||||||
|
if (MaxSeriesValue != null)
|
||||||
|
{
|
||||||
|
hash ^= 397 * MaxSeriesValue.GetHashCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Image != null)
|
||||||
|
{
|
||||||
|
hash ^= 397 * Image.GetHashCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ImageBig != null)
|
||||||
|
{
|
||||||
|
hash ^= 397 * ImageBig.GetHashCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Order != null)
|
||||||
|
{
|
||||||
|
hash ^= 397 * Order.GetHashCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
hash ^= 397 * SectionId.GetHashCode();
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
||||||
|
{
|
||||||
|
///<summary>Represents information about player's achievements</summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||||
|
public partial class AccountAchievementsResponseData
|
||||||
|
{
|
||||||
|
public AccountAchievementsResponseData(global::System.String __typename, global::System.Int64? accountId = default !, global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementSectionData>? sections = default !)
|
||||||
|
{
|
||||||
|
this.__typename = __typename ?? throw new global::System.ArgumentNullException(nameof(__typename));
|
||||||
|
AccountId = accountId;
|
||||||
|
Sections = sections;
|
||||||
|
}
|
||||||
|
|
||||||
|
public global::System.String __typename { get; }
|
||||||
|
|
||||||
|
///<summary>Player Id</summary>
|
||||||
|
public global::System.Int64? AccountId { get; }
|
||||||
|
|
||||||
|
///<summary>Player Achievements by sections</summary>
|
||||||
|
public global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementSectionData>? Sections { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+58
@@ -0,0 +1,58 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
||||||
|
{
|
||||||
|
///<summary>Player's achievement information</summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||||
|
public partial class AchievementEntity
|
||||||
|
{
|
||||||
|
public AchievementEntity(global::System.String id = default !, global::System.String? name = default !, global::System.String? medalType = default !, global::System.String? condition = default !, global::System.String? description = default !, global::System.Int32 achievementValue = default !, global::System.Int32? maxSeriesValue = default !, global::System.String? image = default !, global::System.String? imageBig = default !, global::System.Int64? order = default !, global::System.String sectionId = default !)
|
||||||
|
{
|
||||||
|
Id = id;
|
||||||
|
Name = name;
|
||||||
|
MedalType = medalType;
|
||||||
|
Condition = condition;
|
||||||
|
Description = description;
|
||||||
|
AchievementValue = achievementValue;
|
||||||
|
MaxSeriesValue = maxSeriesValue;
|
||||||
|
Image = image;
|
||||||
|
ImageBig = imageBig;
|
||||||
|
Order = order;
|
||||||
|
SectionId = sectionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
///<summary>Achievement Id</summary>
|
||||||
|
public global::System.String Id { get; }
|
||||||
|
|
||||||
|
///<summary>Achievement name</summary>
|
||||||
|
public global::System.String? Name { get; }
|
||||||
|
|
||||||
|
///<summary>Achievement type</summary>
|
||||||
|
public global::System.String? MedalType { get; }
|
||||||
|
|
||||||
|
///<summary>Achievement condition</summary>
|
||||||
|
public global::System.String? Condition { get; }
|
||||||
|
|
||||||
|
///<summary>Achievement description</summary>
|
||||||
|
public global::System.String? Description { get; }
|
||||||
|
|
||||||
|
///<summary>Achievement value</summary>
|
||||||
|
public global::System.Int32 AchievementValue { get; }
|
||||||
|
|
||||||
|
///<summary>Achievement max series value</summary>
|
||||||
|
public global::System.Int32? MaxSeriesValue { get; }
|
||||||
|
|
||||||
|
///<summary>Achievement normal sized image</summary>
|
||||||
|
public global::System.String? Image { get; }
|
||||||
|
|
||||||
|
///<summary>Achievement big image</summary>
|
||||||
|
public global::System.String? ImageBig { get; }
|
||||||
|
|
||||||
|
///<summary>Order</summary>
|
||||||
|
public global::System.Int64? Order { get; }
|
||||||
|
|
||||||
|
///<summary>Section Id</summary>
|
||||||
|
public global::System.String SectionId { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+33
@@ -0,0 +1,33 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
||||||
|
{
|
||||||
|
///<summary>Represents achievement section info and it's achievements list</summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||||
|
public partial class AchievementSectionData
|
||||||
|
{
|
||||||
|
public AchievementSectionData(global::System.String __typename, global::System.String? sectionId = default !, global::System.Int32? order = default !, global::System.String? name = default !, global::System.Collections.Generic.IReadOnlyList<global::StrawberryShake.EntityId>? medals = default !)
|
||||||
|
{
|
||||||
|
this.__typename = __typename ?? throw new global::System.ArgumentNullException(nameof(__typename));
|
||||||
|
SectionId = sectionId;
|
||||||
|
Order = order;
|
||||||
|
Name = name;
|
||||||
|
Medals = medals;
|
||||||
|
}
|
||||||
|
|
||||||
|
public global::System.String __typename { get; }
|
||||||
|
|
||||||
|
///<summary>Section Identifier</summary>
|
||||||
|
public global::System.String? SectionId { get; }
|
||||||
|
|
||||||
|
///<summary>Section order</summary>
|
||||||
|
public global::System.Int32? Order { get; }
|
||||||
|
|
||||||
|
///<summary>Section Name</summary>
|
||||||
|
public global::System.String? Name { get; }
|
||||||
|
|
||||||
|
///<summary>Achievements in the section</summary>
|
||||||
|
public global::System.Collections.Generic.IReadOnlyList<global::StrawberryShake.EntityId>? Medals { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+103
-1
@@ -74,11 +74,13 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
|||||||
{
|
{
|
||||||
var entityIds = new global::System.Collections.Generic.HashSet<global::StrawberryShake.EntityId>();
|
var entityIds = new global::System.Collections.Generic.HashSet<global::StrawberryShake.EntityId>();
|
||||||
global::StrawberryShake.IEntityStoreSnapshot snapshot = default !;
|
global::StrawberryShake.IEntityStoreSnapshot snapshot = default !;
|
||||||
|
global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountAchievementsResponseData accountMedalsId = default !;
|
||||||
_entityStore.Update(session =>
|
_entityStore.Update(session =>
|
||||||
{
|
{
|
||||||
|
accountMedalsId = DeserializeNonNullableIPlayer_AccountMedals(session, global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "accountMedals"), entityIds);
|
||||||
snapshot = session.CurrentSnapshot;
|
snapshot = session.CurrentSnapshot;
|
||||||
});
|
});
|
||||||
var resultInfo = new PlayerResultInfo(DeserializeNonNullableIPlayer_AccountInfo(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "accountInfo")), entityIds, snapshot.Version);
|
var resultInfo = new PlayerResultInfo(DeserializeNonNullableIPlayer_AccountInfo(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "accountInfo")), accountMedalsId, entityIds, snapshot.Version);
|
||||||
return (_resultDataFactory.Create(resultInfo), resultInfo);
|
return (_resultDataFactory.Create(resultInfo), resultInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -255,5 +257,105 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
|||||||
|
|
||||||
return _booleanParser.Parse(obj.Value.GetBoolean()!);
|
return _booleanParser.Parse(obj.Value.GetBoolean()!);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountAchievementsResponseData DeserializeNonNullableIPlayer_AccountMedals(global::StrawberryShake.IEntityStoreUpdateSession session, global::System.Text.Json.JsonElement? obj, global::System.Collections.Generic.ISet<global::StrawberryShake.EntityId> entityIds)
|
||||||
|
{
|
||||||
|
if (!obj.HasValue)
|
||||||
|
{
|
||||||
|
throw new global::System.ArgumentNullException();
|
||||||
|
}
|
||||||
|
|
||||||
|
var typename = obj.Value.GetProperty("__typename").GetString();
|
||||||
|
if (typename?.Equals("AccountAchievementsResponse", global::System.StringComparison.Ordinal) ?? false)
|
||||||
|
{
|
||||||
|
return new global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountAchievementsResponseData(typename, accountId: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "accountId")), sections: DeserializeIPlayer_AccountMedals_SectionsNonNullableArray(session, global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "sections"), entityIds));
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new global::System.NotSupportedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
private global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementSectionData>? DeserializeIPlayer_AccountMedals_SectionsNonNullableArray(global::StrawberryShake.IEntityStoreUpdateSession session, global::System.Text.Json.JsonElement? obj, global::System.Collections.Generic.ISet<global::StrawberryShake.EntityId> entityIds)
|
||||||
|
{
|
||||||
|
if (!obj.HasValue)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var achievementSections = new global::System.Collections.Generic.List<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementSectionData>();
|
||||||
|
foreach (global::System.Text.Json.JsonElement child in obj.Value.EnumerateArray())
|
||||||
|
{
|
||||||
|
achievementSections.Add(DeserializeNonNullableIPlayer_AccountMedals_Sections(session, child, entityIds));
|
||||||
|
}
|
||||||
|
|
||||||
|
return achievementSections;
|
||||||
|
}
|
||||||
|
|
||||||
|
private global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementSectionData DeserializeNonNullableIPlayer_AccountMedals_Sections(global::StrawberryShake.IEntityStoreUpdateSession session, global::System.Text.Json.JsonElement? obj, global::System.Collections.Generic.ISet<global::StrawberryShake.EntityId> entityIds)
|
||||||
|
{
|
||||||
|
if (!obj.HasValue)
|
||||||
|
{
|
||||||
|
throw new global::System.ArgumentNullException();
|
||||||
|
}
|
||||||
|
|
||||||
|
var typename = obj.Value.GetProperty("__typename").GetString();
|
||||||
|
if (typename?.Equals("AchievementSection", global::System.StringComparison.Ordinal) ?? false)
|
||||||
|
{
|
||||||
|
return new global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementSectionData(typename, sectionId: DeserializeNonNullableString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "sectionId")), order: DeserializeNonNullableInt32(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "order")), name: DeserializeNonNullableString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "name")), medals: UpdateIPlayer_AccountMedals_Sections_MedalsEntityNonNullableArray(session, global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "medals"), entityIds));
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new global::System.NotSupportedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
private global::System.Collections.Generic.IReadOnlyList<global::StrawberryShake.EntityId>? UpdateIPlayer_AccountMedals_Sections_MedalsEntityNonNullableArray(global::StrawberryShake.IEntityStoreUpdateSession session, global::System.Text.Json.JsonElement? obj, global::System.Collections.Generic.ISet<global::StrawberryShake.EntityId> entityIds)
|
||||||
|
{
|
||||||
|
if (!obj.HasValue)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var achievements = new global::System.Collections.Generic.List<global::StrawberryShake.EntityId>();
|
||||||
|
foreach (global::System.Text.Json.JsonElement child in obj.Value.EnumerateArray())
|
||||||
|
{
|
||||||
|
achievements.Add(UpdateNonNullableIPlayer_AccountMedals_Sections_MedalsEntity(session, child, entityIds));
|
||||||
|
}
|
||||||
|
|
||||||
|
return achievements;
|
||||||
|
}
|
||||||
|
|
||||||
|
private global::StrawberryShake.EntityId UpdateNonNullableIPlayer_AccountMedals_Sections_MedalsEntity(global::StrawberryShake.IEntityStoreUpdateSession session, global::System.Text.Json.JsonElement? obj, global::System.Collections.Generic.ISet<global::StrawberryShake.EntityId> entityIds)
|
||||||
|
{
|
||||||
|
if (!obj.HasValue)
|
||||||
|
{
|
||||||
|
throw new global::System.ArgumentNullException();
|
||||||
|
}
|
||||||
|
|
||||||
|
global::StrawberryShake.EntityId entityId = _idSerializer.Parse(obj.Value);
|
||||||
|
entityIds.Add(entityId);
|
||||||
|
if (entityId.Name.Equals("Achievement", global::System.StringComparison.Ordinal))
|
||||||
|
{
|
||||||
|
if (session.CurrentSnapshot.TryGetEntity(entityId, out global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementEntity? entity))
|
||||||
|
{
|
||||||
|
session.SetEntity(entityId, new global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementEntity(DeserializeNonNullableString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "id")), DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "name")), DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "medalType")), DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "condition")), DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "description")), DeserializeNonNullableInt32(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "achievementValue")), DeserializeInt32(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "maxSeriesValue")), DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "image")), DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "imageBig")), DeserializeInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "order")), DeserializeNonNullableString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "sectionId"))));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
session.SetEntity(entityId, new global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementEntity(DeserializeNonNullableString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "id")), DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "name")), DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "medalType")), DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "condition")), DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "description")), DeserializeNonNullableInt32(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "achievementValue")), DeserializeInt32(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "maxSeriesValue")), DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "image")), DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "imageBig")), DeserializeInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "order")), DeserializeNonNullableString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "sectionId"))));
|
||||||
|
}
|
||||||
|
|
||||||
|
return entityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new global::System.NotSupportedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
private global::System.Int32? DeserializeInt32(global::System.Text.Json.JsonElement? obj)
|
||||||
|
{
|
||||||
|
if (!obj.HasValue)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return _intParser.Parse(obj.Value.GetInt32()!);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+76
-2
@@ -7,9 +7,11 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
|||||||
public partial class PlayerResultFactory : global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.PlayerResult>
|
public partial class PlayerResultFactory : global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.PlayerResult>
|
||||||
{
|
{
|
||||||
private readonly global::StrawberryShake.IEntityStore _entityStore;
|
private readonly global::StrawberryShake.IEntityStore _entityStore;
|
||||||
public PlayerResultFactory(global::StrawberryShake.IEntityStore entityStore)
|
private readonly global::StrawberryShake.IEntityMapper<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementEntity, Player_AccountMedals_Sections_Medals_Achievement> _player_AccountMedals_Sections_Medals_AchievementFromAchievementEntityMapper;
|
||||||
|
public PlayerResultFactory(global::StrawberryShake.IEntityStore entityStore, global::StrawberryShake.IEntityMapper<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementEntity, Player_AccountMedals_Sections_Medals_Achievement> player_AccountMedals_Sections_Medals_AchievementFromAchievementEntityMapper)
|
||||||
{
|
{
|
||||||
_entityStore = entityStore ?? throw new global::System.ArgumentNullException(nameof(entityStore));
|
_entityStore = entityStore ?? throw new global::System.ArgumentNullException(nameof(entityStore));
|
||||||
|
_player_AccountMedals_Sections_Medals_AchievementFromAchievementEntityMapper = player_AccountMedals_Sections_Medals_AchievementFromAchievementEntityMapper ?? throw new global::System.ArgumentNullException(nameof(player_AccountMedals_Sections_Medals_AchievementFromAchievementEntityMapper));
|
||||||
}
|
}
|
||||||
|
|
||||||
global::System.Type global::StrawberryShake.IOperationResultDataFactory.ResultType => typeof(global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerResult);
|
global::System.Type global::StrawberryShake.IOperationResultDataFactory.ResultType => typeof(global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerResult);
|
||||||
@@ -22,7 +24,7 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
|||||||
|
|
||||||
if (dataInfo is PlayerResultInfo info)
|
if (dataInfo is PlayerResultInfo info)
|
||||||
{
|
{
|
||||||
return new PlayerResult(MapNonNullableIPlayer_AccountInfo(info.AccountInfo, snapshot));
|
return new PlayerResult(MapNonNullableIPlayer_AccountInfo(info.AccountInfo, snapshot), MapNonNullableIPlayer_AccountMedals(info.AccountMedals, snapshot));
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new global::System.ArgumentException("PlayerResultInfo expected.");
|
throw new global::System.ArgumentException("PlayerResultInfo expected.");
|
||||||
@@ -94,6 +96,78 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
|||||||
return returnValue;
|
return returnValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals MapNonNullableIPlayer_AccountMedals(global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountAchievementsResponseData data, global::StrawberryShake.IEntityStoreSnapshot snapshot)
|
||||||
|
{
|
||||||
|
IPlayer_AccountMedals returnValue = default !;
|
||||||
|
if (data.__typename.Equals("AccountAchievementsResponse", global::System.StringComparison.Ordinal))
|
||||||
|
{
|
||||||
|
returnValue = new Player_AccountMedals_AccountAchievementsResponse(data.AccountId ?? throw new global::System.ArgumentNullException(), MapIPlayer_AccountMedals_SectionsNonNullableArray(data.Sections, snapshot));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new global::System.NotSupportedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
private global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals_Sections>? MapIPlayer_AccountMedals_SectionsNonNullableArray(global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementSectionData>? list, global::StrawberryShake.IEntityStoreSnapshot snapshot)
|
||||||
|
{
|
||||||
|
if (list is null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var achievementSections = new global::System.Collections.Generic.List<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals_Sections>();
|
||||||
|
foreach (global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementSectionData child in list)
|
||||||
|
{
|
||||||
|
achievementSections.Add(MapNonNullableIPlayer_AccountMedals_Sections(child, snapshot));
|
||||||
|
}
|
||||||
|
|
||||||
|
return achievementSections;
|
||||||
|
}
|
||||||
|
|
||||||
|
private global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals_Sections MapNonNullableIPlayer_AccountMedals_Sections(global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementSectionData data, global::StrawberryShake.IEntityStoreSnapshot snapshot)
|
||||||
|
{
|
||||||
|
IPlayer_AccountMedals_Sections returnValue = default !;
|
||||||
|
if (data.__typename.Equals("AchievementSection", global::System.StringComparison.Ordinal))
|
||||||
|
{
|
||||||
|
returnValue = new Player_AccountMedals_Sections_AchievementSection(data.SectionId ?? throw new global::System.ArgumentNullException(), data.Order ?? throw new global::System.ArgumentNullException(), data.Name ?? throw new global::System.ArgumentNullException(), MapIPlayer_AccountMedals_Sections_MedalsNonNullableArray(data.Medals, snapshot));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new global::System.NotSupportedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
private global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals_Sections_Medals>? MapIPlayer_AccountMedals_Sections_MedalsNonNullableArray(global::System.Collections.Generic.IReadOnlyList<global::StrawberryShake.EntityId>? list, global::StrawberryShake.IEntityStoreSnapshot snapshot)
|
||||||
|
{
|
||||||
|
if (list is null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var achievements = new global::System.Collections.Generic.List<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals_Sections_Medals>();
|
||||||
|
foreach (global::StrawberryShake.EntityId child in list)
|
||||||
|
{
|
||||||
|
achievements.Add(MapNonNullableIPlayer_AccountMedals_Sections_Medals(child, snapshot));
|
||||||
|
}
|
||||||
|
|
||||||
|
return achievements;
|
||||||
|
}
|
||||||
|
|
||||||
|
private global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals_Sections_Medals MapNonNullableIPlayer_AccountMedals_Sections_Medals(global::StrawberryShake.EntityId entityId, global::StrawberryShake.IEntityStoreSnapshot snapshot)
|
||||||
|
{
|
||||||
|
if (entityId.Name.Equals("Achievement", global::System.StringComparison.Ordinal))
|
||||||
|
{
|
||||||
|
return _player_AccountMedals_Sections_Medals_AchievementFromAchievementEntityMapper.Map(snapshot.GetEntity<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementEntity>(entityId) ?? throw new global::StrawberryShake.GraphQLClientException());
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new global::System.NotSupportedException();
|
||||||
|
}
|
||||||
|
|
||||||
global::System.Object global::StrawberryShake.IOperationResultDataFactory.Create(global::StrawberryShake.IOperationResultDataInfo dataInfo, global::StrawberryShake.IEntityStoreSnapshot? snapshot)
|
global::System.Object global::StrawberryShake.IOperationResultDataFactory.Create(global::StrawberryShake.IOperationResultDataInfo dataInfo, global::StrawberryShake.IEntityStoreSnapshot? snapshot)
|
||||||
{
|
{
|
||||||
return Create(dataInfo, snapshot);
|
return Create(dataInfo, snapshot);
|
||||||
|
|||||||
+8
-2
@@ -8,9 +8,10 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
|||||||
{
|
{
|
||||||
private readonly global::System.Collections.Generic.IReadOnlyCollection<global::StrawberryShake.EntityId> _entityIds;
|
private readonly global::System.Collections.Generic.IReadOnlyCollection<global::StrawberryShake.EntityId> _entityIds;
|
||||||
private readonly global::System.UInt64 _version;
|
private readonly global::System.UInt64 _version;
|
||||||
public PlayerResultInfo(global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountInfoResponseData accountInfo, global::System.Collections.Generic.IReadOnlyCollection<global::StrawberryShake.EntityId> entityIds, global::System.UInt64 version)
|
public PlayerResultInfo(global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountInfoResponseData accountInfo, global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountAchievementsResponseData accountMedals, global::System.Collections.Generic.IReadOnlyCollection<global::StrawberryShake.EntityId> entityIds, global::System.UInt64 version)
|
||||||
{
|
{
|
||||||
AccountInfo = accountInfo;
|
AccountInfo = accountInfo;
|
||||||
|
AccountMedals = accountMedals;
|
||||||
_entityIds = entityIds ?? throw new global::System.ArgumentNullException(nameof(entityIds));
|
_entityIds = entityIds ?? throw new global::System.ArgumentNullException(nameof(entityIds));
|
||||||
_version = version;
|
_version = version;
|
||||||
}
|
}
|
||||||
@@ -20,11 +21,16 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountInfoResponseData AccountInfo { get; }
|
public global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountInfoResponseData AccountInfo { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns information about player's achievements
|
||||||
|
/// </summary>
|
||||||
|
public global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountAchievementsResponseData AccountMedals { get; }
|
||||||
|
|
||||||
public global::System.Collections.Generic.IReadOnlyCollection<global::StrawberryShake.EntityId> EntityIds => _entityIds;
|
public global::System.Collections.Generic.IReadOnlyCollection<global::StrawberryShake.EntityId> EntityIds => _entityIds;
|
||||||
public global::System.UInt64 Version => _version;
|
public global::System.UInt64 Version => _version;
|
||||||
public global::StrawberryShake.IOperationResultDataInfo WithVersion(global::System.UInt64 version)
|
public global::StrawberryShake.IOperationResultDataInfo WithVersion(global::System.UInt64 version)
|
||||||
{
|
{
|
||||||
return new PlayerResultInfo(AccountInfo, _entityIds, version);
|
return new PlayerResultInfo(AccountInfo, AccountMedals, _entityIds, version);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
||||||
|
{
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||||
|
public partial class Player_AccountMedals_Sections_Medals_AchievementFromAchievementEntityMapper : global::StrawberryShake.IEntityMapper<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementEntity, Player_AccountMedals_Sections_Medals_Achievement>
|
||||||
|
{
|
||||||
|
private readonly global::StrawberryShake.IEntityStore _entityStore;
|
||||||
|
public Player_AccountMedals_Sections_Medals_AchievementFromAchievementEntityMapper(global::StrawberryShake.IEntityStore entityStore)
|
||||||
|
{
|
||||||
|
_entityStore = entityStore ?? throw new global::System.ArgumentNullException(nameof(entityStore));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Player_AccountMedals_Sections_Medals_Achievement Map(global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementEntity entity, global::StrawberryShake.IEntityStoreSnapshot? snapshot = null)
|
||||||
|
{
|
||||||
|
if (snapshot is null)
|
||||||
|
{
|
||||||
|
snapshot = _entityStore.CurrentSnapshot;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Player_AccountMedals_Sections_Medals_Achievement(entity.Id, entity.Name, entity.MedalType, entity.Condition, entity.Description, entity.AchievementValue, entity.MaxSeriesValue, entity.Image, entity.ImageBig, entity.Order, entity.SectionId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+19
-2
@@ -13,7 +13,7 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
|||||||
global::System.String __typename = obj.GetProperty("__typename").GetString()!;
|
global::System.String __typename = obj.GetProperty("__typename").GetString()!;
|
||||||
return __typename switch
|
return __typename switch
|
||||||
{
|
{
|
||||||
_ => throw new global::System.NotSupportedException()}
|
"Achievement" => ParseAchievementEntityId(obj, __typename), _ => throw new global::System.NotSupportedException()}
|
||||||
|
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
@@ -22,9 +22,26 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
|||||||
{
|
{
|
||||||
return entityId.Name switch
|
return entityId.Name switch
|
||||||
{
|
{
|
||||||
_ => throw new global::System.NotSupportedException()}
|
"Achievement" => FormatAchievementEntityId(entityId), _ => throw new global::System.NotSupportedException()}
|
||||||
|
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private global::StrawberryShake.EntityId ParseAchievementEntityId(global::System.Text.Json.JsonElement obj, global::System.String type)
|
||||||
|
{
|
||||||
|
return new global::StrawberryShake.EntityId(type, obj.GetProperty("id").GetString()!);
|
||||||
|
}
|
||||||
|
|
||||||
|
private global::System.String FormatAchievementEntityId(global::StrawberryShake.EntityId entityId)
|
||||||
|
{
|
||||||
|
using var writer = new global::StrawberryShake.Internal.ArrayWriter();
|
||||||
|
using var jsonWriter = new global::System.Text.Json.Utf8JsonWriter(writer, _options);
|
||||||
|
jsonWriter.WriteStartObject();
|
||||||
|
jsonWriter.WriteString("__typename", entityId.Name);
|
||||||
|
jsonWriter.WriteString("id", (global::System.String)entityId.Value);
|
||||||
|
jsonWriter.WriteEndObject();
|
||||||
|
jsonWriter.Flush();
|
||||||
|
return global::System.Text.Encoding.UTF8.GetString(writer.GetInternalBuffer(), 0, writer.Length);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using WotBlitzStatisticsPro.Blazor.GraphQl;
|
using WotBlitzStatisticsPro.Blazor.GraphQl;
|
||||||
using WotBlitzStatisticsPro.Blazor.Services;
|
using WotBlitzStatisticsPro.Blazor.Services;
|
||||||
@@ -20,12 +21,14 @@ namespace WotBlitzStatisticsPro.Blazor.Pages
|
|||||||
|
|
||||||
public IPlayer_AccountInfo AccountInfo { get; set; }
|
public IPlayer_AccountInfo AccountInfo { get; set; }
|
||||||
|
|
||||||
|
public IReadOnlyList<IPlayer_AccountMedals_Sections> AchievementsBySection { get; set; }
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
var settings = await LocalStorageService.ReadSettings();
|
var settings = await LocalStorageService.ReadSettings();
|
||||||
CurrentRealmType = settings.RealmType;
|
CurrentRealmType = settings.RealmType;
|
||||||
|
|
||||||
AccountInfo = await GraphQlBackendService.GetPlayerInfo(AccountId, CurrentRealmType);
|
(AccountInfo, AchievementsBySection) = await GraphQlBackendService.GetPlayerInfo(AccountId, CurrentRealmType);
|
||||||
|
|
||||||
await base.OnInitializedAsync();
|
await base.OnInitializedAsync();
|
||||||
|
|
||||||
|
|||||||
@@ -38,12 +38,12 @@ namespace WotBlitzStatisticsPro.Blazor.Services
|
|||||||
return clans.Data?.Clans;
|
return clans.Data?.Clans;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<IPlayer_AccountInfo> GetPlayerInfo(long accountId, RealmType realmType)
|
public async Task<(IPlayer_AccountInfo accountInfo, IReadOnlyList<IPlayer_AccountMedals_Sections> achievementsBySection)> GetPlayerInfo(long accountId, RealmType realmType)
|
||||||
{
|
{
|
||||||
var playerInfo = await _client.Player.ExecuteAsync(accountId, realmType, GetLanguage());
|
var playerInfo = await _client.Player.ExecuteAsync(accountId, realmType, GetLanguage());
|
||||||
CheckErrors(playerInfo.Errors);
|
CheckErrors(playerInfo.Errors);
|
||||||
|
|
||||||
return playerInfo.Data?.AccountInfo;
|
return (playerInfo.Data?.AccountInfo, playerInfo.Data?.AccountMedals?.Sections);
|
||||||
}
|
}
|
||||||
|
|
||||||
private RequestLanguage GetLanguage()
|
private RequestLanguage GetLanguage()
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace WotBlitzStatisticsPro.Blazor.Services
|
|||||||
string clanNameOrTag,
|
string clanNameOrTag,
|
||||||
RealmType realmType);
|
RealmType realmType);
|
||||||
|
|
||||||
Task<IPlayer_AccountInfo> GetPlayerInfo(
|
Task<(IPlayer_AccountInfo accountInfo, IReadOnlyList<IPlayer_AccountMedals_Sections> achievementsBySection)> GetPlayerInfo(
|
||||||
long accountId,
|
long accountId,
|
||||||
RealmType realmType);
|
RealmType realmType);
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -74,7 +74,7 @@ namespace WotBlitzStatisticsPro.Blazor.Services.Mock
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<IPlayer_AccountInfo> GetPlayerInfo(long accountId, RealmType realmType)
|
public async Task<(IPlayer_AccountInfo accountInfo, IReadOnlyList<IPlayer_AccountMedals_Sections> achievementsBySection)> GetPlayerInfo(long accountId, RealmType realmType)
|
||||||
{
|
{
|
||||||
var faker = new Faker(FakerLanguage(GetLanguage()));
|
var faker = new Faker(FakerLanguage(GetLanguage()));
|
||||||
var tanksCount = faker.Random.Number(10, 280);
|
var tanksCount = faker.Random.Number(10, 280);
|
||||||
@@ -156,13 +156,13 @@ namespace WotBlitzStatisticsPro.Blazor.Services.Mock
|
|||||||
await Task.Delay(1000);
|
await Task.Delay(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Player_AccountInfo_AccountInfoResponse(
|
var player = new Player_AccountInfo_AccountInfoResponse(
|
||||||
accountId,
|
accountId,
|
||||||
faker.Date.Past(),
|
faker.Date.Past(),
|
||||||
faker.Date.Past(),
|
faker.Date.Past(),
|
||||||
faker.Internet.UserName(),
|
faker.Internet.UserName(),
|
||||||
tanks[faker.Random.Number(1, tanks.Count)].TankId,
|
tanks[faker.Random.Number(1, tanks.Count-1)].TankId,
|
||||||
tanks[faker.Random.Number(1, tanks.Count)].TankId,
|
tanks[faker.Random.Number(1, tanks.Count-1)].TankId,
|
||||||
faker.Random.Long(1, 100000),
|
faker.Random.Long(1, 100000),
|
||||||
faker.Random.Long(1, 9999),
|
faker.Random.Long(1, 9999),
|
||||||
faker.Random.Long(1, 9999),
|
faker.Random.Long(1, 9999),
|
||||||
@@ -190,6 +190,10 @@ namespace WotBlitzStatisticsPro.Blazor.Services.Mock
|
|||||||
clanInfo,
|
clanInfo,
|
||||||
tanks
|
tanks
|
||||||
);
|
);
|
||||||
|
|
||||||
|
var achievements = AchievementsMockData.GetStaticAchievements();
|
||||||
|
|
||||||
|
return (player, achievements?.Sections);
|
||||||
}
|
}
|
||||||
|
|
||||||
private string FakerLanguage(RequestLanguage language)
|
private string FakerLanguage(RequestLanguage language)
|
||||||
|
|||||||
@@ -94,4 +94,29 @@ query player(
|
|||||||
normalImage
|
normalImage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
accountMedals(
|
||||||
|
accountId: $accountId,
|
||||||
|
realmType: $realmType,
|
||||||
|
requestLanguage: $requestLanguage
|
||||||
|
) {
|
||||||
|
accountId
|
||||||
|
sections {
|
||||||
|
sectionId
|
||||||
|
order
|
||||||
|
name
|
||||||
|
medals {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
medalType
|
||||||
|
condition
|
||||||
|
description
|
||||||
|
achievementValue
|
||||||
|
maxSeriesValue
|
||||||
|
image
|
||||||
|
imageBig
|
||||||
|
order
|
||||||
|
sectionId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -15,9 +15,9 @@ type Query {
|
|||||||
"Tank statistics history for period since \"startDate\""
|
"Tank statistics history for period since \"startDate\""
|
||||||
tankInfoHistory("AccountId" accountId: Long! "TankId" tankId: Long! "Date from history started" startDate: DateTime! "Account region" realmType: RealmType "Request language" requestLanguage: RequestLanguage): TankInfoHistoryResponse!
|
tankInfoHistory("AccountId" accountId: Long! "TankId" tankId: Long! "Date from history started" startDate: DateTime! "Account region" realmType: RealmType "Request language" requestLanguage: RequestLanguage): TankInfoHistoryResponse!
|
||||||
"Returns information about player's achievements"
|
"Returns information about player's achievements"
|
||||||
accountAchievements("AccountId" accountId: Long! "Account region" realmType: RealmType "Request language" requestLanguage: RequestLanguage): AccountAchievementsResponse!
|
accountMedals("AccountId" accountId: Long! "Account region" realmType: RealmType "Request language" requestLanguage: RequestLanguage): AccountAchievementsResponse!
|
||||||
"Returns information about player's tank achievements"
|
"Returns information about player's tank achievements"
|
||||||
tankAchievements("AccountId" accountId: Long! "Account tank Id" tankId: Long! "Account region" realmType: RealmType "Request language" requestLanguage: RequestLanguage): AccountAchievementsResponse!
|
tankMedals("AccountId" accountId: Long! "Account tank Id" tankId: Long! "Account region" realmType: RealmType "Request language" requestLanguage: RequestLanguage): AccountAchievementsResponse!
|
||||||
}
|
}
|
||||||
|
|
||||||
type Mutation {
|
type Mutation {
|
||||||
@@ -131,6 +131,8 @@ type AccountInfoResponse {
|
|||||||
survivalRate: Decimal!
|
survivalRate: Decimal!
|
||||||
"All player's tanks"
|
"All player's tanks"
|
||||||
tanks: [TankInfoResponse!]
|
tanks: [TankInfoResponse!]
|
||||||
|
"Account Region and request language"
|
||||||
|
regionAndLanguage: RealmAndLanguage!
|
||||||
}
|
}
|
||||||
|
|
||||||
"Account search result item"
|
"Account search result item"
|
||||||
@@ -285,6 +287,12 @@ type TankInfoResponse {
|
|||||||
normalImage: String
|
normalImage: String
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"Represents pair of realm type a nd requested language"
|
||||||
|
type RealmAndLanguage {
|
||||||
|
realm: RealmType!
|
||||||
|
language: RequestLanguage!
|
||||||
|
}
|
||||||
|
|
||||||
"Request for update dictionaries mutation"
|
"Request for update dictionaries mutation"
|
||||||
input UpdateDictionariesRequestInput {
|
input UpdateDictionariesRequestInput {
|
||||||
"Determines what dictionaries should be updated. Usage: StaticDictionaries | Achievements | Vehicles"
|
"Determines what dictionaries should be updated. Usage: StaticDictionaries | Achievements | Vehicles"
|
||||||
@@ -304,7 +312,7 @@ type AccountAchievementsResponse {
|
|||||||
"Player Id"
|
"Player Id"
|
||||||
accountId: Long!
|
accountId: Long!
|
||||||
"Player Achievements by sections"
|
"Player Achievements by sections"
|
||||||
achievementSections: [AchievementSection!]
|
sections: [AchievementSection!]
|
||||||
}
|
}
|
||||||
|
|
||||||
"Information about tank statistics history"
|
"Information about tank statistics history"
|
||||||
@@ -420,7 +428,7 @@ type AchievementSection {
|
|||||||
"Section Name"
|
"Section Name"
|
||||||
name: String!
|
name: String!
|
||||||
"Achievements in the section"
|
"Achievements in the section"
|
||||||
achievements: [Achievement!]
|
medals: [Achievement!]
|
||||||
}
|
}
|
||||||
|
|
||||||
"List of dictionaries"
|
"List of dictionaries"
|
||||||
@@ -460,7 +468,7 @@ type Achievement {
|
|||||||
"Section Id"
|
"Section Id"
|
||||||
sectionId: String!
|
sectionId: String!
|
||||||
"Achievement type"
|
"Achievement type"
|
||||||
type: String!
|
medalType: String
|
||||||
}
|
}
|
||||||
|
|
||||||
type StatisticsDifferenceItemOfDecimal {
|
type StatisticsDifferenceItemOfDecimal {
|
||||||
|
|||||||
@@ -16,6 +16,6 @@ namespace WotBlitzStatisticsPro.Common.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Player Achievements by sections
|
/// Player Achievements by sections
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<AchievementSection>? AchievementSections { get; set; }
|
public List<AchievementSection>? Sections { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Achievement type
|
/// Achievement type
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Type { get; set; } = string.Empty;
|
public string? MedalType { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -25,6 +25,6 @@ namespace WotBlitzStatisticsPro.Common.Model.Achievements
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Achievements in the section
|
/// Achievements in the section
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<Achievement>? Achievements { get; set; }
|
public List<Achievement>? Medals { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -21,7 +21,7 @@ namespace WotBlitzStatisticsPro.GraphQl.Query
|
|||||||
/// <param name="realmType">Account region</param>
|
/// <param name="realmType">Account region</param>
|
||||||
/// <param name="accountId">AccountId</param>
|
/// <param name="accountId">AccountId</param>
|
||||||
/// <param name="requestLanguage">Request language</param>
|
/// <param name="requestLanguage">Request language</param>
|
||||||
public Task<AccountAchievementsResponse> GetAccountAchievements(
|
public Task<AccountAchievementsResponse> AccountMedals(
|
||||||
long accountId,
|
long accountId,
|
||||||
RealmType? realmType,
|
RealmType? realmType,
|
||||||
RequestLanguage? requestLanguage)
|
RequestLanguage? requestLanguage)
|
||||||
@@ -36,7 +36,7 @@ namespace WotBlitzStatisticsPro.GraphQl.Query
|
|||||||
/// <param name="realmType">Account region</param>
|
/// <param name="realmType">Account region</param>
|
||||||
/// <param name="accountId">AccountId</param>
|
/// <param name="accountId">AccountId</param>
|
||||||
/// <param name="requestLanguage">Request language</param>
|
/// <param name="requestLanguage">Request language</param>
|
||||||
public Task<AccountAchievementsResponse> GetTankAchievements(
|
public Task<AccountAchievementsResponse> TankMedals(
|
||||||
long accountId,
|
long accountId,
|
||||||
long tankId,
|
long tankId,
|
||||||
RealmType? realmType,
|
RealmType? realmType,
|
||||||
|
|||||||
@@ -54,6 +54,8 @@ namespace WotBlitzStatisticsPro.Logic.Mappers
|
|||||||
.ForMember(d => d.Id, o => o.Ignore())
|
.ForMember(d => d.Id, o => o.Ignore())
|
||||||
.ForMember(d => d.AchievementValue, o => o.Ignore())
|
.ForMember(d => d.AchievementValue, o => o.Ignore())
|
||||||
.ForMember(d => d.MaxSeriesValue, s => s.Ignore())
|
.ForMember(d => d.MaxSeriesValue, s => s.Ignore())
|
||||||
|
.ForMember(d => d.MedalType,
|
||||||
|
o => o.MapFrom(s => s.Type))
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ namespace WotBlitzStatisticsPro.Logic
|
|||||||
var response = new AccountAchievementsResponse
|
var response = new AccountAchievementsResponse
|
||||||
{
|
{
|
||||||
AccountId = accountId,
|
AccountId = accountId,
|
||||||
AchievementSections = sections
|
Sections = sections
|
||||||
};
|
};
|
||||||
|
|
||||||
if (wgAchievements?.Achievements == null)
|
if (wgAchievements?.Achievements == null)
|
||||||
@@ -138,9 +138,9 @@ namespace WotBlitzStatisticsPro.Logic
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Sort achievements by sections
|
// Sort achievements by sections
|
||||||
foreach (var section in response.AchievementSections)
|
foreach (var section in response.Sections)
|
||||||
{
|
{
|
||||||
section.Achievements = achievements.Where(a => a.SectionId == section.SectionId).ToList();
|
section.Medals = achievements.Where(a => a.SectionId == section.SectionId).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
|
|||||||
Reference in new issue
Block a user