old_xph_api_test.go 458 B

12345678910111213141516171819
  1. package xphapi
  2. import (
  3. "encoding/json"
  4. "testing"
  5. )
  6. func TestGetDeviceData(t *testing.T) {
  7. token := "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIzOTYxMTQxNDIiLCJhdWQiOiJjb25zdW1lciIsImV4cCI6MTczNTIwMTI3N30.jWYVHhcDSbFTX9_W70mT6jW2MUF2ZwBMTVCx7YxXpT6mbuzjibhP9nZxoegOEyxZTGhAd9oqmj5RFU2mni31DQ"
  8. gotData, err := GetDeviceData("865012063142227", token)
  9. if err != nil {
  10. t.Error(err)
  11. t.Fatal(err)
  12. }
  13. str, err := json.Marshal(gotData)
  14. t.Log(string(str), err)
  15. }