Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
UltraNemesis authored Jan 19, 2018
1 parent d67d921 commit 15584de
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion wpt-test/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,29 @@
package main

import (
"encoding/json"
"log"

"io/ioutil"
"os"

"github.com/UltraNemesis/wpt"
)

func main() {
f, _ := os.OpenFile("test.log", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)

log.SetOutput(f)

options := &wpt.Options{}
client, _ := wpt.NewClient(options)
client.Locations()
resp, _ := client.Locations()
log.Println(resp)

results, _ := client.GetResults("180105_S9_6c347b11f8fc33eb77f3e4f69a11710c")
out, _ := json.Marshal(results)
ioutil.WriteFile("results.json", out, 777)

history, _ := client.GetTestHistory("1")
log.Println(history.Items)
}

0 comments on commit 15584de

Please sign in to comment.