Public/Get-GW2Guild.ps1

<#
.SYNOPSIS
Retrieves core details about a given guild from the Guild Wars 2 API.
 
.DESCRIPTION
Calls the Guild Wars 2 API v2 /guild/:id endpoint.
Returns information such as guild name, tag, and emblem details.
 
.PARAMETER Id
Required. The unique guild ID (GUID) to retrieve details for.
Example: "116E0C0E-0035-44A9-BB22-4AE3E23127E5"
 
.EXAMPLE
Get-GW2Guild -Id "116E0C0E-0035-44A9-BB22-4AE3E23127E5"
Returns details for the specified guild.
 
.NOTES
- Requires network access to api.guildwars2.com.
- This is a public endpoint and does not require an API key.
#>

function Get-GW2Guild {
    param (
        [Parameter(Mandatory = $true)]
        [string]$Id
    )
    
    $url = "https://api.guildwars2.com/v2/guild/$Id"
    
    $response = Invoke-RestMethod -Uri $url -Method Get
    
    return $response
}