Skip to content

Latest commit

 

History

History
executable file
·
31 lines (27 loc) · 654 Bytes

USAGE.md

File metadata and controls

executable file
·
31 lines (27 loc) · 654 Bytes
package main

import (
    "context"
    "log"
    "github.com/speakeasy-sdks/formance-go-sdk"
    "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/shared"
    "github.com/speakeasy-sdks/formance-go-sdk/pkg/models/operations"
)

func main() {
    s := formance.New(
        WithSecurity(        shared.Security{
            Authorization: "Bearer YOUR_ACCESS_TOKEN_HERE",
        }),
    )

    ctx := context.Background()
    res, err := s.GetServerInfo(ctx)
    if err != nil {
        log.Fatal(err)
    }

    if res.ServerInfo != nil {
        // handle response
    }
}