Public/Get-GCLearningAssignments.ps1

<#
.SYNOPSIS
    Retrieves a list of learning assignments.

.DESCRIPTION
    Returns a paginated list of learning assignments from Genesys Cloud.
    Uses the GET /api/v2/learning/assignments endpoint.

.PARAMETER PageSize
    The number of results per page. Defaults to 25.

.PARAMETER PageNumber
    The page number to retrieve. Defaults to 1.

.EXAMPLE
    Get-GCLearningAssignments

.NOTES
    Genesys Cloud API: GET /api/v2/learning/assignments
#>

function Get-GCLearningAssignments {
    [CmdletBinding()]
    param(
        [Parameter()]
        [int]$PageSize = 25,

        [Parameter()]
        [int]$PageNumber = 1
    )

    $endpoint = "learning/assignments"
    $queryParams = @{
        pageSize   = $PageSize
        pageNumber = $PageNumber
    }

    return Invoke-GCApiRequest -Endpoint $endpoint -Method GET -QueryParameters $queryParams
}