remove/tunner.ps1


<#
.Synopsis
     krotki_opis
     
.DESCRIPTION
    dlugi_opis
     
.EXAMPLE
    przyklad_1
     
.EXAMPLE
    przyklad_2
 
    Recall Preset http://$Address/YamahaExtendedControl/v1/tuner/recallPreset?zone=main&band=fm&num=13
Next Preset http://$Address/YamahaExtendedControl/v1/tuner/switchPreset?dir=next
Previous Preset http://$Address/YamahaExtendedControl/v1/tuner/switchPreset?dir=previous
Store Preset http://$Address/YamahaExtendedControl/v1/tuner/storePreset?num=10
Get Preset info http://$Address/YamahaExtendedControl/v1/tuner/getPresetInfo?band=fm
 
     
.LINK
    Author: autor
    Link: akademiapowershell.pl
     
    Date: 26-08-2019
    Version: version
    eywords: keywords
    Notes:
    Changelog:
#>

function Skip-YmTunnerNext {
    [cmdletbinding()]
    [Alias('tunnernext-ym')]
    param (
        [Parameter(Mandatory, ValueFromPipeline)]
        [string[]]$DeviceAddress,
        [switch]$PassThru
    )
    begin {

    }
    process {
        foreach ($Address in $DeviceAddress) {
            try {

                $Response = Invoke-WebRequest -Uri "http://$Address/YamahaExtendedControl/v1/tuner/recallPreset?zone=main&band=fm&num=13"
                if ($PassThru) {
                    $Response.Content | ConvertFrom-Json | Add-YmResponseCode
                }
            }
            catch {

            }
        }
    }
    end {

    }
}