Notify Methods

master
Leonardo Domingues 2021-12-01 11:22:31 -03:00
parent e0f1a0ddd4
commit 44f39c7c16
1 changed files with 12 additions and 0 deletions

View File

@ -291,6 +291,18 @@ func (c *Cli) DrawAddText(t string, x, y, w, h int) error {
return err
}
/***************** Notify Functions *****************/
func (c *Cli) NotifyAlert(msg, title string) error {
err := c.HttpCli().JsonGet(fmt.Sprintf("/ipc/notify/alert?msg=%s&title=%s", msg, title), nil)
return err
}
func (c *Cli) NotifyBeep(msg, title string) error {
err := c.HttpCli().JsonGet(fmt.Sprintf("/ipc/notify/notify?msg=%s&title=%s", msg, title), nil)
return err
}
func NewCli() *Cli {
ret := &Cli{ApiCli: api.NewApiCli()}
return ret