api_test.go 496 字节
package pushdata

import (
	"encoding/json"
	"testing"
	"time"
)

func TestToken(t *testing.T) {
	c := NewClient()
	c.AppKey = "7q9Kd8ktoB"
	c.AppSecret = "pQSoBj44Wk"
	h := c.useHeader()
	t.Logf("%v", h)
}

func TestField(t *testing.T) {
	item := StaffAssessItem{}
	fields := item.AppTableField()
	bt, _ := json.Marshal(fields)
	t.Log(string(bt))
}

func TestPushData(t *testing.T) {
	nowTime := time.Unix(1688572800, 0)
	err := SendDataStaffAssess(nowTime)
	if err != nil {
		t.Error(err)
	}
}