mkellerman / PSTwitterAPI

PSTwitterAPI - a PowerShell module for the Twitter API
https://mkellerman.github.io/Introducing_PSTwitterAPI/
45 stars 13 forks source link

Invalid URL in function Send-TwitterBlocks_Destroy $ResourceUrl #38

Closed mc1903 closed 4 years ago

mc1903 commented 4 years ago

Hi,

There is a rogue 'POST' in the $ResourceUrl for this function, causing it to error on execution.

PS C:\Users\Martin> Get-TwitterBlocks_Ids

ids                 : {1129359659653971969, 1180924045157687296}
next_cursor         : 0
next_cursor_str     : 0
previous_cursor     : 0
previous_cursor_str : 0
total_count         : 

PS C:\Users\Martin> Send-TwitterBlocks_Destroy -user_id 1180924045157687296
Invoke-RestMethod : Invalid URI: The hostname could not be parsed.
At D:\Users\Martin\Documents\WindowsPowerShell\Modules\PSTwitterAPI\0.0.7\public\Invoke-TwitterAPI.ps1:34 char:5
+     Invoke-RestMethod @RestMethod_Params
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Invoke-RestMethod], UriFormatException
    + FullyQualifiedErrorId : System.UriFormatException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

PS C:\Users\Martin> 

image

Thanks, Martin

mkellerman commented 4 years ago

Thanks, i've made some changes. Can you download the file directly from here and confirm that it works?