Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 587 Bytes

File metadata and controls

31 lines (26 loc) · 587 Bytes
package main

import (
	"context"
	sdkkonnectgo "github.com/Kong/sdk-konnect-go"
	"github.com/Kong/sdk-konnect-go/models/components"
	"log"
)

func main() {
	ctx := context.Background()

	s := sdkkonnectgo.New(
		sdkkonnectgo.WithSecurity(components.Security{
			PersonalAccessToken: sdkkonnectgo.Pointer("<YOUR_BEARER_TOKEN_HERE>"),
		}),
	)

	res, err := s.OpenMeterApps.ListApps(ctx, nil)
	if err != nil {
		log.Fatal(err)
	}
	if res.AppPagePaginatedResponse != nil {
		// handle response
	}
}