Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2021-11-03 14:00:31 +00:00
parent 49e533797f
commit 3af01580b7
9 changed files with 80 additions and 162 deletions

View File

@@ -10,8 +10,22 @@ import (
// Subscribe to notes events
func main() {
notesService := notes.NewNotesService(os.Getenv("M3O_API_TOKEN"))
rsp, err := notesService.Events(&notes.EventsRequest{
stream, err := notesService.Events(&notes.EventsRequest{
Id: "63c0cdf8-2121-11ec-a881-0242e36f037a",
})
fmt.Println(rsp, err)
if err != nil {
fmt.Println(err)
return
}
for {
rsp, err := stream.Recv()
if err != nil {
fmt.Println(err)
return
}
fmt.Println(rsp)
}
}