From 7f4979ab6e7f3c4ea6caf62213cfebfcc884ba17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paulo=20Sima=CC=83o?= Date: Sun, 3 Oct 2021 19:32:57 -0300 Subject: [PATCH] Added datasync --- api/datasync/cli.go | 23 +++++++++++++++++++++++ api/wingui/cli.go | 6 ++++++ 2 files changed, 29 insertions(+) create mode 100644 api/datasync/cli.go diff --git a/api/datasync/cli.go b/api/datasync/cli.go new file mode 100644 index 0000000..da4ad51 --- /dev/null +++ b/api/datasync/cli.go @@ -0,0 +1,23 @@ +package datasync + +import ( + "go.digitalcircle.com.br/open/replaycli-go/api" +) + +type Cli struct { + cli *api.Cli +} + +func (c *Cli) HttpCli() *api.Cli { + return c.cli +} +func (c *Cli) New(i interface{}) (string, error) { + res := "" + err := c.cli.HttpJsonPost("/ipc/datasyncreportmgr/new", i, &res) + return res, err +} + +func NewCli() *Cli { + ret := &Cli{cli: api.NewCli()} + return ret +} diff --git a/api/wingui/cli.go b/api/wingui/cli.go index 7efb4dc..81456b2 100644 --- a/api/wingui/cli.go +++ b/api/wingui/cli.go @@ -58,6 +58,12 @@ func (c *Cli) ScreenFind(f string) (ret map[string]interface{}, err error) { return } +func (c *Cli) KBTap(t string) (map[string]interface{}, error) { + ret := make(map[string]interface{}) + err := c.cli.HttpJsonGet(fmt.Sprintf("/ipc/wingui/kb/tap?str=%s", t), &ret) + return ret, err +} + func (c *Cli) ScreenWait(f string, m int) (ret map[string]interface{}, err error) { ret = make(map[string]interface{}) err = c.cli.HttpJsonGet(fmt.Sprintf("/ipc/wingui/screen/wait?f=%s&m=%d", f, m), &ret)