public/Get-Competition.ps1
function Get-Competition { <# .EXAMPLE Get-Competition -Name bra-seriea #> [CmdletBinding()] param( [Parameter(Mandatory=$false)] [ValidateNotNullOrEmpty()] [string]$Name ) process { $Hash1 =@{ 'arg-copasuperliga' = 'Argentine Copa de la Superliga' 'arg-ligaprofesional'= 'Argentine Liga Profesional' 'eng-championship'= 'English Championship' 'eng-facup'= 'English FA Cup' 'eng-premier'= 'English Premier League' 'eng-wsleague'= 'English Womens Super League' 'eur-el' = 'UEFA Europa League' 'eur-ucl' = 'UEFA Champions League' 'esp-laliga' = 'Spanish La Liga' 'esp-laliga2' = 'Spanish La Liga 2' 'esp-copadelrey' = 'Spanish Copa Del Rey' 'fra-ligue1' = 'French Ligue 1' 'ger-bundesliga' = 'German Bundesliga' 'ger-bundesliga2' = 'German 2 Bundesliga' 'ita-seriea' = 'Italian Serie A' 'nld-eredivisie' = 'Dutch Eredivisie' 'sco-premier' = 'Scottish Premier League' 'sco-championship' = 'Scottish Championship' 'sau-proleague' = 'Saudi Pro League' 'bra-seriea' = 'Brazilian Serie A' 'bra-serieb' = 'Brazilian Serie B' 'eng-leagueone' = 'English League One' 'eng-leaguetwo' = 'English League Two' 'aus-aLeague' = 'Austrailian A-League Men' 'aus-waLeague' = 'Austrailian A-League Women' 'usa-mls' = 'American Major League Soccer' 'eng-carabaocup' = 'Carabao Cup' 'eur-cl' = 'UEFA Conference League' 'mex-ligamx' = 'Mexican liga MX' 'mex-Ligaexpansionmx' = 'Liga de Expansión MX' 'ita-serieb' = 'Italian Serie B' 'ita-coppaitalia' = 'italian Coppa Italia' 'chn-superleague' = 'Chinese Super League' 'chn-leagueone' = 'Chinese League One' 'jpn-jleague' = 'Japanese J-League' 'jpn-j2league' = 'Japanese J2-League' 'dnk-supaliga' = 'Danish Superliga' 'tur-superlig' = 'Turkish Super Lig' 'kor-kleague1' = 'Korean K-League 1' 'kor-kleague2' = 'Korean K-League 2' } if ($($PSBoundParameters.ContainsKey('Name'))) { return $Hash1[$Name] } else { return $Hash1 } # if } # process } # function |