├── .gitattributes ├── .gitignore ├── .vscode └── tasks.json ├── APIHelper ├── Get-APIHelperFunction.ps1 ├── New-APIHelperFunction.ps1 └── twitter_api.json ├── PSTwitterAPI.bootstrap.ps1 ├── PSTwitterAPI.build.ps1 ├── PSTwitterAPI ├── PSTwitterAPI.psd1 ├── PSTwitterAPI.psm1 ├── private │ ├── ConvertFrom-RateLimitStatus.ps1 │ ├── Get-Eposh.ps1 │ └── Get-OAuthParameters.ps1 └── public │ ├── Get-TwitterApplication_RateLimitStatus.ps1 │ ├── Get-TwitterOAuthSettings.ps1 │ ├── Get-TwitterSearch_Tweets.ps1 │ ├── Get-TwitterStatuses_HomeTimeline.ps1 │ ├── Get-TwitterStatuses_MentionsTimeline.ps1 │ ├── Get-TwitterStatuses_UserTimeline.ps1 │ ├── Invoke-TwitterAPI.ps1 │ ├── Send-TwitterDirectMessages_EventsNew.ps1 │ ├── Set-TwitterOAuthSettings.ps1 │ └── helper │ ├── Get-TwitterAccount_Settings.ps1 │ ├── Get-TwitterAccount_VerifyCredentials.ps1 │ ├── Get-TwitterBlocks_Ids.ps1 │ ├── Get-TwitterBlocks_List.ps1 │ ├── Get-TwitterCollections_Entries.ps1 │ ├── Get-TwitterCollections_List.ps1 │ ├── Get-TwitterCollections_Show.ps1 │ ├── Get-TwitterCustomProfiles_List.ps1 │ ├── Get-TwitterCustomProfiles__Id.ps1 │ ├── Get-TwitterDirectMessages_EventsList.ps1 │ ├── Get-TwitterDirectMessages_EventsShow.ps1 │ ├── Get-TwitterDirectMessages_WelcomeMessagesList.ps1 │ ├── Get-TwitterDirectMessages_WelcomeMessagesRulesList.ps1 │ ├── Get-TwitterDirectMessages_WelcomeMessagesRulesShow.ps1 │ ├── Get-TwitterDirectMessages_WelcomeMessagesShow.ps1 │ ├── Get-TwitterFavorites_List.ps1 │ ├── Get-TwitterFollowers_IDs.ps1 │ ├── Get-TwitterFollowers_List.ps1 │ ├── Get-TwitterFriends_IDs.ps1 │ ├── Get-TwitterFriends_List.ps1 │ ├── Get-TwitterFriendships_Incoming.ps1 │ ├── Get-TwitterFriendships_Lookup.ps1 │ ├── Get-TwitterFriendships_NoRetweetsIds.ps1 │ ├── Get-TwitterFriendships_Outgoing.ps1 │ ├── Get-TwitterFriendships_Show.ps1 │ ├── Get-TwitterGeo_Id_PlaceId.ps1 │ ├── Get-TwitterGeo_ReverseGeocode.ps1 │ ├── Get-TwitterGeo_Search.ps1 │ ├── Get-TwitterHelp_Configuration.ps1 │ ├── Get-TwitterHelp_Languages.ps1 │ ├── Get-TwitterHelp_Privacy.ps1 │ ├── Get-TwitterHelp_Tos.ps1 │ ├── Get-TwitterLists_Members.ps1 │ ├── Get-TwitterLists_MembersShow.ps1 │ ├── Get-TwitterLists_Memberships.ps1 │ ├── Get-TwitterLists_Ownerships.ps1 │ ├── Get-TwitterLists_Show.ps1 │ ├── Get-TwitterLists_Statuses.ps1 │ ├── Get-TwitterLists_Subscribers.ps1 │ ├── Get-TwitterLists_SubscribersShow.ps1 │ ├── Get-TwitterLists_Subscriptions.ps1 │ ├── Get-TwitterLists_list.ps1 │ ├── Get-TwitterMutes_UsersIds.ps1 │ ├── Get-TwitterMutes_UsersList.ps1 │ ├── Get-TwitterOauth_Authenticate.ps1 │ ├── Get-TwitterOauth_Authorize.ps1 │ ├── Get-TwitterSavedSearches_List.ps1 │ ├── Get-TwitterSavedSearches_Show_Id.ps1 │ ├── Get-TwitterStatuses_Lookup.ps1 │ ├── Get-TwitterStatuses_RetweetersIds.ps1 │ ├── Get-TwitterStatuses_RetweetsOfMe.ps1 │ ├── Get-TwitterStatuses_Retweets_Id.ps1 │ ├── Get-TwitterStatuses_Sample.ps1 │ ├── Get-TwitterStatuses_Show_Id.ps1 │ ├── Get-TwitterTrends_Available.ps1 │ ├── Get-TwitterTrends_Closest.ps1 │ ├── Get-TwitterTrends_Place.ps1 │ ├── Get-TwitterUsers_Lookup.ps1 │ ├── Get-TwitterUsers_ProfileBanner.ps1 │ ├── Get-TwitterUsers_Search.ps1 │ ├── Get-TwitterUsers_Show.ps1 │ ├── Get-TwitterUsers_Suggestions.ps1 │ ├── Get-TwitterUsers_Suggestions_Slug.ps1 │ ├── Get-TwitterUsers_Suggestions_SlugMembers.ps1 │ ├── Remove-TwitterCustomProfiles_Destroy.ps1 │ ├── Send-TwitterAccount_RemoveProfileBanner.ps1 │ ├── Send-TwitterAccount_Settings.ps1 │ ├── Send-TwitterAccount_UpdateProfile.ps1 │ ├── Send-TwitterAccount_UpdateProfileBackgroundImage.ps1 │ ├── Send-TwitterAccount_UpdateProfileBanner.ps1 │ ├── Send-TwitterAccount_UpdateProfileImage.ps1 │ ├── Send-TwitterBlocks_Create.ps1 │ ├── Send-TwitterBlocks_Destroy.ps1 │ ├── Send-TwitterCollections_Create.ps1 │ ├── Send-TwitterCollections_Destroy.ps1 │ ├── Send-TwitterCollections_EntriesAdd.ps1 │ ├── Send-TwitterCollections_EntriesCurate.ps1 │ ├── Send-TwitterCollections_EntriesMove.ps1 │ ├── Send-TwitterCollections_EntriesRemove.ps1 │ ├── Send-TwitterCollections_Update.ps1 │ ├── Send-TwitterCustomProfiles_New.Json.ps1 │ ├── Send-TwitterDirectMessages_IndicateTyping.ps1 │ ├── Send-TwitterDirectMessages_MarkRead.ps1 │ ├── Send-TwitterDirectMessages_WelcomeMessagesNew.ps1 │ ├── Send-TwitterDirectMessages_WelcomeMessagesRulesNew.ps1 │ ├── Send-TwitterFavorites_Create.ps1 │ ├── Send-TwitterFavorites_Destroy.ps1 │ ├── Send-TwitterFriendships_Create.ps1 │ ├── Send-TwitterFriendships_Destroy.ps1 │ ├── Send-TwitterFriendships_Update.ps1 │ ├── Send-TwitterLists_Create.ps1 │ ├── Send-TwitterLists_Destroy.ps1 │ ├── Send-TwitterLists_MembersCreate.ps1 │ ├── Send-TwitterLists_MembersCreateAll.ps1 │ ├── Send-TwitterLists_MembersDestroy.ps1 │ ├── Send-TwitterLists_MembersDestroyAll.ps1 │ ├── Send-TwitterLists_SubscribersCreate.ps1 │ ├── Send-TwitterLists_SubscribersDestroy.ps1 │ ├── Send-TwitterLists_Update.ps1 │ ├── Send-TwitterMedia_MetadataCreate.ps1 │ ├── Send-TwitterMedia_SubtitlesCreate.ps1 │ ├── Send-TwitterMedia_SubtitlesDelete.ps1 │ ├── Send-TwitterMedia_Upload.ps1 │ ├── Send-TwitterMutes_UsersCreate.ps1 │ ├── Send-TwitterMutes_UsersDestroy.ps1 │ ├── Send-TwitterOauth2_InvalidateToken.ps1 │ ├── Send-TwitterOauth2_Token.ps1 │ ├── Send-TwitterOauth_AccessToken.ps1 │ ├── Send-TwitterOauth_InvalidateToken.ps1 │ ├── Send-TwitterOauth_RequestToken.ps1 │ ├── Send-TwitterSavedSearches_Create.ps1 │ ├── Send-TwitterSavedSearches_Destroy_Id.ps1 │ ├── Send-TwitterStatuses_Destroy_Id.ps1 │ ├── Send-TwitterStatuses_Filter.ps1 │ ├── Send-TwitterStatuses_Retweet_Id.ps1 │ ├── Send-TwitterStatuses_Unretweet_Id.ps1 │ ├── Send-TwitterStatuses_Update.ps1 │ ├── Send-TwitterStatuses_UpdateWithMedia.ps1 │ └── Send-TwitterUsers_ReportSpam.ps1 ├── README.md ├── Tests ├── PSScriptAnalyzer.Tests.ps1 └── PSTwitterAPI.Tests.ps1 └── azure-pipelines.yml /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.dat 2 | *.log 3 | .vscode/ 4 | output/ 5 | testresults/ 6 | APIHelper/helper/ 7 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | // Available variables which can be used inside of strings. 2 | // ${workspaceRoot}: the root folder of the team 3 | // ${file}: the current opened file 4 | // ${relativeFile}: the current opened file relative to workspaceRoot 5 | // ${fileBasename}: the current opened file's basename 6 | // ${fileDirname}: the current opened file's dirname 7 | // ${fileExtname}: the current opened file's extension 8 | // ${cwd}: the current working directory of the spawned process 9 | { 10 | // See https://go.microsoft.com/fwlink/?LinkId=733558 11 | // for the documentation about the tasks.json format 12 | "version": "2.0.0", 13 | 14 | // Start PowerShell 15 | "windows": { 16 | "command": "${env:windir}/System32/WindowsPowerShell/v1.0/powershell.exe", 17 | //"command": "${env:ProgramFiles}/PowerShell/6.0.0/powershell.exe", 18 | "args": [ "-NoProfile", "-ExecutionPolicy", "Bypass" ] 19 | }, 20 | "linux": { 21 | "command": "/usr/bin/powershell", 22 | "args": [ "-NoProfile" ] 23 | }, 24 | "osx": { 25 | "command": "/usr/local/bin/powershell", 26 | "args": [ "-NoProfile" ] 27 | }, 28 | 29 | // Associate with test task runner 30 | "tasks": [ 31 | { 32 | "taskName": "Test", 33 | "suppressTaskName": true, 34 | "isTestCommand": true, 35 | "args": [ 36 | "Write-Host 'Invoke-Build -Task Test'; $ProgressPreference = 'SilentlyContinue'; Invoke-Build -Task Test;", 37 | "Invoke-Command { Write-Host 'Completed Test task in task runner.' }" 38 | ], 39 | "problemMatcher": "$pester" 40 | } 41 | ] 42 | } 43 | -------------------------------------------------------------------------------- /APIHelper/twitter_api.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkellerman/PSTwitterAPI/fae3e4fd11a083145f54d4d67a25a73a330223b8/APIHelper/twitter_api.json -------------------------------------------------------------------------------- /PSTwitterAPI.bootstrap.ps1: -------------------------------------------------------------------------------- 1 | using namespace Microsoft.PowerShell.Commands 2 | [CmdletBinding()] 3 | param( 4 | # 5 | [ValidateSet("CurrentUser", "AllUsers")] 6 | $Scope = "CurrentUser" 7 | ) 8 | 9 | [ModuleSpecification[]]$RequiredModules = @( 10 | @{ ModuleName = "InvokeBuild"; RequiredVersion = "5.4.2" } 11 | @{ ModuleName = "Pester"; RequiredVersion = "4.4.4" } 12 | @{ ModuleName = "BuildHelpers"; RequiredVersion = "2.0.3" } 13 | @{ ModuleName = "PSScriptAnalyzer"; RequiredVersion = "1.17.1" } 14 | ) 15 | 16 | $Policy = (Get-PSRepository PSGallery).InstallationPolicy 17 | Set-PSRepository PSGallery -InstallationPolicy Trusted 18 | 19 | try { 20 | $RequiredModules | Install-Module -Scope $Scope -Repository PSGallery -SkipPublisherCheck -Verbose 21 | } finally { 22 | Set-PSRepository PSGallery -InstallationPolicy $Policy 23 | } 24 | 25 | $RequiredModules | Import-Module -------------------------------------------------------------------------------- /PSTwitterAPI/PSTwitterAPI.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkellerman/PSTwitterAPI/fae3e4fd11a083145f54d4d67a25a73a330223b8/PSTwitterAPI/PSTwitterAPI.psd1 -------------------------------------------------------------------------------- /PSTwitterAPI/PSTwitterAPI.psm1: -------------------------------------------------------------------------------- 1 | $Script:OAuthCollection = [System.Collections.ArrayList]@() 2 | 3 | $Script:EndPointBaseUrl = 'https://api.twitter.com/1.1' 4 | $Script:EndPointFileFormat = 'json' 5 | 6 | $Script:CmdletBindingParameters = @('Verbose','Debug','ErrorAction','WarningAction','InformationAction','ErrorVariable','WarningVariable','InformationVariable','OutVariable','OutBuffer','PipelineVariable') 7 | 8 | #Get public and private function definition files. 9 | $Public = @( Get-ChildItem -Path $PSScriptRoot\public\*.ps1 -Recurse -ErrorAction SilentlyContinue ) 10 | $Private = @( Get-ChildItem -Path $PSScriptRoot\private\*.ps1 -ErrorAction SilentlyContinue ) 11 | 12 | #Dot source the files. 13 | Foreach ($import in @($Public + $Private)) { 14 | Try { 15 | . $import.fullname 16 | } 17 | Catch { 18 | Write-Error -Message "Failed to import function $($import.fullname): $_" 19 | } 20 | } 21 | 22 | Export-ModuleMember -Function $Public.Basename 23 | -------------------------------------------------------------------------------- /PSTwitterAPI/private/ConvertFrom-RateLimitStatus.ps1: -------------------------------------------------------------------------------- 1 | function ConvertFrom-RateLimitStatus ($RateLimitStatus) { 2 | 3 | $Eposh = Get-Eposh 4 | 5 | $RateLimitStatus.resources.PSObject.Properties | ForEach-Object { 6 | $_.value | ForEach-Object { 7 | $_.PSObject.Properties | ForEach-Object { 8 | $_ | Select-Object @{ n='accesstoken'; e={ $RateLimitStatus.rate_limit_context.access_token }}, 9 | @{ n='resource'; e={ $_.name }}, 10 | @{ n='limit'; e={ $_.value.limit }}, 11 | @{ n='remaining'; e={ $_.value.remaining }}, 12 | @{ n='reset'; e={ $_.value.reset }} 13 | } 14 | } 15 | } 16 | 17 | # No idea why, but '/statuses/update' is missing from the RateLimitStatus result. 18 | "/statuses/update" | Select-Object @{ n='accesstoken'; e={ $RateLimitStatus.rate_limit_context.access_token }}, 19 | @{ n='resource'; e={ $_ }}, 20 | @{ n='limit'; e={ 15 }}, 21 | @{ n='remaining'; e={ 15 }}, 22 | @{ n='reset'; e={ $Eposh.TotalSeconds }} 23 | 24 | } -------------------------------------------------------------------------------- /PSTwitterAPI/private/Get-Eposh.ps1: -------------------------------------------------------------------------------- 1 | function Get-Eposh { 2 | 3 | [CmdletBinding()] 4 | Param ( 5 | [int]$Eposh 6 | ) 7 | 8 | Process { 9 | 10 | If ($Eposh) { 11 | [timezone]::CurrentTimeZone.ToLocalTime(([datetime]'1/1/1970').AddSeconds($Eposh)) 12 | } Else { 13 | $unixEpochStart = New-Object DateTime 1970,1,1,0,0,0,([DateTimeKind]::Utc) 14 | [DateTime]::UtcNow - $unixEpochStart 15 | } 16 | 17 | } 18 | 19 | } -------------------------------------------------------------------------------- /PSTwitterAPI/public/Get-TwitterOAuthSettings.ps1: -------------------------------------------------------------------------------- 1 | function Get-TwitterOAuthSettings { 2 | 3 | [CmdletBinding()] 4 | Param($Resource, $AccessToken, [switch]$Quiet) 5 | 6 | If ($Resource) { 7 | 8 | # Get the next available OAuth with available resources 9 | $RateLimitStatus = $Script:OAuthCollection.RateLimitStatus | 10 | Where-Object { $_.resource -eq "$Resource" } | 11 | Sort-Object @{expression="remaining";Descending=$true}, @{expression="reset";Ascending=$true} | 12 | Select-Object -First 1 | 13 | ForEach-Object { $_.remaining += -1; Return $_ } 14 | 15 | Write-Verbose "resource: $($RateLimitStatus.resource), limit: $($RateLimitStatus.limit), remaining: $($RateLimitStatus.remaining), reset: $($RateLimitStatus.reset)" 16 | 17 | $AccessToken = $RateLimitStatus.AccessToken 18 | 19 | If ($RateLimitStatus.remaining -lt 0) { 20 | 21 | # Refresh the RateLimitStatus so we throttle an accurate value 22 | $OAuthSettings = $Script:OAuthCollection.Where({$_.AccessToken -eq $AccessToken}) | Select-Object -First 1 23 | $OAuthSettings = Set-TwitterOAuthSettings -ApiKey $OAuthSettings.ApiKey -ApiSecret $OAuthSettings.ApiSecret -AccessToken $OAuthSettings.AccessToken -AccessTokenSecret $OAuthSettings.AccessTokenSecret -PassThru -Force 24 | 25 | $RateLimitStatus = $OAuthSettings.RateLimitStatus | Where-Object { $_.resource -eq "$Resource" } | 26 | ForEach-Object { $_.remaining += -1; Return $_ } 27 | 28 | If ($RateLimitStatus.remaining -lt 0) { 29 | 30 | # Throttle... you're going way too fast cowboy! 31 | $SleepSeconds = $RateLimitStatus.reset - (Get-Eposh).TotalSeconds + 1 32 | Write-Warning "Throttling for ${SleepSeconds} seconds." 33 | Start-Sleep -Seconds $SleepSeconds 34 | 35 | } 36 | 37 | } 38 | 39 | 40 | } 41 | 42 | 43 | If ($AccessToken) { 44 | $OAuthSettings = $Script:OAuthCollection.Where({$_.AccessToken -eq $AccessToken}) | Select-Object -First 1 45 | } Else { 46 | $OAuthSettings = $Script:OAuthCollection | Select-Object -First 1 47 | } 48 | 49 | 50 | If ($OAuthSettings) { 51 | Write-Verbose "Using AccessToken '$($OAuthSettings.AccessToken)'" 52 | $OAuthSettings = @{ 53 | ApiKey = $OAuthSettings.ApiKey 54 | ApiSecret = $OAuthSettings.ApiSecret 55 | AccessToken = $OAuthSettings.AccessToken 56 | AccessTokenSecret = $OAuthSettings.AccessTokenSecret 57 | } 58 | Return $OAuthSettings 59 | } 60 | 61 | If ($Quiet.IsPresent -eq $false) { 62 | Throw "No OAuthSettings was found. Use 'Set-TwitterOAuthSettings' to set PSTwitterAPI ApiKey & Token." 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /PSTwitterAPI/public/Invoke-TwitterAPI.ps1: -------------------------------------------------------------------------------- 1 | function Invoke-TwitterAPI { 2 | 3 | [CmdletBinding()] 4 | Param( 5 | [Parameter(Mandatory)] 6 | [string]$ResourceUrl, 7 | [Parameter(Mandatory)] 8 | [string]$Method, 9 | [Parameter(Mandatory=$false)] 10 | $Parameters, 11 | [Parameter(Mandatory=$false)] 12 | $Body, 13 | [Parameter(Mandatory)] 14 | $OAuthSettings 15 | ) 16 | 17 | $OAuthParameters_Params = @{} 18 | $OAuthParameters_Params['ApiKey'] = $OAuthSettings.ApiKey 19 | $OAuthParameters_Params['ApiSecret'] = $OAuthSettings.ApiSecret 20 | $OAuthParameters_Params['AccessToken'] = $OAuthSettings.AccessToken 21 | $OAuthParameters_Params['AccessTokenSecret'] = $OAuthSettings.AccessTokenSecret 22 | $OAuthParameters_Params['Method'] = $Method 23 | $OAuthParameters_Params['ResourceUrl'] = $ResourceUrl 24 | $OAuthParameters_Params['Parameters'] = $Parameters 25 | $OAuthParameters_Params['Body'] = $Body 26 | $OAuthParameters = Get-OAuthParameters @OAuthParameters_Params 27 | 28 | $RestMethod_Params = @{} 29 | $RestMethod_Params['Uri'] = $OAuthParameters.endpoint_url 30 | $RestMethod_Params['Method'] = $OAuthParameters.endpoint_method 31 | $RestMethod_Params['Headers'] = @{ 'Authorization' = $OAuthParameters.endpoint_authorization } 32 | $RestMethod_Params['ContentType'] = $OAuthParameters.endpoint_contenttype 33 | $RestMethod_Params['Body'] = $OAuthParameters.endpoint_body 34 | Invoke-RestMethod @RestMethod_Params 35 | 36 | } -------------------------------------------------------------------------------- /PSTwitterAPI/public/Send-TwitterDirectMessages_EventsNew.ps1: -------------------------------------------------------------------------------- 1 | function Send-TwitterDirectMessages_EventsNew { 2 | <# 3 | .SYNOPSIS 4 | Sending and receiving events 5 | 6 | .DESCRIPTION 7 | POST direct_messages/events/new (message_create) 8 | 9 | Publishes a new message_create event resulting in a Direct Message sent to a specified user from the authenticating user. Returns an event if successful. Supports publishing Direct Messages with optional Quick Reply and media attachment. Replaces behavior currently provided by POST direct_messages/new. 10 | 11 | Requires a JSON POST body and Content-Type header to be set to application/json. Setting Content-Length may also be required if it is not automatically. 12 | 13 | 14 | .NOTES 15 | This helper function was generated by the information provided here: 16 | https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/new-event 17 | 18 | #> 19 | [CmdletBinding()] 20 | Param( 21 | [string]$type = 'message_create', 22 | [string]$recipient_id, 23 | [string]$text 24 | ) 25 | Begin { 26 | 27 | [hashtable]$Parameters = $PSBoundParameters 28 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 29 | 30 | [string]$Method = 'POST' 31 | [string]$Resource = '/direct_messages/events/new' 32 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/direct_messages/events/new.json' 33 | 34 | } 35 | Process { 36 | 37 | $Body = @{ 38 | event = @{ 39 | type = $type 40 | message_create = @{ 41 | target = @{ recipient_id = $Parameters['recipient_id'] } 42 | message_data = @{ text = $Parameters['text'] } 43 | } 44 | } 45 | } 46 | 47 | # Find & Replace any ResourceUrl parameters. 48 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 17 | [CmdletBinding()] 18 | Param( 19 | 20 | ) 21 | Begin { 22 | 23 | [hashtable]$Parameters = $PSBoundParameters 24 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 25 | 26 | [string]$Method = 'GET' 27 | [string]$Resource = '/account/settings' 28 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/account/settings.json' 29 | 30 | } 31 | Process { 32 | 33 | # Find & Replace any ResourceUrl parameters. 34 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 25 | [CmdletBinding()] 26 | Param( 27 | [string]$stringify_ids, 28 | [string]$cursor 29 | ) 30 | Begin { 31 | 32 | [hashtable]$Parameters = $PSBoundParameters 33 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 34 | 35 | [string]$Method = 'GET' 36 | [string]$Resource = '/blocks/ids' 37 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/blocks/ids.json' 38 | 39 | } 40 | Process { 41 | 42 | # Find & Replace any ResourceUrl parameters. 43 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 28 | [CmdletBinding()] 29 | Param( 30 | [string]$include_entities, 31 | [string]$skip_status, 32 | [string]$cursor 33 | ) 34 | Begin { 35 | 36 | [hashtable]$Parameters = $PSBoundParameters 37 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 38 | 39 | [string]$Method = 'GET' 40 | [string]$Resource = '/blocks/list' 41 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/blocks/list.json' 42 | 43 | } 44 | Process { 45 | 46 | # Find & Replace any ResourceUrl parameters. 47 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 32 | [CmdletBinding()] 33 | Param( 34 | [string]$id, 35 | [string]$count, 36 | [string]$max_position, 37 | [string]$min_position 38 | ) 39 | Begin { 40 | 41 | [hashtable]$Parameters = $PSBoundParameters 42 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 43 | 44 | [string]$Method = 'GET' 45 | [string]$Resource = '/collections/entries' 46 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/collections/entries.json' 47 | 48 | } 49 | Process { 50 | 51 | # Find & Replace any ResourceUrl parameters. 52 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 33 | [CmdletBinding()] 34 | Param( 35 | [string]$user_id, 36 | [string]$screen_name, 37 | [string]$tweet_id, 38 | [string]$count, 39 | [string]$cursor 40 | ) 41 | Begin { 42 | 43 | [hashtable]$Parameters = $PSBoundParameters 44 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 45 | 46 | [string]$Method = 'GET' 47 | [string]$Resource = '/collections/list' 48 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/collections/list.json' 49 | 50 | } 51 | Process { 52 | 53 | # Find & Replace any ResourceUrl parameters. 54 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 19 | [CmdletBinding()] 20 | Param( 21 | [string]$id 22 | ) 23 | Begin { 24 | 25 | [hashtable]$Parameters = $PSBoundParameters 26 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 27 | 28 | [string]$Method = 'GET' 29 | [string]$Resource = '/collections/show' 30 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/collections/show.json' 31 | 32 | } 33 | Process { 34 | 35 | # Find & Replace any ResourceUrl parameters. 36 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 22 | [CmdletBinding()] 23 | Param( 24 | [string]$count, 25 | [string]$cursor 26 | ) 27 | Begin { 28 | 29 | [hashtable]$Parameters = $PSBoundParameters 30 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 31 | 32 | [string]$Method = 'GET' 33 | [string]$Resource = '/custom_profiles/list' 34 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/custom_profiles/list.json' 35 | 36 | } 37 | Process { 38 | 39 | # Find & Replace any ResourceUrl parameters. 40 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 19 | [CmdletBinding()] 20 | Param( 21 | [string]$id 22 | ) 23 | Begin { 24 | 25 | [hashtable]$Parameters = $PSBoundParameters 26 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 27 | 28 | [string]$Method = 'GET' 29 | [string]$Resource = '/custom_profiles/:id' 30 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/custom_profiles/:id.json' 31 | 32 | } 33 | Process { 34 | 35 | # Find & Replace any ResourceUrl parameters. 36 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 22 | [CmdletBinding()] 23 | Param( 24 | [string]$count, 25 | [string]$cursor 26 | ) 27 | Begin { 28 | 29 | [hashtable]$Parameters = $PSBoundParameters 30 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 31 | 32 | [string]$Method = 'GET' 33 | [string]$Resource = '/direct_messages/events/list' 34 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/direct_messages/events/list.json' 35 | 36 | } 37 | Process { 38 | 39 | # Find & Replace any ResourceUrl parameters. 40 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 19 | [CmdletBinding()] 20 | Param( 21 | [string]$id 22 | ) 23 | Begin { 24 | 25 | [hashtable]$Parameters = $PSBoundParameters 26 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 27 | 28 | [string]$Method = 'GET' 29 | [string]$Resource = '/direct_messages/events/show' 30 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/direct_messages/events/show.json' 31 | 32 | } 33 | Process { 34 | 35 | # Find & Replace any ResourceUrl parameters. 36 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 22 | [CmdletBinding()] 23 | Param( 24 | [string]$count, 25 | [string]$cursor 26 | ) 27 | Begin { 28 | 29 | [hashtable]$Parameters = $PSBoundParameters 30 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 31 | 32 | [string]$Method = 'GET' 33 | [string]$Resource = '/direct_messages/welcome_messages/list' 34 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/direct_messages/welcome_messages/list.json' 35 | 36 | } 37 | Process { 38 | 39 | # Find & Replace any ResourceUrl parameters. 40 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 22 | [CmdletBinding()] 23 | Param( 24 | [string]$count, 25 | [string]$cursor 26 | ) 27 | Begin { 28 | 29 | [hashtable]$Parameters = $PSBoundParameters 30 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 31 | 32 | [string]$Method = 'GET' 33 | [string]$Resource = '/direct_messages/welcome_messages/rules/list' 34 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/direct_messages/welcome_messages/rules/list.json' 35 | 36 | } 37 | Process { 38 | 39 | # Find & Replace any ResourceUrl parameters. 40 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 19 | [CmdletBinding()] 20 | Param( 21 | [string]$id 22 | ) 23 | Begin { 24 | 25 | [hashtable]$Parameters = $PSBoundParameters 26 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 27 | 28 | [string]$Method = 'GET' 29 | [string]$Resource = '/direct_messages/welcome_messages/rules/show' 30 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/direct_messages/welcome_messages/rules/show.json' 31 | 32 | } 33 | Process { 34 | 35 | # Find & Replace any ResourceUrl parameters. 36 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 19 | [CmdletBinding()] 20 | Param( 21 | [string]$id 22 | ) 23 | Begin { 24 | 25 | [hashtable]$Parameters = $PSBoundParameters 26 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 27 | 28 | [string]$Method = 'GET' 29 | [string]$Resource = '/direct_messages/welcome_messages/show' 30 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/direct_messages/welcome_messages/show.json' 31 | 32 | } 33 | Process { 34 | 35 | # Find & Replace any ResourceUrl parameters. 36 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 36 | [CmdletBinding()] 37 | Param( 38 | [string]$user_id, 39 | [string]$screen_name, 40 | [string]$count, 41 | [string]$since_id, 42 | [string]$max_id, 43 | [string]$include_entities 44 | ) 45 | Begin { 46 | 47 | [hashtable]$Parameters = $PSBoundParameters 48 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 49 | 50 | [string]$Method = 'GET' 51 | [string]$Resource = '/favorites/list' 52 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/favorites/list.json' 53 | 54 | } 55 | Process { 56 | 57 | # Find & Replace any ResourceUrl parameters. 58 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 23 | [CmdletBinding()] 24 | Param( 25 | [string]$cursor, 26 | [string]$stringify_ids 27 | ) 28 | Begin { 29 | 30 | [hashtable]$Parameters = $PSBoundParameters 31 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 32 | 33 | [string]$Method = 'GET' 34 | [string]$Resource = '/friendships/incoming' 35 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/friendships/incoming.json' 36 | 37 | } 38 | Process { 39 | 40 | # Find & Replace any ResourceUrl parameters. 41 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 22 | [CmdletBinding()] 23 | Param( 24 | [string]$screen_name, 25 | [string]$user_id 26 | ) 27 | Begin { 28 | 29 | [hashtable]$Parameters = $PSBoundParameters 30 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 31 | 32 | [string]$Method = 'GET' 33 | [string]$Resource = '/friendships/lookup' 34 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/friendships/lookup.json' 35 | 36 | } 37 | Process { 38 | 39 | # Find & Replace any ResourceUrl parameters. 40 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 21 | [CmdletBinding()] 22 | Param( 23 | [string]$stringify_ids 24 | ) 25 | Begin { 26 | 27 | [hashtable]$Parameters = $PSBoundParameters 28 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 29 | 30 | [string]$Method = 'GET' 31 | [string]$Resource = '/friendships/no_retweets/ids' 32 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/friendships/no_retweets/ids.json' 33 | 34 | } 35 | Process { 36 | 37 | # Find & Replace any ResourceUrl parameters. 38 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 23 | [CmdletBinding()] 24 | Param( 25 | [string]$cursor, 26 | [string]$stringify_ids 27 | ) 28 | Begin { 29 | 30 | [hashtable]$Parameters = $PSBoundParameters 31 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 32 | 33 | [string]$Method = 'GET' 34 | [string]$Resource = '/friendships/outgoing' 35 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/friendships/outgoing.format' 36 | 37 | } 38 | Process { 39 | 40 | # Find & Replace any ResourceUrl parameters. 41 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 28 | [CmdletBinding()] 29 | Param( 30 | [string]$source_id, 31 | [string]$source_screen_name, 32 | [string]$target_id, 33 | [string]$target_screen_name 34 | ) 35 | Begin { 36 | 37 | [hashtable]$Parameters = $PSBoundParameters 38 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 39 | 40 | [string]$Method = 'GET' 41 | [string]$Resource = '/friendships/show' 42 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/friendships/show.json' 43 | 44 | } 45 | Process { 46 | 47 | # Find & Replace any ResourceUrl parameters. 48 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 19 | [CmdletBinding()] 20 | Param( 21 | [string]$place_id 22 | ) 23 | Begin { 24 | 25 | [hashtable]$Parameters = $PSBoundParameters 26 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 27 | 28 | [string]$Method = 'GET' 29 | [string]$Resource = '/geo/id/:place_id' 30 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/geo/id/:place_id.json' 31 | 32 | } 33 | Process { 34 | 35 | # Find & Replace any ResourceUrl parameters. 36 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 19 | [CmdletBinding()] 20 | Param( 21 | 22 | ) 23 | Begin { 24 | 25 | [hashtable]$Parameters = $PSBoundParameters 26 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 27 | 28 | [string]$Method = 'GET' 29 | [string]$Resource = '/help/configuration' 30 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/help/configuration.json' 31 | 32 | } 33 | Process { 34 | 35 | # Find & Replace any ResourceUrl parameters. 36 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 19 | [CmdletBinding()] 20 | Param( 21 | 22 | ) 23 | Begin { 24 | 25 | [hashtable]$Parameters = $PSBoundParameters 26 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 27 | 28 | [string]$Method = 'GET' 29 | [string]$Resource = '/help/languages' 30 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/help/languages.json' 31 | 32 | } 33 | Process { 34 | 35 | # Find & Replace any ResourceUrl parameters. 36 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 17 | [CmdletBinding()] 18 | Param( 19 | 20 | ) 21 | Begin { 22 | 23 | [hashtable]$Parameters = $PSBoundParameters 24 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 25 | 26 | [string]$Method = 'GET' 27 | [string]$Resource = '/help/privacy' 28 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/help/privacy.json' 29 | 30 | } 31 | Process { 32 | 33 | # Find & Replace any ResourceUrl parameters. 34 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 17 | [CmdletBinding()] 18 | Param( 19 | 20 | ) 21 | Begin { 22 | 23 | [hashtable]$Parameters = $PSBoundParameters 24 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 25 | 26 | [string]$Method = 'GET' 27 | [string]$Resource = '/help/tos' 28 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/help/tos.json' 29 | 30 | } 31 | Process { 32 | 33 | # Find & Replace any ResourceUrl parameters. 34 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 31 | [CmdletBinding()] 32 | Param( 33 | [string]$user_id, 34 | [string]$screen_name, 35 | [string]$count, 36 | [string]$cursor, 37 | [string]$filter_to_owned_lists 38 | ) 39 | Begin { 40 | 41 | [hashtable]$Parameters = $PSBoundParameters 42 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 43 | 44 | [string]$Method = 'GET' 45 | [string]$Resource = '/lists/memberships' 46 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/lists/memberships.json' 47 | 48 | } 49 | Process { 50 | 51 | # Find & Replace any ResourceUrl parameters. 52 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 28 | [CmdletBinding()] 29 | Param( 30 | [string]$user_id, 31 | [string]$screen_name, 32 | [string]$count, 33 | [string]$cursor 34 | ) 35 | Begin { 36 | 37 | [hashtable]$Parameters = $PSBoundParameters 38 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 39 | 40 | [string]$Method = 'GET' 41 | [string]$Resource = '/lists/ownerships' 42 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/lists/ownerships.json' 43 | 44 | } 45 | Process { 46 | 47 | # Find & Replace any ResourceUrl parameters. 48 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 28 | [CmdletBinding()] 29 | Param( 30 | [string]$list_id, 31 | [string]$slug, 32 | [string]$owner_screen_name, 33 | [string]$owner_id 34 | ) 35 | Begin { 36 | 37 | [hashtable]$Parameters = $PSBoundParameters 38 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 39 | 40 | [string]$Method = 'GET' 41 | [string]$Resource = '/lists/show' 42 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/lists/show.json' 43 | 44 | } 45 | Process { 46 | 47 | # Find & Replace any ResourceUrl parameters. 48 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 28 | [CmdletBinding()] 29 | Param( 30 | [string]$user_id, 31 | [string]$screen_name, 32 | [string]$count, 33 | [string]$cursor 34 | ) 35 | Begin { 36 | 37 | [hashtable]$Parameters = $PSBoundParameters 38 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 39 | 40 | [string]$Method = 'GET' 41 | [string]$Resource = '/lists/subscriptions' 42 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/lists/subscriptions.json' 43 | 44 | } 45 | Process { 46 | 47 | # Find & Replace any ResourceUrl parameters. 48 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 27 | [CmdletBinding()] 28 | Param( 29 | [string]$user_id, 30 | [string]$screen_name, 31 | [string]$reverse 32 | ) 33 | Begin { 34 | 35 | [hashtable]$Parameters = $PSBoundParameters 36 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 37 | 38 | [string]$Method = 'GET' 39 | [string]$Resource = '/lists/list' 40 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/lists/list.json' 41 | 42 | } 43 | Process { 44 | 45 | # Find & Replace any ResourceUrl parameters. 46 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 23 | [CmdletBinding()] 24 | Param( 25 | [string]$stringify_ids, 26 | [string]$cursor 27 | ) 28 | Begin { 29 | 30 | [hashtable]$Parameters = $PSBoundParameters 31 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 32 | 33 | [string]$Method = 'GET' 34 | [string]$Resource = '/mutes/users/ids' 35 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/mutes/users/ids.json' 36 | 37 | } 38 | Process { 39 | 40 | # Find & Replace any ResourceUrl parameters. 41 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 26 | [CmdletBinding()] 27 | Param( 28 | [string]$cursor, 29 | [string]$include_entities, 30 | [string]$skip_status 31 | ) 32 | Begin { 33 | 34 | [hashtable]$Parameters = $PSBoundParameters 35 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 36 | 37 | [string]$Method = 'GET' 38 | [string]$Resource = '/mutes/users/list' 39 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/mutes/users/list.json' 40 | 41 | } 42 | Process { 43 | 44 | # Find & Replace any ResourceUrl parameters. 45 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 26 | [CmdletBinding()] 27 | Param( 28 | [string]$force_login, 29 | [string]$screen_name 30 | ) 31 | Begin { 32 | 33 | [hashtable]$Parameters = $PSBoundParameters 34 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 35 | 36 | [string]$Method = 'GET' 37 | [string]$Resource = '/oauth/authenticate' 38 | [string]$ResourceUrl = 'https://api.twitter.com/oauth/authenticate' 39 | 40 | } 41 | Process { 42 | 43 | # Find & Replace any ResourceUrl parameters. 44 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 24 | [CmdletBinding()] 25 | Param( 26 | [string]$force_login, 27 | [string]$screen_name 28 | ) 29 | Begin { 30 | 31 | [hashtable]$Parameters = $PSBoundParameters 32 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 33 | 34 | [string]$Method = 'GET' 35 | [string]$Resource = '/oauth/authorize' 36 | [string]$ResourceUrl = 'https://api.twitter.com/oauth/authorize' 37 | 38 | } 39 | Process { 40 | 41 | # Find & Replace any ResourceUrl parameters. 42 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 17 | [CmdletBinding()] 18 | Param( 19 | 20 | ) 21 | Begin { 22 | 23 | [hashtable]$Parameters = $PSBoundParameters 24 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 25 | 26 | [string]$Method = 'GET' 27 | [string]$Resource = '/saved_searches/list' 28 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/saved_searches/list.json' 29 | 30 | } 31 | Process { 32 | 33 | # Find & Replace any ResourceUrl parameters. 34 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 19 | [CmdletBinding()] 20 | Param( 21 | [string]$id 22 | ) 23 | Begin { 24 | 25 | [hashtable]$Parameters = $PSBoundParameters 26 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 27 | 28 | [string]$Method = 'GET' 29 | [string]$Resource = '/saved_searches/show/:id' 30 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/saved_searches/show/:id.json' 31 | 32 | } 33 | Process { 34 | 35 | # Find & Replace any ResourceUrl parameters. 36 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 32 | [CmdletBinding()] 33 | Param( 34 | [string]$id, 35 | [string]$count, 36 | [string]$cursor, 37 | [string]$stringify_ids 38 | ) 39 | Begin { 40 | 41 | [hashtable]$Parameters = $PSBoundParameters 42 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 43 | 44 | [string]$Method = 'GET' 45 | [string]$Resource = '/statuses/retweeters/ids' 46 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/statuses/retweeters/ids.json' 47 | 48 | } 49 | Process { 50 | 51 | # Find & Replace any ResourceUrl parameters. 52 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 25 | [CmdletBinding()] 26 | Param( 27 | [string]$id, 28 | [string]$count, 29 | [string]$trim_user 30 | ) 31 | Begin { 32 | 33 | [hashtable]$Parameters = $PSBoundParameters 34 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 35 | 36 | [string]$Method = 'GET' 37 | [string]$Resource = '/statuses/retweets/:id' 38 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/statuses/retweets/:id.json' 39 | 40 | } 41 | Process { 42 | 43 | # Find & Replace any ResourceUrl parameters. 44 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 22 | [CmdletBinding()] 23 | Param( 24 | [string]$delimited, 25 | [string]$stall_warnings 26 | ) 27 | Begin { 28 | 29 | [hashtable]$Parameters = $PSBoundParameters 30 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 31 | 32 | [string]$Method = 'GET' 33 | [string]$Resource = '/statuses/sample' 34 | [string]$ResourceUrl = 'https://stream.twitter.com/1.1/statuses/sample.json' 35 | 36 | } 37 | Process { 38 | 39 | # Find & Replace any ResourceUrl parameters. 40 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 21 | [CmdletBinding()] 22 | Param( 23 | 24 | ) 25 | Begin { 26 | 27 | [hashtable]$Parameters = $PSBoundParameters 28 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 29 | 30 | [string]$Method = 'GET' 31 | [string]$Resource = '/trends/available' 32 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/trends/available.json' 33 | 34 | } 35 | Process { 36 | 37 | # Find & Replace any ResourceUrl parameters. 38 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 26 | [CmdletBinding()] 27 | Param( 28 | [string]$lat, 29 | [string]$long 30 | ) 31 | Begin { 32 | 33 | [hashtable]$Parameters = $PSBoundParameters 34 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 35 | 36 | [string]$Method = 'GET' 37 | [string]$Resource = '/trends/closest' 38 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/trends/closest.json' 39 | 40 | } 41 | Process { 42 | 43 | # Find & Replace any ResourceUrl parameters. 44 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 28 | [CmdletBinding()] 29 | Param( 30 | [string]$id, 31 | [string]$exclude 32 | ) 33 | Begin { 34 | 35 | [hashtable]$Parameters = $PSBoundParameters 36 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 37 | 38 | [string]$Method = 'GET' 39 | [string]$Resource = '/trends/place' 40 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/trends/place.json' 41 | 42 | } 43 | Process { 44 | 45 | # Find & Replace any ResourceUrl parameters. 46 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 24 | [CmdletBinding()] 25 | Param( 26 | [string]$user_id, 27 | [string]$screen_name 28 | ) 29 | Begin { 30 | 31 | [hashtable]$Parameters = $PSBoundParameters 32 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 33 | 34 | [string]$Method = 'GET' 35 | [string]$Resource = '/users/profile_banner' 36 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/users/profile_banner.json' 37 | 38 | } 39 | Process { 40 | 41 | # Find & Replace any ResourceUrl parameters. 42 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 30 | [CmdletBinding()] 31 | Param( 32 | [string]$q, 33 | [string]$page, 34 | [string]$count, 35 | [string]$include_entities 36 | ) 37 | Begin { 38 | 39 | [hashtable]$Parameters = $PSBoundParameters 40 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 41 | 42 | [string]$Method = 'GET' 43 | [string]$Resource = '/users/search' 44 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/users/search.json' 45 | 46 | } 47 | Process { 48 | 49 | # Find & Replace any ResourceUrl parameters. 50 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 29 | [CmdletBinding()] 30 | Param( 31 | [string]$user_id, 32 | [string]$screen_name, 33 | [string]$include_entities 34 | ) 35 | Begin { 36 | 37 | [hashtable]$Parameters = $PSBoundParameters 38 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 39 | 40 | [string]$Method = 'GET' 41 | [string]$Resource = '/users/show' 42 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/users/show.json' 43 | 44 | } 45 | Process { 46 | 47 | # Find & Replace any ResourceUrl parameters. 48 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 17 | [CmdletBinding()] 18 | Param( 19 | [string]$lang 20 | ) 21 | Begin { 22 | 23 | [hashtable]$Parameters = $PSBoundParameters 24 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 25 | 26 | [string]$Method = 'GET' 27 | [string]$Resource = '/users/suggestions' 28 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/users/suggestions.json' 29 | 30 | } 31 | Process { 32 | 33 | # Find & Replace any ResourceUrl parameters. 34 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 22 | [CmdletBinding()] 23 | Param( 24 | [string]$slug, 25 | [string]$lang 26 | ) 27 | Begin { 28 | 29 | [hashtable]$Parameters = $PSBoundParameters 30 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 31 | 32 | [string]$Method = 'GET' 33 | [string]$Resource = '/users/suggestions/:slug' 34 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/users/suggestions/:slug.json' 35 | 36 | } 37 | Process { 38 | 39 | # Find & Replace any ResourceUrl parameters. 40 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 19 | [CmdletBinding()] 20 | Param( 21 | [string]$slug 22 | ) 23 | Begin { 24 | 25 | [hashtable]$Parameters = $PSBoundParameters 26 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 27 | 28 | [string]$Method = 'GET' 29 | [string]$Resource = '/users/suggestions/:slug/members' 30 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/users/suggestions/:slug/members.json' 31 | 32 | } 33 | Process { 34 | 35 | # Find & Replace any ResourceUrl parameters. 36 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 19 | [CmdletBinding()] 20 | Param( 21 | [string]$id 22 | ) 23 | Begin { 24 | 25 | [hashtable]$Parameters = $PSBoundParameters 26 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 27 | 28 | [string]$Method = 'DELETE' 29 | [string]$Resource = '/custom_profiles/destroy' 30 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/custom_profiles/destroy.json' 31 | 32 | } 33 | Process { 34 | 35 | # Find & Replace any ResourceUrl parameters. 36 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 17 | [CmdletBinding()] 18 | Param( 19 | 20 | ) 21 | Begin { 22 | 23 | [hashtable]$Parameters = $PSBoundParameters 24 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 25 | 26 | [string]$Method = 'POST' 27 | [string]$Resource = '/account/remove_profile_banner' 28 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/account/remove_profile_banner.json' 29 | 30 | } 31 | Process { 32 | 33 | # Find & Replace any ResourceUrl parameters. 34 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 34 | [CmdletBinding()] 35 | Param( 36 | [string]$url, 37 | [string]$location, 38 | [string]$description, 39 | [string]$profile_link_color, 40 | [string]$include_entities, 41 | [string]$skip_status 42 | ) 43 | Begin { 44 | 45 | [hashtable]$Parameters = $PSBoundParameters 46 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 47 | 48 | [string]$Method = 'POST' 49 | [string]$Resource = '/account/update_profile' 50 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/account/update_profile.json' 51 | 52 | } 53 | Process { 54 | 55 | # Find & Replace any ResourceUrl parameters. 56 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 27 | [CmdletBinding()] 28 | Param( 29 | [string]$image, 30 | [string]$include_entities, 31 | [string]$skip_status 32 | ) 33 | Begin { 34 | 35 | [hashtable]$Parameters = $PSBoundParameters 36 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 37 | 38 | [string]$Method = 'POST' 39 | [string]$Resource = '/account/update_profile_image' 40 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/account/update_profile_image.json' 41 | 42 | } 43 | Process { 44 | 45 | # Find & Replace any ResourceUrl parameters. 46 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 30 | [CmdletBinding()] 31 | Param( 32 | [string]$screen_name, 33 | [string]$user_id, 34 | [string]$include_entities, 35 | [string]$skip_status 36 | ) 37 | Begin { 38 | 39 | [hashtable]$Parameters = $PSBoundParameters 40 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 41 | 42 | [string]$Method = 'POST' 43 | [string]$Resource = '/blocks/create' 44 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/blocks/create.json' 45 | 46 | } 47 | Process { 48 | 49 | # Find & Replace any ResourceUrl parameters. 50 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 28 | [CmdletBinding()] 29 | Param( 30 | [string]$screen_name, 31 | [string]$user_id, 32 | [string]$include_entities, 33 | [string]$skip_status 34 | ) 35 | Begin { 36 | 37 | [hashtable]$Parameters = $PSBoundParameters 38 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 39 | 40 | [string]$Method = 'POST' 41 | [string]$Resource = '/blocks/destroy' 42 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/blocks/destroy.json' 43 | 44 | } 45 | Process { 46 | 47 | # Find & Replace any ResourceUrl parameters. 48 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 27 | [CmdletBinding()] 28 | Param( 29 | [string]$description, 30 | [string]$url, 31 | [string]$timeline_order 32 | ) 33 | Begin { 34 | 35 | [hashtable]$Parameters = $PSBoundParameters 36 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 37 | 38 | [string]$Method = 'POST' 39 | [string]$Resource = '/collections/create' 40 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/collections/create.json' 41 | 42 | } 43 | Process { 44 | 45 | # Find & Replace any ResourceUrl parameters. 46 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 19 | [CmdletBinding()] 20 | Param( 21 | [string]$id 22 | ) 23 | Begin { 24 | 25 | [hashtable]$Parameters = $PSBoundParameters 26 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 27 | 28 | [string]$Method = 'POST' 29 | [string]$Resource = '/collections/destroy' 30 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/collections/destroy.json' 31 | 32 | } 33 | Process { 34 | 35 | # Find & Replace any ResourceUrl parameters. 36 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 32 | [CmdletBinding()] 33 | Param( 34 | [string]$id, 35 | [string]$tweet_id, 36 | [string]$relative_to, 37 | [string]$above 38 | ) 39 | Begin { 40 | 41 | [hashtable]$Parameters = $PSBoundParameters 42 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 43 | 44 | [string]$Method = 'POST' 45 | [string]$Resource = '/collections/entries/add' 46 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/collections/entries/add.json' 47 | 48 | } 49 | Process { 50 | 51 | # Find & Replace any ResourceUrl parameters. 52 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 19 | [CmdletBinding()] 20 | Param( 21 | 22 | ) 23 | Begin { 24 | 25 | [hashtable]$Parameters = $PSBoundParameters 26 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 27 | 28 | [string]$Method = 'POST' 29 | [string]$Resource = '/collections/entries/curate' 30 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/collections/entries/curate.json' 31 | 32 | } 33 | Process { 34 | 35 | # Find & Replace any ResourceUrl parameters. 36 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 28 | [CmdletBinding()] 29 | Param( 30 | [string]$id, 31 | [string]$tweet_id, 32 | [string]$relative_to, 33 | [string]$above 34 | ) 35 | Begin { 36 | 37 | [hashtable]$Parameters = $PSBoundParameters 38 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 39 | 40 | [string]$Method = 'POST' 41 | [string]$Resource = '/collections/entries/move' 42 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/collections/entries/move.json' 43 | 44 | } 45 | Process { 46 | 47 | # Find & Replace any ResourceUrl parameters. 48 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 24 | [CmdletBinding()] 25 | Param( 26 | [string]$id, 27 | [string]$tweet_id 28 | ) 29 | Begin { 30 | 31 | [hashtable]$Parameters = $PSBoundParameters 32 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 33 | 34 | [string]$Method = 'POST' 35 | [string]$Resource = '/collections/entries/remove' 36 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/collections/entries/remove.json' 37 | 38 | } 39 | Process { 40 | 41 | # Find & Replace any ResourceUrl parameters. 42 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 27 | [CmdletBinding()] 28 | Param( 29 | [string]$id, 30 | [string]$description, 31 | [string]$url 32 | ) 33 | Begin { 34 | 35 | [hashtable]$Parameters = $PSBoundParameters 36 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 37 | 38 | [string]$Method = 'POST' 39 | [string]$Resource = '/collections/update' 40 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/collections/update.json' 41 | 42 | } 43 | Process { 44 | 45 | # Find & Replace any ResourceUrl parameters. 46 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 22 | [CmdletBinding()] 23 | Param( 24 | [string]$name, 25 | [string]$avatar 26 | ) 27 | Begin { 28 | 29 | [hashtable]$Parameters = $PSBoundParameters 30 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 31 | 32 | [string]$Method = 'POST' 33 | [string]$Resource = '/custom_profiles/new.json' 34 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/custom_profiles/new.json' 35 | 36 | } 37 | Process { 38 | 39 | # Find & Replace any ResourceUrl parameters. 40 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 29 | [CmdletBinding()] 30 | Param( 31 | [string]$recipient_id, 32 | [string]$204, 33 | [string]$400 34 | ) 35 | Begin { 36 | 37 | [hashtable]$Parameters = $PSBoundParameters 38 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 39 | 40 | [string]$Method = 'POST' 41 | [string]$Resource = '/direct_messages/indicate_typing' 42 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/direct_messages/indicate_typing.json' 43 | 44 | } 45 | Process { 46 | 47 | # Find & Replace any ResourceUrl parameters. 48 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 28 | [CmdletBinding()] 29 | Param( 30 | [string]$last_read_event_id, 31 | [string]$recipient_id, 32 | [string]$204, 33 | [string]$400 34 | ) 35 | Begin { 36 | 37 | [hashtable]$Parameters = $PSBoundParameters 38 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 39 | 40 | [string]$Method = 'POST' 41 | [string]$Resource = '/direct_messages/mark_read' 42 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/direct_messages/mark_read.json' 43 | 44 | } 45 | Process { 46 | 47 | # Find & Replace any ResourceUrl parameters. 48 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 21 | [CmdletBinding()] 22 | Param( 23 | 24 | ) 25 | Begin { 26 | 27 | [hashtable]$Parameters = $PSBoundParameters 28 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 29 | 30 | [string]$Method = 'POST' 31 | [string]$Resource = '/direct_messages/welcome_messages/new' 32 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/direct_messages/welcome_messages/new.json' 33 | 34 | } 35 | Process { 36 | 37 | # Find & Replace any ResourceUrl parameters. 38 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 23 | [CmdletBinding()] 24 | Param( 25 | 26 | ) 27 | Begin { 28 | 29 | [hashtable]$Parameters = $PSBoundParameters 30 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 31 | 32 | [string]$Method = 'POST' 33 | [string]$Resource = '/direct_messages/welcome_messages/rules/new' 34 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/direct_messages/welcome_messages/rules/new.json' 35 | 36 | } 37 | Process { 38 | 39 | # Find & Replace any ResourceUrl parameters. 40 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 26 | [CmdletBinding()] 27 | Param( 28 | [string]$id, 29 | [string]$include_entities 30 | ) 31 | Begin { 32 | 33 | [hashtable]$Parameters = $PSBoundParameters 34 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 35 | 36 | [string]$Method = 'POST' 37 | [string]$Resource = '/favorites/create' 38 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/favorites/create.json' 39 | 40 | } 41 | Process { 42 | 43 | # Find & Replace any ResourceUrl parameters. 44 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 26 | [CmdletBinding()] 27 | Param( 28 | [string]$id, 29 | [string]$include_entities 30 | ) 31 | Begin { 32 | 33 | [hashtable]$Parameters = $PSBoundParameters 34 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 35 | 36 | [string]$Method = 'POST' 37 | [string]$Resource = '/favorites/destroy' 38 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/favorites/destroy.json' 39 | 40 | } 41 | Process { 42 | 43 | # Find & Replace any ResourceUrl parameters. 44 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 29 | [CmdletBinding()] 30 | Param( 31 | [string]$screen_name, 32 | [string]$user_id, 33 | [string]$follow 34 | ) 35 | Begin { 36 | 37 | [hashtable]$Parameters = $PSBoundParameters 38 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 39 | 40 | [string]$Method = 'POST' 41 | [string]$Resource = '/friendships/create' 42 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/friendships/create.json' 43 | 44 | } 45 | Process { 46 | 47 | # Find & Replace any ResourceUrl parameters. 48 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 26 | [CmdletBinding()] 27 | Param( 28 | [string]$screen_name, 29 | [string]$user_id 30 | ) 31 | Begin { 32 | 33 | [hashtable]$Parameters = $PSBoundParameters 34 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 35 | 36 | [string]$Method = 'POST' 37 | [string]$Resource = '/friendships/destroy' 38 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/friendships/destroy.json' 39 | 40 | } 41 | Process { 42 | 43 | # Find & Replace any ResourceUrl parameters. 44 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 28 | [CmdletBinding()] 29 | Param( 30 | [string]$screen_name, 31 | [string]$user_id, 32 | [string]$device, 33 | [string]$retweets 34 | ) 35 | Begin { 36 | 37 | [hashtable]$Parameters = $PSBoundParameters 38 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 39 | 40 | [string]$Method = 'POST' 41 | [string]$Resource = '/friendships/update' 42 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/friendships/update.json' 43 | 44 | } 45 | Process { 46 | 47 | # Find & Replace any ResourceUrl parameters. 48 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 22 | [CmdletBinding()] 23 | Param( 24 | [string]$mode, 25 | [string]$description 26 | ) 27 | Begin { 28 | 29 | [hashtable]$Parameters = $PSBoundParameters 30 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 31 | 32 | [string]$Method = 'POST' 33 | [string]$Resource = '/lists/create' 34 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/lists/create.json' 35 | 36 | } 37 | Process { 38 | 39 | # Find & Replace any ResourceUrl parameters. 40 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 28 | [CmdletBinding()] 29 | Param( 30 | [string]$owner_screen_name, 31 | [string]$owner_id, 32 | [string]$list_id, 33 | [string]$slug 34 | ) 35 | Begin { 36 | 37 | [hashtable]$Parameters = $PSBoundParameters 38 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 39 | 40 | [string]$Method = 'POST' 41 | [string]$Resource = '/lists/destroy' 42 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/lists/destroy.json' 43 | 44 | } 45 | Process { 46 | 47 | # Find & Replace any ResourceUrl parameters. 48 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 34 | [CmdletBinding()] 35 | Param( 36 | [string]$list_id, 37 | [string]$slug, 38 | [string]$user_id, 39 | [string]$screen_name, 40 | [string]$owner_screen_name, 41 | [string]$owner_id 42 | ) 43 | Begin { 44 | 45 | [hashtable]$Parameters = $PSBoundParameters 46 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 47 | 48 | [string]$Method = 'POST' 49 | [string]$Resource = '/lists/members/create' 50 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/lists/members/create.json' 51 | 52 | } 53 | Process { 54 | 55 | # Find & Replace any ResourceUrl parameters. 56 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 34 | [CmdletBinding()] 35 | Param( 36 | [string]$list_id, 37 | [string]$slug, 38 | [string]$user_id, 39 | [string]$screen_name, 40 | [string]$owner_screen_name, 41 | [string]$owner_id 42 | ) 43 | Begin { 44 | 45 | [hashtable]$Parameters = $PSBoundParameters 46 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 47 | 48 | [string]$Method = 'POST' 49 | [string]$Resource = '/lists/members/destroy' 50 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/lists/members/destroy.json' 51 | 52 | } 53 | Process { 54 | 55 | # Find & Replace any ResourceUrl parameters. 56 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 28 | [CmdletBinding()] 29 | Param( 30 | [string]$owner_screen_name, 31 | [string]$owner_id, 32 | [string]$list_id, 33 | [string]$slug 34 | ) 35 | Begin { 36 | 37 | [hashtable]$Parameters = $PSBoundParameters 38 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 39 | 40 | [string]$Method = 'POST' 41 | [string]$Resource = '/lists/subscribers/create' 42 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/lists/subscribers/create.json' 43 | 44 | } 45 | Process { 46 | 47 | # Find & Replace any ResourceUrl parameters. 48 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 28 | [CmdletBinding()] 29 | Param( 30 | [string]$list_id, 31 | [string]$slug, 32 | [string]$owner_screen_name, 33 | [string]$owner_id 34 | ) 35 | Begin { 36 | 37 | [hashtable]$Parameters = $PSBoundParameters 38 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 39 | 40 | [string]$Method = 'POST' 41 | [string]$Resource = '/lists/subscribers/destroy' 42 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/lists/subscribers/destroy.json' 43 | 44 | } 45 | Process { 46 | 47 | # Find & Replace any ResourceUrl parameters. 48 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 34 | [CmdletBinding()] 35 | Param( 36 | [string]$list_id, 37 | [string]$slug, 38 | [string]$mode, 39 | [string]$description, 40 | [string]$owner_screen_name, 41 | [string]$owner_id 42 | ) 43 | Begin { 44 | 45 | [hashtable]$Parameters = $PSBoundParameters 46 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 47 | 48 | [string]$Method = 'POST' 49 | [string]$Resource = '/lists/update' 50 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/lists/update.json' 51 | 52 | } 53 | Process { 54 | 55 | # Find & Replace any ResourceUrl parameters. 56 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 35 | [CmdletBinding()] 36 | Param( 37 | 38 | ) 39 | Begin { 40 | 41 | [hashtable]$Parameters = $PSBoundParameters 42 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 43 | 44 | [string]$Method = 'POST' 45 | [string]$Resource = '/media/metadata/create' 46 | [string]$ResourceUrl = 'https://upload.twitter.com/1.1/media/metadata/create.json' 47 | 48 | } 49 | Process { 50 | 51 | # Find & Replace any ResourceUrl parameters. 52 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 37 | [CmdletBinding()] 38 | Param( 39 | 40 | ) 41 | Begin { 42 | 43 | [hashtable]$Parameters = $PSBoundParameters 44 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 45 | 46 | [string]$Method = 'POST' 47 | [string]$Resource = '/media/subtitles/delete' 48 | [string]$ResourceUrl = 'https://upload.twitter.com/1.1/media/subtitles/delete.json' 49 | 50 | } 51 | Process { 52 | 53 | # Find & Replace any ResourceUrl parameters. 54 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 26 | [CmdletBinding()] 27 | Param( 28 | [string]$screen_name, 29 | [string]$user_id 30 | ) 31 | Begin { 32 | 33 | [hashtable]$Parameters = $PSBoundParameters 34 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 35 | 36 | [string]$Method = 'POST' 37 | [string]$Resource = '/mutes/users/create' 38 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/mutes/users/create.json' 39 | 40 | } 41 | Process { 42 | 43 | # Find & Replace any ResourceUrl parameters. 44 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 26 | [CmdletBinding()] 27 | Param( 28 | [string]$screen_name, 29 | [string]$user_id 30 | ) 31 | Begin { 32 | 33 | [hashtable]$Parameters = $PSBoundParameters 34 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 35 | 36 | [string]$Method = 'POST' 37 | [string]$Resource = '/mutes/users/destroy' 38 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/mutes/users/destroy.json' 39 | 40 | } 41 | Process { 42 | 43 | # Find & Replace any ResourceUrl parameters. 44 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 21 | [CmdletBinding()] 22 | Param( 23 | [string]$access_token 24 | ) 25 | Begin { 26 | 27 | [hashtable]$Parameters = $PSBoundParameters 28 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 29 | 30 | [string]$Method = 'POST' 31 | [string]$Resource = '/oauth2/invalidate_token' 32 | [string]$ResourceUrl = 'https://api.twitter.com/oauth2/invalidate_token' 33 | 34 | } 35 | Process { 36 | 37 | # Find & Replace any ResourceUrl parameters. 38 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 27 | [CmdletBinding()] 28 | Param( 29 | [string]$grant_type 30 | ) 31 | Begin { 32 | 33 | [hashtable]$Parameters = $PSBoundParameters 34 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 35 | 36 | [string]$Method = 'POST' 37 | [string]$Resource = '/oauth2/token' 38 | [string]$ResourceUrl = 'https://api.twitter.com/oauth2/token' 39 | 40 | } 41 | Process { 42 | 43 | # Find & Replace any ResourceUrl parameters. 44 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 19 | [CmdletBinding()] 20 | Param( 21 | [string]$oauth_verifier 22 | ) 23 | Begin { 24 | 25 | [hashtable]$Parameters = $PSBoundParameters 26 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 27 | 28 | [string]$Method = 'POST' 29 | [string]$Resource = '/oauth/access_token' 30 | [string]$ResourceUrl = 'https://api.twitter.com/oauth/access_token' 31 | 32 | } 33 | Process { 34 | 35 | # Find & Replace any ResourceUrl parameters. 36 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 22 | [CmdletBinding()] 23 | Param( 24 | [string]$access_token, 25 | [string]$access_token_secret 26 | ) 27 | Begin { 28 | 29 | [hashtable]$Parameters = $PSBoundParameters 30 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 31 | 32 | [string]$Method = 'POST' 33 | [string]$Resource = '/oauth/invalidate_token' 34 | [string]$ResourceUrl = 'https://api.twitter.com/oauth/invalidate_token' 35 | 36 | } 37 | Process { 38 | 39 | # Find & Replace any ResourceUrl parameters. 40 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 27 | [CmdletBinding()] 28 | Param( 29 | [string]$oauth_callback, 30 | [string]$x_auth_access_type 31 | ) 32 | Begin { 33 | 34 | [hashtable]$Parameters = $PSBoundParameters 35 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 36 | 37 | [string]$Method = 'POST' 38 | [string]$Resource = '/oauth/request_token' 39 | [string]$ResourceUrl = 'https://api.twitter.com/oauth/request_token' 40 | 41 | } 42 | Process { 43 | 44 | # Find & Replace any ResourceUrl parameters. 45 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 19 | [CmdletBinding()] 20 | Param( 21 | [string]$query 22 | ) 23 | Begin { 24 | 25 | [hashtable]$Parameters = $PSBoundParameters 26 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 27 | 28 | [string]$Method = 'POST' 29 | [string]$Resource = '/saved_searches/create' 30 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/saved_searches/create.json' 31 | 32 | } 33 | Process { 34 | 35 | # Find & Replace any ResourceUrl parameters. 36 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 19 | [CmdletBinding()] 20 | Param( 21 | [string]$id 22 | ) 23 | Begin { 24 | 25 | [hashtable]$Parameters = $PSBoundParameters 26 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 27 | 28 | [string]$Method = 'POST' 29 | [string]$Resource = '/saved_searches/destroy/:id' 30 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/saved_searches/destroy/:id.json' 31 | 32 | } 33 | Process { 34 | 35 | # Find & Replace any ResourceUrl parameters. 36 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 22 | [CmdletBinding()] 23 | Param( 24 | [string]$id, 25 | [string]$trim_user 26 | ) 27 | Begin { 28 | 29 | [hashtable]$Parameters = $PSBoundParameters 30 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 31 | 32 | [string]$Method = 'POST' 33 | [string]$Resource = '/statuses/destroy/:id' 34 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/statuses/destroy/:id.json' 35 | 36 | } 37 | Process { 38 | 39 | # Find & Replace any ResourceUrl parameters. 40 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 28 | [CmdletBinding()] 29 | Param( 30 | [string]$id, 31 | [string]$trim_user 32 | ) 33 | Begin { 34 | 35 | [hashtable]$Parameters = $PSBoundParameters 36 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 37 | 38 | [string]$Method = 'POST' 39 | [string]$Resource = '/statuses/retweet/:id' 40 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/statuses/retweet/:id.json' 41 | 42 | } 43 | Process { 44 | 45 | # Find & Replace any ResourceUrl parameters. 46 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 29 | [CmdletBinding()] 30 | Param( 31 | [string]$id, 32 | [string]$trim_user 33 | ) 34 | Begin { 35 | 36 | [hashtable]$Parameters = $PSBoundParameters 37 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 38 | 39 | [string]$Method = 'POST' 40 | [string]$Resource = '/statuses/unretweet/:id' 41 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/statuses/unretweet/:id.json' 42 | 43 | } 44 | Process { 45 | 46 | # Find & Replace any ResourceUrl parameters. 47 | $UrlParameters = [regex]::Matches($ResourceUrl, '(? 25 | [CmdletBinding()] 26 | Param( 27 | [string]$screen_name, 28 | [string]$user_id, 29 | [string]$perform_block 30 | ) 31 | Begin { 32 | 33 | [hashtable]$Parameters = $PSBoundParameters 34 | $CmdletBindingParameters | ForEach-Object { $Parameters.Remove($_) } 35 | 36 | [string]$Method = 'POST' 37 | [string]$Resource = '/users/report_spam' 38 | [string]$ResourceUrl = 'https://api.twitter.com/1.1/users/report_spam.json' 39 | 40 | } 41 | Process { 42 | 43 | # Find & Replace any ResourceUrl parameters. 44 | $UrlParameters = [regex]::Matches($ResourceUrl, '(?