public/helper/Get-TwitterFriendships_Lookup.ps1

function Get-TwitterFriendships_Lookup {
<#
.SYNOPSIS
    Follow, search, and get users

.DESCRIPTION
    GET friendships/lookup
    
    Returns the relationships of the authenticating user to the comma-separated list of up to 100 screen_names or user_ids provided. Values for connections can be: following, following_requested, followed_by, none, blocking, muting.

.PARAMETER screen_name
    A comma separated list of screen names, up to 100 are allowed in a single request.

.PARAMETER user_id
    A comma separated list of user IDs, up to 100 are allowed in a single request.

.NOTES
    This helper function was generated by the information provided here:
    https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friendships-lookup

#>

    [CmdletBinding()]
    Param(
        [string]$screen_name,
        [string]$user_id
    )
    Begin {

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

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

        $OAuthSettings = Get-TwitterOAuthSettings -Resource $Resource
        Invoke-TwitterAPI -Method $Method -ResourceUrl $ResourceUrl -Parameters $Parameters -OAuthSettings $OAuthSettings

    }
    End {

    }
}