mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-22 22:55:28 +00:00
Commit from m3o/m3o action
This commit is contained in:
34
examples/gifs/README.md
Executable file
34
examples/gifs/README.md
Executable file
@@ -0,0 +1,34 @@
|
||||
# Gifs
|
||||
|
||||
An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Gifs/api](https://m3o.com/Gifs/api).
|
||||
|
||||
Endpoints:
|
||||
|
||||
## Search
|
||||
|
||||
Search for a GIF
|
||||
|
||||
|
||||
[https://m3o.com/gifs/api#Search](https://m3o.com/gifs/api#Search)
|
||||
|
||||
```go
|
||||
package example
|
||||
|
||||
import(
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/go.m3o.com/gifs"
|
||||
)
|
||||
|
||||
// Search for a GIF
|
||||
func Search() {
|
||||
gifsService := gifs.NewGifsService(os.Getenv("M3O_API_TOKEN"))
|
||||
rsp, err := gifsService.Search(&gifs.SearchRequest{
|
||||
Limit: 2,
|
||||
Query: "dogs",
|
||||
|
||||
})
|
||||
fmt.Println(rsp, err)
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user