Commands/Lexicons/com/atproto/server/Sync-AtProtoServerSession.ps1
function Sync-AtProtoServerSession { <# .Synopsis com.atproto.server.refreshSession .Description com.atproto.server.refreshSession .Link https://github.com/bluesky-social/atproto/tree/main/lexicons/com/atproto/server/refreshSession.json #> [Alias('Sync-AtProtocolServerSession','atproto.server.refreshSession','com.atproto.server.refreshSession')] [CmdletBinding(SupportsShouldProcess)] param( ) begin { $NamespaceID = 'com.atproto.server.refreshSession' $httpMethod = 'POST' $InvokeAtSplat = [Ordered]@{Method=$httpMethod} $InvokeAtSplat["PSTypeName"] = $NamespaceID $parameterAliases = [Ordered]@{} $AsByte = $false $parameterQueue = [Collections.Queue]::new() } process { $parameterQueue.Enqueue([Ordered]@{} + $PSBoundParameters) } end { $parameterQueue.ToArray() | Invoke-AtProtocol -Method $httpMethod -NamespaceID $NamespaceID -Parameter { $_ } -ParameterAlias $parameterAliases @InvokeAtSplat -ContentType $( if ($ContentType) { $ContentType } else { "application/json" } ) -AsByte:$AsByte -Property { $_ } -Cache:$( if ($cache) {$cache} else { $false } ) } } |