Class ImageExtensions
- Namespace
- TcgDex.Models
- Assembly
- TcgDex.CSharpSdk.dll
Image URL helpers for the types that carry artwork.
public static class ImageExtensionsInheritance
Inherited Members
Methods
GetImageUrl(Card, ImageQuality, ImageFormat)
Builds the URL for this card's artwork.
public static string? GetImageUrl(this Card card, ImageQuality quality = ImageQuality.High, ImageFormat format = ImageFormat.Png)Parameters
cardCard-
The card.
qualityImageQuality-
The resolution to request.
formatImageFormat-
The file format to request.
Returns
Exceptions
- ArgumentNullException
-
cardis null.
GetImageUrl(CardBrief, ImageQuality, ImageFormat)
Builds the URL for this card's artwork.
public static string? GetImageUrl(this CardBrief card, ImageQuality quality = ImageQuality.High, ImageFormat format = ImageFormat.Png)Parameters
cardCardBrief-
The card brief.
qualityImageQuality-
The resolution to request.
formatImageFormat-
The file format to request.
Returns
Exceptions
- ArgumentNullException
-
cardis null.
GetLogoUrl(SetBrief, ImageFormat)
Builds the URL for this set's logo.
public static string? GetLogoUrl(this SetBrief set, ImageFormat format = ImageFormat.Png)Parameters
setSetBrief-
The set.
formatImageFormat-
The file format to request.
Returns
Remarks
Takes no quality: logos are served at a single resolution, unlike card artwork.
Exceptions
- ArgumentNullException
-
setis null.
GetLogoUrl(Set, ImageFormat)
Builds the URL for this set's logo.
public static string? GetLogoUrl(this Set set, ImageFormat format = ImageFormat.Png)Parameters
setSet-
The set.
formatImageFormat-
The file format to request.
Returns
Exceptions
- ArgumentNullException
-
setis null.
GetSymbolUrl(SetBrief, ImageFormat)
Builds the URL for this set's symbol.
public static string? GetSymbolUrl(this SetBrief set, ImageFormat format = ImageFormat.Png)Parameters
setSetBrief-
The set.
formatImageFormat-
The file format to request.
Returns
Remarks
Takes no quality, and is served language-neutral rather than from the requested language's path.
Exceptions
- ArgumentNullException
-
setis null.
GetSymbolUrl(Set, ImageFormat)
Builds the URL for this set's symbol.
public static string? GetSymbolUrl(this Set set, ImageFormat format = ImageFormat.Png)Parameters
setSet-
The set.
formatImageFormat-
The file format to request.
Returns
Exceptions
- ArgumentNullException
-
setis null.