mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-11 18:44:26 +00:00
Thumbnail
An m3o.com API. For example usage see m3o.com/thumbnail/api.
Endpoints:
Screenshot
Create a thumbnail screenshot by passing in a url, height and width
https://m3o.com/thumbnail/api#Screenshot
package example
import(
"fmt"
"os"
"go.m3o.com/thumbnail"
)
// Create a thumbnail screenshot by passing in a url, height and width
func TakeScreenshotOfAurl() {
thumbnailService := thumbnail.NewThumbnailService(os.Getenv("M3O_API_TOKEN"))
rsp, err := thumbnailService.Screenshot(&thumbnail.ScreenshotRequest{
Height: 600,
Url: "https://google.com",
Width: 600,
})
fmt.Println(rsp, err)
}