public/helper/Get-TwitterGeo_Id_PlaceId.ps1

function Get-TwitterGeo_Id_PlaceId {
<#
.SYNOPSIS
    Get information about a place
 
.DESCRIPTION
    GET geo/id/:place_id
     
    Returns all the information about a known place.
 
.PARAMETER place_id
    A place in the world. These IDs can be retrieved from geo/reverse_geocode.
 
.NOTES
    This helper function was generated by the information provided here:
    https://developer.twitter.com/en/docs/geo/place-information/api-reference/get-geo-id-place_id
 
#>

    [CmdletBinding()]
    Param(
        [string]$place_id
    )
    Begin {

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

        [string]$Method      = 'GET'
        [string]$Resource    = '/geo/id/:place_id'
        [string]$ResourceUrl = 'https://api.twitter.com/1.1/geo/id/:place_id.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 {

    }
}