Find pet by ID.
Parameters
petID int64
formatint64
Returns
Find pet by ID.
package main
import (
"context"
"fmt"
"github.com/stainless-sdks/barkend-go"
"github.com/stainless-sdks/barkend-go/option"
)
func main() {
client := barkend.NewClient(
option.WithAPIKey("My API Key"),
)
pet, err := client.Pets.Get(context.TODO(), 0)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", pet.ID)
}
{
"error": {
"id": "invalid_id",
"message": "Invalid ID supplied"
}
}
{
"error": {
"id": "not_found",
"message": "Pet not found"
}
}
Returns Examples
{
"error": {
"id": "invalid_id",
"message": "Invalid ID supplied"
}
}
{
"error": {
"id": "not_found",
"message": "Pet not found"
}
}