public/helper/Get-TwitterStatuses_Lookup.ps1

function Get-TwitterStatuses_Lookup {
<#
.SYNOPSIS
    Post, retrieve and engage with Tweets
 
.DESCRIPTION
    GET statuses/lookup
     
    Returns fully-hydrated Tweet objects for up to 100 Tweets per request, as specified by comma-separated values passed to the id parameter.
     
    This method is especially useful to get the details (hydrate) a collection of Tweet IDs.
     
    GET statuses / show / :id is used to retrieve a single Tweet object.
     
    There are a few things to note when using this method.
     
    You must be following a protected user to be able to see their most recent Tweets. If you don't follow a protected user their status will be removed.
    The order of Tweet IDs may not match the order of Tweets in the returned array.
    If a requested Tweet is unknown or deleted, then that Tweet will not be returned in the results list, unless the map parameter is set to true, in which case it will be returned with a value of null.
    If none of your lookup criteria matches valid Tweet IDs an empty array will be returned for map=false.
    You are strongly encouraged to use a POST for larger requests.
 
.PARAMETER id
    A comma separated list of Tweet IDs, up to 100 are allowed in a single request.
 
.PARAMETER include_entities
    The entities node that may appear within embedded statuses will not be included when set to false.
 
.PARAMETER trim_user
    When set to either true , t or 1 , each Tweet returned in a timeline will include a user object including only the status authors numerical ID. Omit this parameter to receive the complete user object.
 
.PARAMETER map
    When using the map parameter, Tweets that do not exist or cannot be viewed by the current user will still have their key represented but with an explicitly null value paired with it
 
.PARAMETER include_ext_alt_text
    If alt text has been added to any attached media entities, this parameter will return an ext_alt_text value in the top-level key for the media entity. If no value has been set, this will be returned as null
 
.PARAMETER include_card_uri
    When set to either true , t or 1 , each Tweet returned will include a card_uri attribute when there is an ads card attached to the Tweet and when that card was attached using the card_uri value.
 
.NOTES
    This helper function was generated by the information provided here:
    https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-statuses-lookup
 
#>

    [CmdletBinding()]
    Param(
        [string]$id,
        [string]$include_entities,
        [string]$trim_user,
        [string]$map,
        [string]$include_ext_alt_text,
        [string]$include_card_uri
    )
    Begin {

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

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

    }
}