mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
Co-authored-by: Maxence Maireaux <[email protected]> Co-authored-by: David Ragot <[email protected]>
558 B
558 B
package main
import (
"context"
formancesdkgo "github.com/formancehq/formance-sdk-go"
"github.com/formancehq/formance-sdk-go/pkg/models/shared"
"log"
)
func main() {
s := formancesdkgo.New(
formancesdkgo.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
}
}