quick data poster for http://data.sparkfun.com
package main
import (
"github.com/derekpitt/phant"
)
func main() {
c := phant.Create("<publickey>", "<privatekey>")
err := c.Post(map[string]string{"derek": "1", "test": "2"})
if err != nil {
// dang..
}
}
package main
import (
"fmt"
"github.com/derekpitt/phant"
)
// define what fields are in the stream here
type testType struct {
Derek string
Test string
Timestamp string
}
func main() {
// declare your data holder to be an array!
var d []testType
// don't forget to use your address operator here! (&)
phant.AllData("RMMW22NWWzh6oj1NyADE", &d)
fmt.Printf("%#v", d)
}
https://godoc.org/github.com/derekpitt/phant
- read X-Rate-Limit- headers
CreateStream methodClear methodDelete methodGetting DataStats