2021-12-15 13:44:27 +00:00
|
|
|
package autohotkey
|
|
|
|
|
|
|
|
import (
|
|
|
|
"go.digitalcircle.com.br/open/replaycli-go/api"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Cli struct {
|
|
|
|
*api.ApiCli
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewCli() *Cli {
|
|
|
|
ret := &Cli{ApiCli: api.NewApiCli()}
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
2021-12-16 11:54:53 +00:00
|
|
|
func (c *Cli) Test() (ret []byte, err error) {
|
|
|
|
ret, err = c.HttpCli().RawPost("/ipc/ahk/test", nil)
|
2021-12-15 13:44:27 +00:00
|
|
|
return ret, err
|
|
|
|
}
|
|
|
|
|
2021-12-16 12:38:12 +00:00
|
|
|
func (c *Cli) Do(data string) (ret []byte, err error) {
|
|
|
|
i := []byte(data)
|
|
|
|
ret, err = c.HttpCli().RawPost("/ipc/ahk/do", i)
|
2021-12-15 13:44:27 +00:00
|
|
|
return ret, err
|
|
|
|
}
|