src/Get-HighWindsUserMe.ps1
function Get-HighWindsUserMe { Param( [Parameter(Mandatory)] [String] $Token ) $Path = '/api/v1/users/me' $URI = 'https://striketracker.highwinds.com' + $Path $Headers = @{ 'Content-Type' = 'application/json' 'Accept' = 'application/json' 'Authorization' = "Bearer $Token" } try { $Result = Invoke-RestMethod -Method GET -Uri $URI -Headers $Headers -Proxy $env:https_proxy return $Result } catch { throw $_ } } |