public/Get-LeagueList.ps1

function Get-LeagueList {

    [CmdletBinding()]
    param(

        [Parameter(Mandatory=$true)]
        [ValidateNotNullOrEmpty()]
        [int]$Country,

        [Parameter(Mandatory=$true)]
        [ValidateNotNullOrEmpty()]
        [Object]$Header,

        [Parameter(Mandatory=$true)]
        [ValidateNotNullOrEmpty()]
        [string]$Token

    )
    process{

        $Uri = 'https://api.sportmonks.com/v3/football/leagues/countries/'+$Country+'?api_token='+$Token 
        $Response = Invoke-RestMethod -Uri $Uri -Method Get -Headers $Header
        return $Response.data
        
    } # process

} # function