Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2021-11-03 21:55:24 +00:00
parent 2e374bf3b0
commit 784c4e4c37
20 changed files with 801 additions and 801 deletions

View File

@@ -4,33 +4,6 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Helloworld/api
Endpoints:
## Stream
Stream returns a stream of "Hello $name" responses
[https://m3o.com/helloworld/api#Stream](https://m3o.com/helloworld/api#Stream)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/helloworld"
)
// Stream returns a stream of "Hello $name" responses
func StreamsResponsesFromTheServerUsingWebsockets() {
helloworldService := helloworld.NewHelloworldService(os.Getenv("M3O_API_TOKEN"))
rsp, err := helloworldService.Stream(&helloworld.StreamRequest{
Name: "John",
})
fmt.Println(rsp, err)
}
```
## Call
Call returns a personalised "Hello $name" response
@@ -58,3 +31,30 @@ func CallTheHelloworldService() {
fmt.Println(rsp, err)
}
```
## Stream
Stream returns a stream of "Hello $name" responses
[https://m3o.com/helloworld/api#Stream](https://m3o.com/helloworld/api#Stream)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/helloworld"
)
// Stream returns a stream of "Hello $name" responses
func StreamsResponsesFromTheServerUsingWebsockets() {
helloworldService := helloworld.NewHelloworldService(os.Getenv("M3O_API_TOKEN"))
rsp, err := helloworldService.Stream(&helloworld.StreamRequest{
Name: "John",
})
fmt.Println(rsp, err)
}
```