HOWTO: Add an Alias to your powershell profile for checking out your stream status from the CLI!
$endpoint = 'https://login.netromedia.com/rest.svc'
$method = "GetAllChannelRunningStatuses"
$json = '{"Token":"5Zzzz-0f84-37cb-8200-bcbe0f4e6c19","AccountId":"f6323616-424a-408a-9704-988fc23467"}'
$url = $endpoint + "/" + $method
function cstats {
Invoke-RestMethod -Uri $url -Body $json -ContentType application/json -Method POST | ConvertTo-JSON
}
- Now type: .$profile to reload your profile
- Now you can simply type "cstats" at a prompt to call GetAllChannelRunningStatuses :)
My output looks like this:
I use a custom powershell profile: netrowillh@github