- 添加几个打印机的清除队列与易联云的播放文本声音操作

This commit is contained in:
gazebo
2019-07-19 17:06:37 +08:00
parent 0ecc8b8727
commit 594ed19bf3
3 changed files with 26 additions and 6 deletions

View File

@@ -21,7 +21,7 @@ func init() {
// 自有应用
api = New("1039586024", "4885d07c2997b661102e4b6099c0bf3b")
api.SetToken("b43201fe472c4672880890f73d97aab0")
api.SetToken("7884617f9eeb4c28933569f94a95b5c3")
// 开放应用
// api = New("1098307169", "d5eedb40c99e6691b1ca2ba82a363d6a")
@@ -37,11 +37,11 @@ func handleError(t *testing.T, err error) {
func TestRetrieveToken(t *testing.T) {
token, err := api.RetrieveToken()
handleError(t, err)
baseapi.SugarLogger.Debug(utils.Format4Output(token, false))
baseapi.SugarLogger.Debug(utils.Format4Output(token, true))
}
func TestAddPrinter(t *testing.T) {
err := api.AddPrinter("4004611945", "57kywtiiyqce", "测试打印机1")
err := api.AddPrinter("4004617180", "381870509796", "测试打印机1")
handleError(t, err)
}
@@ -81,6 +81,11 @@ func TestGetPrinterToken(t *testing.T) {
}
func TestCancelAll(t *testing.T) {
err := api.CancelAll("4004617683")
err := api.CancelAll("4004617242", "03e4ec4d65264bca850c8ad87dd8fc21")
handleError(t, err)
}
func TestPlayText(t *testing.T) {
err := api.PlayText("4004617180", utils.GetUUID(), "大家好", "")
handleError(t, err)
}