Get-TCGdexCard

SYNOPSIS

Fetch the list of cards / Find card by ID / Find card by set and local ID

SYNTAX

List (Default)

Get-TCGdexCard [-Filters <hashtable>] [-ItemsPerPage <long>] [-Page <long>] [-SortField <string>]
 [-SortOrder <string>] [-Language <string>] [-AllResults] [-NoCache]

ById

Get-TCGdexCard [-CardId] <string> [-Language <string>] [-NoCache]

BySet

Get-TCGdexCard [-SetId] <string> [-LocalId] <string> [-Language <string>] [-NoCache]

ALIASES

This cmdlet has the following aliases,

  • None

DESCRIPTION

Parameter set [ List ] - The Get-TCGdexCard cmdlet invokes the GET method of the /cards endpoint (Fetch the list of cards)

Returns a list of all cards, with support for filtering, sorting, and pagination

Parameter set [ ById ] - The Get-TCGdexCard cmdlet invokes the GET method of the /cards/{cardId} endpoint (Find card by ID)

Returns detailed information about a specified card

Parameter set [ BySet ] - The Get-TCGdexCard cmdlet invokes the GET method of the /sets/{set}/{cardLocalId} endpoint (Find card by set and local ID)

Returns detailed information about a specific card identified by its set and local ID within that set

Responses are cached in memory for one hour, use -NoCache to send a new request

EXAMPLES

EXAMPLE 1

Get-TCGdexCard

Returns the result of the /cards endpoint

EXAMPLE 2

Get-TCGdexCard -Language 'fr'

Returns the result of the /cards endpoint in French

EXAMPLE 3

Get-TCGdexCard -Filters @{ name = 'eq:Pikachu'; hp = 'gte:60' } -SortField 'name' -SortOrder 'ASC'

Returns the filtered result of the /cards endpoint sorted by name

EXAMPLE 4

Get-TCGdexCard -Page 2 -ItemsPerPage 10

Returns the second page of 10 items from the /cards endpoint

EXAMPLE 5

Get-TCGdexCard -AllResults

Returns every item from the /cards endpoint by requesting every page of the results

EXAMPLE 6

Get-TCGdexCard -CardId 'swsh3-136'

Returns the result of the /cards/{cardId} endpoint

EXAMPLE 7

Get-TCGdexCard -SetId 'swsh3' -LocalId '136'

Returns the result of the /sets/{set}/{cardLocalId} endpoint

PARAMETERS

-AllResults

Returns all items from the endpoint by requesting every page of the results

When ItemsPerPage is not defined 100 items are requested with each page

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases:
- AllPages
ParameterSets:
- Name: List
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-CardId

ID of card to return

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases:
- Id
ParameterSets:
- Name: ById
  Position: 0
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Filters

Filter results by field value.

Supports various operators:

  • Default/’like:’ - Laxist equality (contains, case insensitive)
  • ‘not:’/’notlike:’ - Laxist inequality
  • ‘eq:’ - Strict equality
  • ‘neq:’ - Strict inequality
  • ‘gte:’ - Greater than or equal (numbers)
  • ‘lte:’ - Less than or equal (numbers)
  • ‘gt:’ - Greater than (numbers)
  • ‘lt:’ - Less than (numbers)
  • ‘null:’ - Field is null
  • ‘notnull:’ - Field is not null
  • Multiple values with ‘ ’ (e.g., ‘name=eq:Furret Pikachu’)

Every key of the hashtable is sent as its own query parameter, such as @{ name = ‘eq:Pikachu’ }. An array value is joined with a pipe (|) to match any of the values

Type: System.Collections.Hashtable
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: List
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-ItemsPerPage

Number of items per page (applied when pagination:page is used)

Default value: 100

Type: System.Int64
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: List
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Language

The language of the data to return

When not defined the module language is used, see Add-TCGdexLanguage & Get-TCGdexLanguage (default: en)

Allowed values: ‘en’, ‘fr’, ‘es’, ‘es-mx’, ‘it’, ‘pt’, ‘pt-br’, ‘pt-pt’, ‘zh-cn’, ‘zh-tw’, ‘ja’, ‘ko’, ‘th’

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-LocalId

The local ID (number) of the card in its set, such as 136

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases:
- cardLocalId
ParameterSets:
- Name: BySet
  Position: 1
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-NoCache

Sends a new request instead of returning a cached response, the response is not cached

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Page

Page number for paginated results

Default value: 1

Type: System.Int64
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: List
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-SetId

The ID or name of the set, such as swsh3

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases:
- set
ParameterSets:
- Name: BySet
  Position: 0
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-SortField

Field to sort results by (overrides default sorting)

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: List
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-SortOrder

Order to sort results (ASC or DESC)

Allowed values: ‘ASC’, ‘DESC’

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: List
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.String

OUTPUTS

NOTES

Endpoint : GET /cards Endpoint : GET /cards/{cardId} Endpoint : GET /sets/{set}/{cardLocalId}