remove broken examples

This commit is contained in:
Asim Aslam
2021-11-18 08:32:04 +00:00
parent 3953482915
commit 3760aaf9dd
4 changed files with 0 additions and 73 deletions

View File

@@ -1,17 +0,0 @@
package example
import (
"fmt"
"os"
"go.m3o.com/event"
)
// Subscribe to messages for a given topic.
func SubscribeToAtopic() {
eventService := event.NewEventService(os.Getenv("M3O_API_TOKEN"))
rsp, err := eventService.Subscribe(&event.SubscribeRequest{
Topic: "user",
})
fmt.Println(rsp, err)
}

View File

@@ -1,17 +0,0 @@
package example
import (
"fmt"
"os"
"go.m3o.com/notes"
)
// Specify the note to events
func SubscribeToEvents() {
notesService := notes.NewNotesService(os.Getenv("M3O_API_TOKEN"))
rsp, err := notesService.Subscribe(&notes.SubscribeRequest{
Id: "63c0cdf8-2121-11ec-a881-0242e36f037a",
})
fmt.Println(rsp, err)
}

View File

@@ -1,22 +0,0 @@
package example
import (
"fmt"
"os"
"go.m3o.com/stream"
)
// Publish a message to the stream. Specify a topic to group messages for a specific topic.
func PublishAmessage() {
streamService := stream.NewStreamService(os.Getenv("M3O_API_TOKEN"))
rsp, err := streamService.Publish(&stream.PublishRequest{
Message: map[string]interface{}{
"id": "1",
"type": "signup",
"user": "john",
},
Topic: "events",
})
fmt.Println(rsp, err)
}

View File

@@ -1,17 +0,0 @@
package example
import (
"fmt"
"os"
"go.m3o.com/stream"
)
// Subscribe to messages for a given topic.
func SubscribeToAtopic() {
streamService := stream.NewStreamService(os.Getenv("M3O_API_TOKEN"))
rsp, err := streamService.Subscribe(&stream.SubscribeRequest{
Topic: "events",
})
fmt.Println(rsp, err)
}