mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-11 18:44:26 +00:00
20 lines
396 B
Go
Executable File
20 lines
396 B
Go
Executable File
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"go.m3o.com/space"
|
|
)
|
|
|
|
// Update an object. If an object with this name does not exist, creates a new one.
|
|
func main() {
|
|
spaceService := space.NewSpaceService(os.Getenv("M3O_API_TOKEN"))
|
|
rsp, err := spaceService.Update(&space.UpdateRequest{
|
|
Name: "images/file.jpg",
|
|
Object: "<file bytes>",
|
|
Visibility: "public",
|
|
})
|
|
fmt.Println(rsp, err)
|
|
}
|