public/helper/Send-TwitterMutes_Users_Create.ps1
function Send-TwitterMutes_Users_Create { <# .SYNOPSIS Mute, block and report users .DESCRIPTION POST mutes/users/create Mutes the user specified in the ID parameter for the authenticating user. Returns the muted user when successful. Returns a string describing the failure condition when unsuccessful. Actions taken in this method are asynchronous. Changes will be eventually consistent. .PARAMETER screen_name The screen name of the potentially muted user. Helpful for disambiguating when a valid screen name is also a user ID. .PARAMETER user_id The ID of the potentially muted user. Helpful for disambiguating when a valid user ID is also a valid screen name. .NOTES This helper function was generated by the information provided here: https://developer.twitter.com/en/docs/accounts-and-users/mute-block-report-users/api-reference/post-mutes-users-create #> [CmdletBinding()] Param( [string]$screen_name, [string]$user_id ) Begin { [string]$Method = 'POST' [string]$Resource = '/mutes/users/create' [string]$ResourceUrl = 'https://api.twitter.com/1.1/mutes/users/create.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 { } } |