mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
528 B
528 B
package main
import (
"context"
"github.com/formancehq/formance-sdk-go/v2"
"github.com/formancehq/formance-sdk-go/v2/pkg/models/shared"
"log"
)
func main() {
s := v2.New(
v2.WithSecurity(shared.Security{
Authorization: "Bearer <YOUR_ACCESS_TOKEN_HERE>",
}),
)
ctx := context.Background()
res, err := s.GetVersions(ctx)
if err != nil {
log.Fatal(err)
}
if res.GetVersionsResponse != nil {
// handle response
}
}