Skip to content

Latest commit

 

History

History
29 lines (25 loc) · 600 Bytes

USAGE.md

File metadata and controls

29 lines (25 loc) · 600 Bytes
package main

import (
	"context"
	writerclientsdkgo "github.com/writerai/writer-client-sdk-go"
	"github.com/writerai/writer-client-sdk-go/pkg/models/shared"
	"log"
)

func main() {
	s := writerclientsdkgo.New(
		writerclientsdkgo.WithSecurity("<YOUR_API_KEY_HERE>"),
		writerclientsdkgo.WithOrganizationID(850421),
	)

	ctx := context.Background()
	res, err := s.Billing.GetSubscriptionDetails(ctx)
	if err != nil {
		log.Fatal(err)
	}
	if res.SubscriptionPublicResponseAPI != nil {
		// handle response
	}
}