Skip to content

Commit

Permalink
Merge pull request #37 from PokemonTCG/develop
Browse files Browse the repository at this point in the history
Release 2.4.0
  • Loading branch information
jaymarvels authored Mar 3, 2023
2 parents f7083be + 589c779 commit 59242d6
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
23 changes: 23 additions & 0 deletions PokemonTcgSdk.Standard.Tests/PokemonTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -419,5 +419,28 @@ public async Task GetPokemon_ApiResourcePageAsync_HasAncientTrait()
Assert.That(page.Page, Is.EqualTo("1").NoClip);
Assert.That(page.PageSize, Is.EqualTo("10").NoClip);
}

[Test]
public async Task GetPokemon_ApiResourcePageAsync_TcgPrices1stEdition()
{
// assemble
var httpclient = new HttpClient();
var pokeClient = new PokemonApiClient(httpclient);

var filter = PokemonFilterBuilder.CreatePokemonFilter().AddId("neo3-20");

// act
var page = await pokeClient.GetApiResourceAsync<PokemonCard>(10, 1, filter);

// assert
StringAssert.Contains("Lugia", page.Results.FirstOrDefault()?.Name);
StringAssert.Contains("Lugia", page.Results.LastOrDefault()?.Name);
Assert.That(page.Results.FirstOrDefault()?.Tcgplayer, Is.Not.Null);
Assert.That(page.Results.FirstOrDefault()?.Tcgplayer.Prices.The1StEdition, Is.Not.Null);
Assert.That(page.Results.FirstOrDefault()?.Tcgplayer.Prices.Unlimited, Is.Not.Null);

Assert.That(page.Page, Is.EqualTo("1").NoClip);
Assert.That(page.PageSize, Is.EqualTo("10").NoClip);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ public class TcgPlayerPrices

[JsonProperty("unlimitedHolofoil", NullValueHandling = NullValueHandling.Ignore)]
public Prices UnlimitedHolofoil { get; set; }

[JsonProperty("1stEdition", NullValueHandling = NullValueHandling.Ignore)]
public Prices The1StEdition { get; set; }

[JsonProperty("unlimited", NullValueHandling = NullValueHandling.Ignore)]
public Prices Unlimited { get; set; }
}

public class Prices
Expand Down
2 changes: 1 addition & 1 deletion PokemonTcgSdk.Standard/PokemonTcgSdk.Standard.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Authors>[email protected]</Authors>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Copyright>MIT</Copyright>
<Version>2.3.0</Version>
<Version>2.4.0</Version>
<PackageProjectUrl>https://github.com/PokemonTCG/pokemon-tcg-sdk-csharp</PackageProjectUrl>
<RepositoryUrl>https://github.com/PokemonTCG/pokemon-tcg-sdk-csharp</RepositoryUrl>
<RepositoryType>git</RepositoryType>
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ Prices ReverseHolofoil
Prices Normal
Prices The1StEditionHolofoil
Prices UnlimitedHolofoil
Prices The1StEdition
Prices Unlimited
```
###### Prices
```c#
Expand Down Expand Up @@ -399,6 +401,3 @@ Images Images
* Commit your changes (git commit -am 'Add some feature')
* Push to the branch (git push origin my-new-feature)
* Create a new Pull Request to ```develop```

#### Mentions
- Caching and some api handling used/inspired from [PokeApiNet](https://github.com/mtrdp642/PokeApiNet) under the MIT license

0 comments on commit 59242d6

Please sign in to comment.