public/helper/Get-TwitterHelp_Languages.ps1

function Get-TwitterHelp_Languages {
<#
.SYNOPSIS
    Get Twitter supported languages
 
.DESCRIPTION
    GET help/languages
     
    Returns the list of languages supported by Twitter along with the language code supported by Twitter.
     
    The language code may be formatted as ISO 639-1 alpha-2 (en), ISO 639-3 alpha-3 (msa), or ISO 639-1 alpha-2 combined with an ISO 3166-1 alpha-2 localization (zh-tw).
 
 
.NOTES
    This helper function was generated by the information provided here:
    https://developer.twitter.com/en/docs/developer-utilities/supported-languages/api-reference/get-help-languages
 
#>

    [CmdletBinding()]
    Param(
        
    )
    Begin {

        [hashtable]$Parameters = $PSBoundParameters
                   $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) }

        [string]$Method      = 'GET'
        [string]$Resource    = '/help/languages'
        [string]$ResourceUrl = 'https://api.twitter.com/1.1/help/languages.json'

    }
    Process {

        # Find & Replace any ResourceUrl parameters.
        $UrlParameters = [regex]::Matches($ResourceUrl, '(?<!\w):\w+')
        ForEach ($UrlParameter in $UrlParameters) {
            $UrlParameterValue = $Parameters["$($UrlParameter.Value.TrimStart(":"))"]
            $ResourceUrl = $ResourceUrl -Replace $UrlParameter.Value, $UrlParameterValue
        }

        If (-Not $OAuthSettings) { $OAuthSettings = Get-TwitterOAuthSettings -Resource $Resource }
        Invoke-TwitterAPI -Method $Method -ResourceUrl $ResourceUrl -Parameters $Parameters -OAuthSettings $OAuthSettings

    }
    End {

    }
}