https://github.com/karpeleslab/spotlib
client library for spot
https://github.com/karpeleslab/spotlib
Last synced: 11 months ago
JSON representation
client library for spot
- Host: GitHub
- URL: https://github.com/karpeleslab/spotlib
- Owner: KarpelesLab
- License: mit
- Created: 2024-07-17T15:08:56.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-04-14T15:21:11.000Z (about 1 year ago)
- Last Synced: 2025-07-01T00:08:51.339Z (12 months ago)
- Language: Go
- Size: 91.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://godoc.org/github.com/KarpelesLab/spotlib)
# spotlib
Spot connection library, allows accessing Spot and sending end to end encrypted messages to other participants.
## Usage
```go
c, err := spotlib.New()
if err != nil {
return err
}
go func() {
for ev := range c.Events.On("status") {
if emmiter.Arg[int](ev, 0) == 1 {
// we are online!
}
}
}()
c.SetHandler("endpoint", func(msg *spotproto.Message) ([]byte, error) {
// handle message
...
})
```