Files
m3o-go/examples/thumbnail
2022-01-12 15:03:53 +00:00
..
2021-12-09 15:06:12 +00:00
2022-01-12 15:03:53 +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)
	
}