package xphapi import ( "encoding/json" "testing" ) func TestGetDeviceData(t *testing.T) { token := "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIzOTYxMTQxNDIiLCJhdWQiOiJjb25zdW1lciIsImV4cCI6MTczNTIwMTI3N30.jWYVHhcDSbFTX9_W70mT6jW2MUF2ZwBMTVCx7YxXpT6mbuzjibhP9nZxoegOEyxZTGhAd9oqmj5RFU2mni31DQ" gotData, err := GetDeviceData("865012063142227", token) if err != nil { t.Error(err) t.Fatal(err) } str, err := json.Marshal(gotData) t.Log(string(str), err) }