public/helper/Send-TwitterCollections_EntriesCurate.ps1
function Send-TwitterCollections_EntriesCurate { <# .SYNOPSIS Curate a collection of Tweets .DESCRIPTION POST collections/entries/curate Curate a Collection by adding or removing Tweets in bulk. Updates must be limited to 100 cumulative additions or removals per request. Use POST collections / entries / add and POST collections / entries / remove to add or remove a single Tweet. .NOTES This helper function was generated by the information provided here: https://developer.twitter.com/en/docs/tweets/curate-a-collection/api-reference/post-collections-entries-curate #> [CmdletBinding()] Param( ) Begin { [hashtable]$Parameters = $PSBoundParameters $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } [string]$Method = 'POST' [string]$Resource = '/collections/entries/curate' [string]$ResourceUrl = 'https://api.twitter.com/1.1/collections/entries/curate.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 { } } |