Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2021-12-10 11:19:12 +00:00
parent f55142f3fd
commit d792a8407f
21 changed files with 957 additions and 912 deletions

View File

@@ -0,0 +1,21 @@
package main
import (
"fmt"
"os"
"go.m3o.com/translate"
)
// Basic text translation
func main() {
translateService := translate.NewTranslateService(os.Getenv("M3O_API_TOKEN"))
rsp, err := translateService.Text(&translate.TextRequest{
Content: "hello",
Format: "text",
Model: "nmt",
Source: "en",
Target: "fr",
})
fmt.Println(rsp, err)
}