public/helper/Send-TwitterCollections_Entries_Add.ps1
function Send-TwitterCollections_Entries_Add { <# .SYNOPSIS Curate a collection of Tweets .DESCRIPTION POST collections/entries/add Add a specified Tweet to a Collection. A collection will store up to a few thousand Tweets. Adding a Tweet to a collection beyond its allowed capacity will remove the oldest Tweet in the collection based on the time it was added to the collection. Use POST collections / entries / curate to add Tweets to a Collection in bulk. .PARAMETER id The identifier of the Collection receiving the Tweet. .PARAMETER tweet_id The identifier of the Tweet to add to the Collection. .PARAMETER relative_to The identifier of the Tweet used for relative positioning in a curation_reverse_chron ordered collection. .PARAMETER above Set to false to insert the specified tweet_id below the relative_to Tweet in the collection. Default: true .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-add #> [CmdletBinding()] Param( [string]$id, [string]$tweet_id, [string]$relative_to, [string]$above ) Begin { [string]$Method = 'POST' [string]$Resource = '/collections/entries/add' [string]$ResourceUrl = 'https://api.twitter.com/1.1/collections/entries/add.json' [hashtable]$Parameters = $PSBoundParameters $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } } Process { If (-Not $OAuthSettings) { $OAuthSettings = Get-TwitterOAuthSettings -Resource $Resource } Invoke-TwitterAPI -Method $Method -ResourceUrl $ResourceUrl -Resource $Resource -Parameters $Parameters -OAuthSettings $OAuthSettings } End { } } |