Skip to content

Latest commit

 

History

History
34 lines (30 loc) · 589 Bytes

USAGE.md

File metadata and controls

34 lines (30 loc) · 589 Bytes
package main

import (
	"context"
	golxpets "github.com/speakeasy-sdks/golx_pets"
	"github.com/speakeasy-sdks/golx_pets/pkg/models/shared"
	"log"
)

func main() {
	s := golxpets.New(
		golxpets.WithSecurity("Bearer <YOUR_ACCESS_TOKEN_HERE>"),
	)

	ctx := context.Background()
	res, err := s.Pet.AddPetForm(ctx, shared.Pet{
		ID:   golxpets.Int64(10),
		Name: "doggie",
		PhotoUrls: []string{
			"<value>",
		},
	})
	if err != nil {
		log.Fatal(err)
	}
	if res.Pet != nil {
		// handle response
	}
}