Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2022-02-18 19:55:07 +00:00
parent 398ddc83fb
commit 004c90663d
27 changed files with 1561 additions and 1561 deletions

View File

@@ -4,35 +4,6 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/stream/api](ht
Endpoints:
## SendMessage
Send a message to the stream.
[https://m3o.com/stream/api#SendMessage](https://m3o.com/stream/api#SendMessage)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/stream"
)
// Send a message to the stream.
func SendMessage() {
streamService := stream.NewStreamService(os.Getenv("M3O_API_TOKEN"))
rsp, err := streamService.SendMessage(&stream.SendMessageRequest{
Channel: "general",
Text: "Hey checkout this tweet https://twitter.com/m3oservices/status/1455291054295498752",
})
fmt.Println(rsp, err)
}
```
## ListMessages
List messages for a given channel
@@ -119,3 +90,32 @@ Name: "general",
}
```
## SendMessage
Send a message to the stream.
[https://m3o.com/stream/api#SendMessage](https://m3o.com/stream/api#SendMessage)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/stream"
)
// Send a message to the stream.
func SendMessage() {
streamService := stream.NewStreamService(os.Getenv("M3O_API_TOKEN"))
rsp, err := streamService.SendMessage(&stream.SendMessageRequest{
Channel: "general",
Text: "Hey checkout this tweet https://twitter.com/m3oservices/status/1455291054295498752",
})
fmt.Println(rsp, err)
}
```