mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-21 10:27:18 +02:00
196 lines
7.2 KiB
C#
196 lines
7.2 KiB
C#
// <auto-generated/>
|
|
#nullable enable
|
|
|
|
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
|
{
|
|
/// <summary>
|
|
/// Represents the operation service of the Player GraphQL operation
|
|
/// <code>
|
|
/// query Player($accountId: Long!, $realmType: RealmType!, $requestLanguage: RequestLanguage!) {
|
|
/// accountInfo(accountId: $accountId, realmType: $realmType, requestLanguage: $requestLanguage) {
|
|
/// __typename
|
|
/// ... account
|
|
/// }
|
|
/// accountMedals(accountId: $accountId, realmType: $realmType, requestLanguage: $requestLanguage) {
|
|
/// __typename
|
|
/// accountId
|
|
/// sections {
|
|
/// __typename
|
|
/// ... section
|
|
/// }
|
|
/// }
|
|
/// }
|
|
///
|
|
/// fragment account on AccountInfoResponse {
|
|
/// accountId
|
|
/// createdAt
|
|
/// nickname
|
|
/// maxFragsTankId
|
|
/// maxXpTankId
|
|
/// avgTier
|
|
/// ... statistics
|
|
/// clanInfo {
|
|
/// __typename
|
|
/// ... clan
|
|
/// }
|
|
/// tanks {
|
|
/// __typename
|
|
/// ... tank
|
|
/// }
|
|
/// }
|
|
///
|
|
/// fragment statistics on Statistics {
|
|
/// lastBattleTime
|
|
/// battles
|
|
/// capturePoints
|
|
/// damageDealt
|
|
/// damageReceived
|
|
/// droppedCapturePoints
|
|
/// frags
|
|
/// frags8P
|
|
/// hits
|
|
/// losses
|
|
/// maxFrags
|
|
/// maxXp
|
|
/// shots
|
|
/// spotted
|
|
/// survivedBattles
|
|
/// winAndSurvived
|
|
/// wins
|
|
/// xp
|
|
/// wn7
|
|
/// winRate
|
|
/// avgDamage
|
|
/// avgXp
|
|
/// damageCoefficient
|
|
/// survivalRate
|
|
/// }
|
|
///
|
|
/// fragment clan on ClanInfoResponse {
|
|
/// clanId
|
|
/// joinedAt
|
|
/// role
|
|
/// roleLocalized
|
|
/// name
|
|
/// createdAt
|
|
/// creatorId
|
|
/// creatorName
|
|
/// description
|
|
/// descriptionHtml
|
|
/// leaderId
|
|
/// leaderName
|
|
/// membersCount
|
|
/// motto
|
|
/// tag
|
|
/// updatedAt
|
|
/// }
|
|
///
|
|
/// fragment tank on TankInfoResponse {
|
|
/// tankId
|
|
/// battleLifeTimeInSeconds
|
|
/// markOfMastery
|
|
/// avgBattleLifeTimeInMinutes
|
|
/// name
|
|
/// tankNationId
|
|
/// tankNation
|
|
/// tier
|
|
/// tankTypeId
|
|
/// tankType
|
|
/// isPremium
|
|
/// previewImage
|
|
/// normalImage
|
|
/// ... statistics
|
|
/// }
|
|
///
|
|
/// fragment section on AchievementSection {
|
|
/// sectionId
|
|
/// order
|
|
/// name
|
|
/// medals {
|
|
/// __typename
|
|
/// ... medal
|
|
/// ... on Achievement {
|
|
/// id
|
|
/// }
|
|
/// }
|
|
/// }
|
|
///
|
|
/// fragment medal on Achievement {
|
|
/// id
|
|
/// name
|
|
/// medalType
|
|
/// condition
|
|
/// description
|
|
/// achievementValue
|
|
/// maxSeriesValue
|
|
/// image
|
|
/// imageBig
|
|
/// order
|
|
/// sectionId
|
|
/// }
|
|
/// </code>
|
|
/// </summary>
|
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "12.12.1.0")]
|
|
public partial class PlayerQuery : global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerQuery
|
|
{
|
|
private readonly global::StrawberryShake.IOperationExecutor<IPlayerResult> _operationExecutor;
|
|
private readonly global::StrawberryShake.Serialization.IInputValueFormatter _longFormatter;
|
|
private readonly global::StrawberryShake.Serialization.IInputValueFormatter _realmTypeFormatter;
|
|
private readonly global::StrawberryShake.Serialization.IInputValueFormatter _requestLanguageFormatter;
|
|
public PlayerQuery(global::StrawberryShake.IOperationExecutor<IPlayerResult> operationExecutor, global::StrawberryShake.Serialization.ISerializerResolver serializerResolver)
|
|
{
|
|
_operationExecutor = operationExecutor ?? throw new global::System.ArgumentNullException(nameof(operationExecutor));
|
|
_longFormatter = serializerResolver.GetInputValueFormatter("Long");
|
|
_realmTypeFormatter = serializerResolver.GetInputValueFormatter("RealmType");
|
|
_requestLanguageFormatter = serializerResolver.GetInputValueFormatter("RequestLanguage");
|
|
}
|
|
|
|
global::System.Type global::StrawberryShake.IOperationRequestFactory.ResultType => typeof(IPlayerResult);
|
|
public async global::System.Threading.Tasks.Task<global::StrawberryShake.IOperationResult<IPlayerResult>> ExecuteAsync(global::System.Int64 accountId, global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmType realmType, global::WotBlitzStatisticsPro.Blazor.GraphQl.RequestLanguage requestLanguage, global::System.Threading.CancellationToken cancellationToken = default)
|
|
{
|
|
var request = CreateRequest(accountId, realmType, requestLanguage);
|
|
return await _operationExecutor.ExecuteAsync(request, cancellationToken).ConfigureAwait(false);
|
|
}
|
|
|
|
public global::System.IObservable<global::StrawberryShake.IOperationResult<IPlayerResult>> Watch(global::System.Int64 accountId, global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmType realmType, global::WotBlitzStatisticsPro.Blazor.GraphQl.RequestLanguage requestLanguage, global::StrawberryShake.ExecutionStrategy? strategy = null)
|
|
{
|
|
var request = CreateRequest(accountId, realmType, requestLanguage);
|
|
return _operationExecutor.Watch(request, strategy);
|
|
}
|
|
|
|
private global::StrawberryShake.OperationRequest CreateRequest(global::System.Int64 accountId, global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmType realmType, global::WotBlitzStatisticsPro.Blazor.GraphQl.RequestLanguage requestLanguage)
|
|
{
|
|
var variables = new global::System.Collections.Generic.Dictionary<global::System.String, global::System.Object?>();
|
|
variables.Add("accountId", FormatAccountId(accountId));
|
|
variables.Add("realmType", FormatRealmType(realmType));
|
|
variables.Add("requestLanguage", FormatRequestLanguage(requestLanguage));
|
|
return CreateRequest(variables);
|
|
}
|
|
|
|
private global::StrawberryShake.OperationRequest CreateRequest(global::System.Collections.Generic.IReadOnlyDictionary<global::System.String, global::System.Object?>? variables)
|
|
{
|
|
return new global::StrawberryShake.OperationRequest(id: PlayerQueryDocument.Instance.Hash.Value, name: "Player", document: PlayerQueryDocument.Instance, strategy: global::StrawberryShake.RequestStrategy.Default, variables: variables);
|
|
}
|
|
|
|
private global::System.Object? FormatAccountId(global::System.Int64 value)
|
|
{
|
|
return _longFormatter.Format(value);
|
|
}
|
|
|
|
private global::System.Object? FormatRealmType(global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmType value)
|
|
{
|
|
return _realmTypeFormatter.Format(value);
|
|
}
|
|
|
|
private global::System.Object? FormatRequestLanguage(global::WotBlitzStatisticsPro.Blazor.GraphQl.RequestLanguage value)
|
|
{
|
|
return _requestLanguageFormatter.Format(value);
|
|
}
|
|
|
|
global::StrawberryShake.OperationRequest global::StrawberryShake.IOperationRequestFactory.Create(global::System.Collections.Generic.IReadOnlyDictionary<global::System.String, global::System.Object?>? variables)
|
|
{
|
|
return CreateRequest(variables!);
|
|
}
|
|
}
|
|
}
|