Files
services/examples/currency/codes/go/getSupportedCodes.go
2021-09-16 12:52:36 +01:00

15 lines
340 B
Go
Executable File

package example
import (
"fmt"
"github.com/micro/services/clients/go/currency"
"os"
)
// Codes returns the supported currency codes for the API
func GetSupportedCodes() {
currencyService := currency.NewCurrencyService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := currencyService.Codes(&currency.CodesRequest{})
fmt.Println(rsp, err)
}