mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-23 15:11:36 +00:00
Commit from m3o/m3o action
This commit is contained in:
34
examples/joke/README.md
Executable file
34
examples/joke/README.md
Executable file
@@ -0,0 +1,34 @@
|
||||
# Joke
|
||||
|
||||
An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Joke/api](https://m3o.com/Joke/api).
|
||||
|
||||
Endpoints:
|
||||
|
||||
## Random
|
||||
|
||||
|
||||
|
||||
|
||||
[https://m3o.com/joke/api#Random](https://m3o.com/joke/api#Random)
|
||||
|
||||
```go
|
||||
package example
|
||||
|
||||
import(
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"go.m3o.com/joke"
|
||||
)
|
||||
|
||||
//
|
||||
func GetRandomNjokes() {
|
||||
jokeService := joke.NewJokeService(os.Getenv("M3O_API_TOKEN"))
|
||||
rsp, err := jokeService.Random(&joke.RandomRequest{
|
||||
Count: 3,
|
||||
|
||||
})
|
||||
fmt.Println(rsp, err)
|
||||
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user