How would I use powershell to consume, at least in part, or for a short duration, the twitter stream (as twitter4j sample)?
Step 3: Consume the data as it’s delivered
Once the connection is established, the stream sends new Tweets through the open connection as they happen, and your client app should read the data off the line as it is received. Your client app will need to recognize and handle various types of messages, which are described in our documentation below.
https://developer.twitter.com/en/docs/tutorials/consuming-streaming-data
Looking to use powershell, preferably the PSTwitterAPI.
Code here:
Import-Module PSTwitterAPI
Set-TwitterOAuthSettings -ApiKey $env:ApiKey -ApiSecret $env:ApiSecret -AccessToken $env:AccessToken -AccessTokenSecret $env:AccessTokenSecret
$TwitterStatuses = Get-TwitterStatuses_UserTimeline -screen_name 'mkellerman'
Foreach ($status in $TwitterStatuses) {
Write-Host $status.text
}
Write-Host "done"
But I'm looking, preferably, for "the stream" of all tweets, something like all twitter "statuses".