mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-11 18:44:26 +00:00
Commit from m3o/m3o action
This commit is contained in:
33
examples/carbon/README.md
Executable file
33
examples/carbon/README.md
Executable file
@@ -0,0 +1,33 @@
|
||||
# Carbon
|
||||
|
||||
An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Carbon/api](https://m3o.com/Carbon/api).
|
||||
|
||||
Endpoints:
|
||||
|
||||
## Offset
|
||||
|
||||
Purchase 1kg (0.001 tonnes) of carbon offsets in a single request
|
||||
|
||||
|
||||
[https://m3o.com/carbon/api#Offset](https://m3o.com/carbon/api#Offset)
|
||||
|
||||
```go
|
||||
package example
|
||||
|
||||
import(
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"go.m3o.com/carbon"
|
||||
)
|
||||
|
||||
// Purchase 1kg (0.001 tonnes) of carbon offsets in a single request
|
||||
func OffsetCarbon() {
|
||||
carbonService := carbon.NewCarbonService(os.Getenv("M3O_API_TOKEN"))
|
||||
rsp, err := carbonService.Offset(&carbon.OffsetRequest{
|
||||
|
||||
})
|
||||
fmt.Println(rsp, err)
|
||||
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user