Property values Id and MultiverseId are added to the type CardQueryParameter.
The MTG Api cards endpoint allow for both an id and multiverseid value to be specified, so adding the properties allow for the ICardService to better reflect the source api.
The extra properties may have overlap with the FindAsync method. However, one main benefit of the change is that multiple ids or multiverseids can be specified in a single request. As compared to FindAsync, only a max of one id or multiverseid can be searched per request.
The following test case is made possible with the addition of the above properties. Multiple multiverseids can be specified, which also results in receiving multiple cards in a single request.
[Fact]
public async Task Where_AddMultiverseIdNoMock_Success()
{
const string MULTIPLE_MULTIS = "3|4|5|6";
var serviceProvider = new MtgServiceProvider();
var service = serviceProvider.GetCardService();
var result = await service
.Where(x => x.MultiverseId, MULTIPLE_MULTIS)
.AllAsync();
Assert.True(result.IsSuccess);
Assert.Equal(4, result.Value.Count);
}
Property values
Id
andMultiverseId
are added to the typeCardQueryParameter
.The MTG Api cards endpoint allow for both an id and multiverseid value to be specified, so adding the properties allow for the
ICardService
to better reflect the source api.The extra properties may have overlap with the
FindAsync
method. However, one main benefit of the change is that multiple ids or multiverseids can be specified in a single request. As compared toFindAsync
, only a max of one id or multiverseid can be searched per request.The following test case is made possible with the addition of the above properties. Multiple multiverseids can be specified, which also results in receiving multiple cards in a single request.