Public/Get-GW2Emotes.ps1

<#
    .SYNOPSIS
        Retrieves information about emotes.
 
    .DESCRIPTION
        This function retrieves information about emotes from the Guild Wars 2 API.
        It supports retrieving specific emotes by ID or all emotes.
 
    .PARAMETER Ids
        The ID(s) of the emotes to retrieve. Can be a single ID, an array of IDs, or "all".
 
    .EXAMPLE
        Get-GW2Emotes -Ids "wave","dance"
        Retrieves information for specific emotes.
 
    .EXAMPLE
        Get-GW2Emotes -Ids "all"
        Retrieves information for all emotes.
 
    .LINK
        https://wiki.guildwars2.com/wiki/API:2/emotes
#>

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

    $Uri = "https://api.guildwars2.com/v2/emotes"
    
    If ($Ids -eq "all") {
        $Uri += "?ids=all"
    }
    Else {
        $Uri += "?ids=$Ids"
    }

    try {
        Invoke-RestMethod -Uri $Uri -Method Get
    }
    catch {
        Write-Error "Failed to retrieve emotes: $_"
    }
}