Interface ICatalogResource
- Namespace
- TcgDex.Resources
- Assembly
- TcgDex.CSharpSdk.dll
Reads the enumeration endpoints — the distinct values a field can take.
public interface ICatalogResourceRemarks
Useful for building valid filters and for populating pickers. Note that TcgDex.Resources.ICatalogResource.GetHitPointsAsync(System.Threading.CancellationToken), TcgDex.Resources.ICatalogResource.GetRetreatCostsAsync(System.Threading.CancellationToken) and TcgDex.Resources.ICatalogResource.GetDexIdsAsync(System.Threading.CancellationToken) return numbers where the rest return text.
Methods
GetCategoriesAsync(CancellationToken)
The card categories: Pokemon, Trainer, Energy.
Task<IReadOnlyList<string>> GetCategoriesAsync(CancellationToken cancellationToken = default)Parameters
cancellationTokenCancellationToken-
Cancels the request.
Returns
- Task<IReadOnlyList<string>>
-
Every category value in use.
GetDexIdsAsync(CancellationToken)
Every National Pokédex number represented.
Task<IReadOnlyList<int>> GetDexIdsAsync(CancellationToken cancellationToken = default)Parameters
cancellationTokenCancellationToken-
Cancels the request.
Returns
- Task<IReadOnlyList<int>>
-
Every dex id in use.
GetEnergyTypesAsync(CancellationToken)
The energy categories: Normal and Special.
Task<IReadOnlyList<string>> GetEnergyTypesAsync(CancellationToken cancellationToken = default)Parameters
cancellationTokenCancellationToken-
Cancels the request.
Returns
- Task<IReadOnlyList<string>>
-
Every energy type value in use.
GetHitPointsAsync(CancellationToken)
Every hit-point value in use.
Task<IReadOnlyList<int>> GetHitPointsAsync(CancellationToken cancellationToken = default)Parameters
cancellationTokenCancellationToken-
Cancels the request.
Returns
- Task<IReadOnlyList<int>>
-
Every HP value in use.
GetIllustratorsAsync(CancellationToken)
Every illustrator credited on a card.
Task<IReadOnlyList<string>> GetIllustratorsAsync(CancellationToken cancellationToken = default)Parameters
cancellationTokenCancellationToken-
Cancels the request.
Returns
- Task<IReadOnlyList<string>>
-
Every illustrator name in use.
GetNumberValuesAsync(string, CancellationToken)
Reads any numeric enumeration endpoint by name, like TcgDex.Resources.ICatalogResource.GetValuesAsync(System.String,System.Threading.CancellationToken).
Task<IReadOnlyList<int>> GetNumberValuesAsync(string name, CancellationToken cancellationToken = default)Parameters
namestring-
The endpoint, for example
"hp"; escaped as a single path segment. cancellationTokenCancellationToken-
Cancels the request.
Returns
- Task<IReadOnlyList<int>>
-
Every value in use.
Exceptions
- ArgumentException
-
nameis empty, whitespace,"."or"..". - ArgumentNullException
-
nameis null.
GetRaritiesAsync(CancellationToken)
Every rarity in use.
Task<IReadOnlyList<string>> GetRaritiesAsync(CancellationToken cancellationToken = default)Parameters
cancellationTokenCancellationToken-
Cancels the request.
Returns
- Task<IReadOnlyList<string>>
-
Every rarity value in use.
GetRegulationMarksAsync(CancellationToken)
Every regulation mark.
Task<IReadOnlyList<string>> GetRegulationMarksAsync(CancellationToken cancellationToken = default)Parameters
cancellationTokenCancellationToken-
Cancels the request.
Returns
- Task<IReadOnlyList<string>>
-
Every regulation mark in use.
GetRetreatCostsAsync(CancellationToken)
Every retreat cost in use.
Task<IReadOnlyList<int>> GetRetreatCostsAsync(CancellationToken cancellationToken = default)Parameters
cancellationTokenCancellationToken-
Cancels the request.
Returns
- Task<IReadOnlyList<int>>
-
Every retreat cost in use.
GetStagesAsync(CancellationToken)
Every evolution stage.
Task<IReadOnlyList<string>> GetStagesAsync(CancellationToken cancellationToken = default)Parameters
cancellationTokenCancellationToken-
Cancels the request.
Returns
- Task<IReadOnlyList<string>>
-
Every stage value in use.
GetSuffixesAsync(CancellationToken)
Every card-name suffix, such as EX or VMAX.
Task<IReadOnlyList<string>> GetSuffixesAsync(CancellationToken cancellationToken = default)Parameters
cancellationTokenCancellationToken-
Cancels the request.
Returns
- Task<IReadOnlyList<string>>
-
Every suffix value in use.
GetTrainerTypesAsync(CancellationToken)
Every Trainer subtype.
Task<IReadOnlyList<string>> GetTrainerTypesAsync(CancellationToken cancellationToken = default)Parameters
cancellationTokenCancellationToken-
Cancels the request.
Returns
- Task<IReadOnlyList<string>>
-
Every trainer type value in use.
GetTypesAsync(CancellationToken)
Every elemental energy type.
Task<IReadOnlyList<string>> GetTypesAsync(CancellationToken cancellationToken = default)Parameters
cancellationTokenCancellationToken-
Cancels the request.
Returns
- Task<IReadOnlyList<string>>
-
Every type value in use.
GetValuesAsync(string, CancellationToken)
Reads any text enumeration endpoint by name, for one this SDK has no named method for yet.
Task<IReadOnlyList<string>> GetValuesAsync(string name, CancellationToken cancellationToken = default)Parameters
namestring-
The endpoint, for example
"rarities"; escaped as a single path segment. cancellationTokenCancellationToken-
Cancels the request.
Returns
- Task<IReadOnlyList<string>>
-
Every value in use.
Remarks
Upstream adds enumeration endpoints over time. A named method per endpoint would be a new interface member each time, which cannot ship without a major version, so this is the way to reach a new one in between (DECISIONS #36).
Exceptions
- ArgumentException
-
nameis empty, whitespace,"."or"..". - ArgumentNullException
-
nameis null.
GetVariantsAsync(CancellationToken)
Every printing variant name.
Task<IReadOnlyList<string>> GetVariantsAsync(CancellationToken cancellationToken = default)Parameters
cancellationTokenCancellationToken-
Cancels the request.
Returns
- Task<IReadOnlyList<string>>
-
Every variant name in use.