Public/Get-LaunchLibraryResource.ps1

function Get-LaunchLibraryResource {
    <#
    .SYNOPSIS
    Gets a Launch Library resource by catalog name.
    .EXAMPLE
    Get-LaunchLibraryResource -Resource Launch -Scope Upcoming -Query @{ limit = 10 }
    #>

    [CmdletBinding()]
    param(
        [Parameter(Mandatory)][string]$Resource,
        [string]$Id,
        [ValidateSet('All', 'Previous', 'Upcoming')][string]$Scope = 'All',
        [hashtable]$Query,
        [switch]$All,
        [switch]$Raw
    )

    $resourceDefinition = $script:LaunchLibraryResources | Where-Object Name -eq $Resource
    if (-not $resourceDefinition) {
        $valid = $script:LaunchLibraryResources.Name -join ', '
        throw "Unknown resource '$Resource'. Valid resources: $valid"
    }
    Invoke-LaunchLibraryResourceCommand -Resource $resourceDefinition -Id $Id -Scope $Scope -Query $Query -All:$All -Raw:$Raw
}