mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-17 04:54:51 +00:00
Commit from m3o/m3o action
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"go.m3o.com/image"
|
||||
)
|
||||
|
||||
// Convert an image from one format (jpeg, png etc.) to an other either on the fly (from base64 to base64),
|
||||
// or by uploading the conversion result.
|
||||
func main() {
|
||||
imageService := image.NewImageService(os.Getenv("M3O_API_TOKEN"))
|
||||
rsp, err := imageService.Convert(&image.ConvertRequest{
|
||||
Name: "cat.jpeg",
|
||||
Url: "somewebsite.com/cat.png",
|
||||
})
|
||||
fmt.Println(rsp, err)
|
||||
}
|
||||
Reference in New Issue
Block a user