Files
m3o-go/examples/carbon/offset/offsetCarbon/main.go
2022-01-12 10:03:46 +00:00

16 lines
297 B
Go
Executable File

package main
import (
"fmt"
"os"
"go.m3o.com/carbon"
)
// Purchase 1KG (0.001 tonne) of carbon offsets in a single request
func main() {
carbonService := carbon.NewCarbonService(os.Getenv("M3O_API_TOKEN"))
rsp, err := carbonService.Offset(&carbon.OffsetRequest{})
fmt.Println(rsp, err)
}