Public/Get-GW2WvWAbilities.ps1

<#
    .SYNOPSIS
        Retrieves WvW abilities from the Guild Wars 2 API.
 
    .DESCRIPTION
        The Get-GW2WvWAbilities cmdlet retrieves information about World vs. World abilities (masteries).
 
    .PARAMETER Ids
        The ID(s) of the abilities to retrieve. Can be a single ID, an array of IDs, or "all".
 
    .PARAMETER Page
        The page number to retrieve.
 
    .PARAMETER PageSize
        The number of results per page.
 
    .PARAMETER Lang
        The language to return localized text in. Defaults to "en".
        Valid values: "en", "es", "de", "fr", "zh".
 
    .EXAMPLE
        Get-GW2WvWAbilities -Ids 1
        Retrieves information for ability ID 1.
 
    .EXAMPLE
        Get-GW2WvWAbilities -Ids "all"
        Retrieves information for all abilities.
 
    .NOTES
        API Endpoint: /v2/wvw/abilities
    #>

function Get-GW2WvWAbilities {
    [CmdletBinding()]
    param (
        [Parameter(Mandatory = $false)]
        [string[]]$Ids,

        [Parameter(Mandatory = $false)]
        [ValidateSet("en", "es", "de", "fr", "zh")]
        [string]$Lang
    )

    $Uri = "https://api.guildwars2.com/v2/wvw/abilities"

    if ($Ids) {
        $uri += "?ids=" + ($Ids -join ",")
    }
    if ($Lang) {
        $uri += "&lang=$Lang"
    }
    try {
        Invoke-RestMethod -Uri $Uri -Method Get
    }
    catch {
        Write-Error "Failed to retrieve WvW abilities: $_"
    }
}