Public/Get-GW2WizardsVaultListings.ps1

<#
    .SYNOPSIS
        Retrieves Wizard's Vault listings (rewards).
 
    .DESCRIPTION
        The Get-GW2WizardsVaultListings cmdlet retrieves information about items available for purchase in the Wizard's Vault.
 
    .PARAMETER Ids
        The ID(s) of the listings to retrieve. Can be a single ID, an array of IDs, or "all".
 
    .EXAMPLE
        Get-GW2WizardsVaultListings -Ids 1
        Retrieves information for listing ID 1.
 
    .EXAMPLE
        Get-GW2WizardsVaultListings -Ids "all"
        Retrieves information for all listings.
 
    .NOTES
        API Endpoint: /v2/wizardsvault/listings
    #>

function Get-GW2WizardsVaultListings {
    [CmdletBinding()]
    param (
        [Parameter(Mandatory = $false)]
        [object]$Ids
    )

    $Uri = "https://api.guildwars2.com/v2/wizardsvault/listings"

    if ($Ids) {
        $Uri += "?ids=" + ($Ids -join ",")
    }

    try {
        Invoke-RestMethod -Uri $Uri -Method Get
    }
    catch {
        Write-Error "Failed to retrieve Wizard's Vault listings: $_"
    }
}