Skip to content

mckee/particle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

particle

-- import "github.com/mckee/particle"

Usage

const URL string = "https://api.particle.io/v1/devices/events/"

func Subscribe

func Subscribe(eventPrefix string, token string) <-chan Event

subscribes to a particle.io event stream and returns a channel to receive them

type Event

type Event struct {
	Name string
	Data struct {
		Data      string `json:"data"`
		TTL       string `json:"ttl"`
		Timestamp string `json:"published_at"`
		CoreID    string `json:"coreid"`
	}
}

About

golang utilities for particle.io stuff

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages