Files
m3o-go/examples/carbon/offset/offsetCarbon/main.go
2022-01-07 11:59:24 +00:00

16 lines
298 B
Go
Executable File

package main
import (
"fmt"
"os"
"go.m3o.com/carbon"
)
// Purchase 1kg (0.001 tonnes) 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)
}