Public/Get-GW2WvWTimers.ps1
|
<#
.SYNOPSIS Retrieves list of WvW timer endpoints. .DESCRIPTION The Get-GW2WvWTimers cmdlet retrieves the list of available WvW timer endpoints (e.g., lockout, teamAssignment). .PARAMETER TimerType The type of timer to retrieve. Valid values: "lockout", "teamAssignment". .EXAMPLE Get-GW2WvWTimers Retrieves available timer endpoints. .NOTES API Endpoint: /v2/wvw/timers #> function Get-GW2WvWTimers { [CmdletBinding()] param ( [Parameter(Mandatory = $false)] [object]$TimerType ) $Uri = "https://api.guildwars2.com/v2/wvw/timers" if ($TimerType) { $Uri += "/$TimerType" } try { Invoke-RestMethod -Uri $Uri -Method Get } catch { Write-Error "Failed to retrieve WvW timers: $_" } } |