Get-TCGdexRarity

SYNOPSIS

Get all rarities / Get cards by rarity

SYNTAX

List (Default)

Get-TCGdexRarity [-ItemsPerPage <long>] [-Page <long>] [-SortField <string>] [-SortOrder <string>]
 [-Language <string>] [-AllResults] [-NoCache]

ById

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

ALIASES

This cmdlet has the following aliases,

  • None

DESCRIPTION

Parameter set [ List ] - The Get-TCGdexRarity cmdlet invokes the GET method of the /rarities endpoint (Get all rarities)

Returns a list of all card rarity types, with support for sorting and pagination

Parameter set [ ById ] - The Get-TCGdexRarity cmdlet invokes the GET method of the /rarities/{rarity} endpoint (Get cards by rarity)

Returns cards with the specified rarity, with support for filtering, sorting, and pagination

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

EXAMPLES

EXAMPLE 1

Get-TCGdexRarity

Returns the result of the /rarities endpoint

EXAMPLE 2

Get-TCGdexRarity -Language 'fr'

Returns the result of the /rarities endpoint in French

EXAMPLE 3

Get-TCGdexRarity -Page 2 -ItemsPerPage 10

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

EXAMPLE 4

Get-TCGdexRarity -AllResults

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

EXAMPLE 5

Get-TCGdexRarity -Rarity 'Rare'

Returns the result of the /rarities/{rarity} endpoint

EXAMPLE 6

Get-TCGdexRarity -Rarity 'Rare' -Filters @{ name = 'Pikachu' } -SortField 'name' -SortOrder 'ASC'

Returns the filtered result of the /rarities/{rarity} endpoint sorted by name

EXAMPLE 7

Get-TCGdexRarity -Rarity 'Rare' -Page 2 -ItemsPerPage 10

Returns the second page of 10 items from the /rarities/{rarity} endpoint

EXAMPLE 8

Get-TCGdexRarity -Rarity 'Rare' -AllResults

Returns every item from the /rarities/{rarity} endpoint by requesting every page of the results

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: ById
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: List
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  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: ById
  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: ById
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- 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: ''

-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: ById
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: List
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Rarity

The rarity of the cards to return, such as Rare

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: ''

-SortField

Field to sort results by (overrides default sorting)

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ById
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- 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: ById
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- 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 /rarities Endpoint : GET /rarities/{rarity}