Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fixes for Dragonflight #206

Merged
merged 10 commits into from
Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"nbgv": {
"version": "3.4.244",
"version": "3.5.119",
"commands": [
"nbgv"
]
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2.4.0
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.

- name: Install .NET 5 SDK
uses: actions/setup-dotnet@5a3fa01c67e60dba8f95e2878436c7151c4b5f01 # v1.8.2
- name: Install .NET 7 SDK
uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3
with:
dotnet-version: 6.0.100
dotnet-version: 7.0.103

- name: Build
run: dotnet build --configuration Release --verbosity minimal
Expand All @@ -30,7 +30,7 @@ jobs:
BLIZZARD_CLIENT_SECRET: ${{ secrets.BLIZZARD_CLIENT_SECRET }}

- name: Upload build artifacts
uses: actions/upload-artifact@27121b0bdffd731efa15d66772be8dc71245d074 # v2.2.4
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: NuGet packages
path: |
Expand Down
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build.Artifacts" Version="2.2.0" PrivateAssets="all" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.4.244" PrivateAssets="all" />
<PackageReference Include="Microsoft.Build.Artifacts" Version="4.2.0" PrivateAssets="all" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.5.119" PrivateAssets="all" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "6.0.100",
"version": "7.0.103",
"rollForward": "latestMinor"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/ArgentPonyWarcraftClient/ArgentPonyWarcraftClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.0" PrivateAssets="All" />
<PackageReference Include="System.Text.Json" Version="6.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="System.Text.Json" Version="7.0.2" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,10 @@ public record AuctionsIndex
/// </summary>
[JsonPropertyName("auctions")]
public Auction[] Auctions { get; init; }

/// <summary>
/// Gets commodities associated with the auctions.
/// </summary>
[JsonPropertyName("commodities")]
public Self Commodities { get; init; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@ public record PreviewItem
[JsonPropertyName("item")]
public Media Item { get; init; }

/// <summary>
/// Gets the context for the item.
/// </summary>
[JsonPropertyName("context")]
public int Context { get; init; }

/// <summary>
/// Gets the bonus list for the item.
/// </summary>
[JsonPropertyName("bonus_list")]
public int[] BonusList { get; init; }

/// <summary>
/// Gets the quality of the item.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,10 @@ public record MythicKeystoneDungeon
/// </summary>
[JsonPropertyName("keystone_upgrades")]
public MythicKeystoneUpgrade[] KeystoneUpgrades { get; init; }

/// <summary>
/// Gets a value indicating whether the mythic keystone dungeon is tracked.
/// </summary>
[JsonPropertyName("is_tracked")]
public bool IsTracked { get; init; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,10 @@ public record PlayableSpecialization
/// </summary>
[JsonPropertyName("pvp_talents")]
public PvpTalentElement[] PvpTalents { get; init; }

/// <summary>
/// Gets a reference to the talent tree associated with this specialization.
/// </summary>
[JsonPropertyName("spec_talent_tree")]
public TalentTreeReference SpecTalentTree { get; init; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
namespace ArgentPonyWarcraftClient;

/// <summary>
/// A talent rank description.
/// </summary>
public record RankDescription
{
/// <summary>
/// Gets the numeric rank.
/// </summary>
[JsonPropertyName("rank")]
public int Rank { get; init; }

/// <summary>
/// Gets the rank description.
/// </summary>
[JsonPropertyName("description")]
public string Description { get; init; }
}
24 changes: 9 additions & 15 deletions src/ArgentPonyWarcraftClient/Models/GameDataApi/Talent/Talent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,10 @@ public record Talent
public int Id { get; init; }

/// <summary>
/// Gets the tier index for the talent.
/// Gets the rank description associated with this talent.
/// </summary>
[JsonPropertyName("tier_index")]
public int TierIndex { get; init; }

/// <summary>
/// Gets the column index of the talent.
/// </summary>
[JsonPropertyName("column_index")]
public int ColumnIndex { get; init; }

/// <summary>
/// Gets the level of the talent.
/// </summary>
[JsonPropertyName("level")]
public int Level { get; init; }
[JsonPropertyName("rank_descriptions")]
public RankDescription[] RankDescription { get; init; }

/// <summary>
/// Gets the description of the talent.
Expand All @@ -52,4 +40,10 @@ public record Talent
/// </summary>
[JsonPropertyName("playable_class")]
public PlayableClassReference PlayableClass { get; init; }

/// <summary>
/// Gets a reference to the playable specialization associated with this talent.
/// </summary>
[JsonPropertyName("playable_specialization")]
public PlayableSpecializationReference PlayableSpecialization { get; init; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
namespace ArgentPonyWarcraftClient;

/// <summary>
/// A reference to a talent tree.
/// </summary>
public record TalentTreeReference
{
/// <summary>
/// Gets the key for the talent tree.
/// </summary>
[JsonPropertyName("key")]
public Self Key { get; init; }

/// <summary>
/// Gets the name of the talent tree.
/// </summary>
[JsonPropertyName("name")]
public string Name { get; init; }
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<IsPackable>false</IsPackable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.0">
<PackageReference Include="coverlet.collector" Version="3.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

Expand All @@ -11,11 +11,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.2.0" />
<PackageReference Include="FluentAssertions.Json" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="FluentAssertions" Version="6.10.0" />
<PackageReference Include="FluentAssertions.Json" Version="6.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ public async Task GetMythicKeystoneDungeonAsync_Gets_MythicKeystoneDungeon()
{
IMythicKeystoneDungeonApi warcraftClient = ClientFactory.BuildClient();

RequestResult<MythicKeystoneDungeon> result = await warcraftClient.GetMythicKeystoneDungeonAsync(375, "dynamic-us");
RequestResult<MythicKeystoneDungeon> result = await warcraftClient.GetMythicKeystoneDungeonAsync(197, "dynamic-us");

await result.Should().BeSuccessfulRequest()
.BeEquivalentToBlizzardResponseAsync("https://us.api.blizzard.com/data/wow/mythic-keystone/dungeon/375?namespace=dynamic-us&locale=en_US");
.BeEquivalentToBlizzardResponseAsync("https://us.api.blizzard.com/data/wow/mythic-keystone/dungeon/197?namespace=dynamic-us&locale=en_US");
}

[ResilientFact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ public async Task GetTalentAsync_Gets_Talent()
{
ITalentApi warcraftClient = ClientFactory.BuildClient();

RequestResult<Talent> result = await warcraftClient.GetTalentAsync(23106, "static-us");
RequestResult<Talent> result = await warcraftClient.GetTalentAsync(117163, "static-us");

await result.Should().BeSuccessfulRequest()
.BeEquivalentToBlizzardResponseAsync("https://us.api.blizzard.com/data/wow/talent/23106?namespace=static-us&locale=en_US");
.BeEquivalentToBlizzardResponseAsync("https://us.api.blizzard.com/data/wow/talent/117163?namespace=static-us&locale=en_US");
}

[ResilientFact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ public class CharacterPvpApiTests
public async Task GetCharacterPvpBracketStatisticsAsync_Gets_PvpBracketStatistics()
{
ICharacterPvpApi warcraftClient = ClientFactory.BuildClient();
RequestResult<CharacterPvpBracketStatistics> result = await warcraftClient.GetCharacterPvpBracketStatisticsAsync("malganis", "zenli", "3v3", "profile-us");
RequestResult<CharacterPvpBracketStatistics> result = await warcraftClient.GetCharacterPvpBracketStatisticsAsync("malganis", "gutso", "3v3", "profile-us");
Assert.NotNull(result.Value);
}

[ResilientFact]
public async Task GetCharacterPvpSummaryAsync_Gets_CharacterPvpSummary()
{
ICharacterPvpApi warcraftClient = ClientFactory.BuildClient();
RequestResult<CharacterPvpSummary> result = await warcraftClient.GetCharacterPvpSummaryAsync("malganis", "zenli", "profile-us");
RequestResult<CharacterPvpSummary> result = await warcraftClient.GetCharacterPvpSummaryAsync("malganis", "gutso", "profile-us");
Assert.NotNull(result.Value);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.2.0" />
<PackageReference Include="FluentAssertions.Json" Version="6.0.0" />
<PackageReference Include="FluentAssertions" Version="6.10.0" />
<PackageReference Include="FluentAssertions.Json" Version="6.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

Expand All @@ -11,10 +11,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="RichardSzalay.MockHttp" Version="6.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ public async Task GetMythicKeystoneDungeonsIndexAsync_Gets_MythicKeystoneDungeon
public async Task GetMythicKeystoneDungeonAsync_Gets_MythicKeystoneDungeon()
{
IMythicKeystoneDungeonApi warcraftClient = ClientFactory.BuildMockClient(
requestUri: "https://us.api.blizzard.com/data/wow/mythic-keystone/dungeon/353?namespace=dynamic-us&locale=en_US",
requestUri: "https://us.api.blizzard.com/data/wow/mythic-keystone/dungeon/197?namespace=dynamic-us&locale=en_US",
responseContent: Resources.MythicKeystoneDungeonResponse);

RequestResult<MythicKeystoneDungeon> result = await warcraftClient.GetMythicKeystoneDungeonAsync(353, "dynamic-us");
RequestResult<MythicKeystoneDungeon> result = await warcraftClient.GetMythicKeystoneDungeonAsync(197, "dynamic-us");
Assert.NotNull(result.Value);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ public async Task GetTalentsIndexAsync_Gets_TalentsIndex()
public async Task GetTalentAsync_Gets_Talent()
{
ITalentApi warcraftClient = ClientFactory.BuildMockClient(
requestUri: "https://us.api.blizzard.com/data/wow/talent/23106?namespace=static-us&locale=en_US",
requestUri: "https://us.api.blizzard.com/data/wow/talent/117163?namespace=static-us&locale=en_US",
responseContent: Resources.TalentResponse);

RequestResult<Talent> result = await warcraftClient.GetTalentAsync(23106, "static-us");
RequestResult<Talent> result = await warcraftClient.GetTalentAsync(117163, "static-us");
Assert.NotNull(result.Value);
}

Expand Down
Loading