mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-12 10:55:11 +00:00
22 lines
423 B
Go
Executable File
22 lines
423 B
Go
Executable File
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"go.m3o.com/user"
|
|
)
|
|
|
|
// Create a new user account. The email address and username for the account must be unique.
|
|
func main() {
|
|
userService := user.NewUserService(os.Getenv("M3O_API_TOKEN"))
|
|
rsp, err := userService.Create(&user.CreateRequest{
|
|
Email: "joe@example.com",
|
|
Id: "usrid-1",
|
|
Password: "mySecretPass123",
|
|
Username: "usrname-1",
|
|
})
|
|
fmt.Println(rsp, err)
|
|
|
|
}
|