Find pet by ID.
Parameters
petID int64
formatint64
Returns
Find pet by ID.
package main
import (
"context"
"fmt"
"github.com/pedro/barkend"
"github.com/pedro/barkend/option"
)
func main() {
client := barkend.NewClient(
option.WithBearerToken("My Bearer Token"),
)
pet, err := client.Pets.Get(context.TODO(), 0)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", pet.ID)
}
{
"name": "doggie",
"photoUrls": [
"string"
],
"id": 10,
"category": {
"id": 1,
"name": "Dogs"
},
"status": "available",
"tags": [
{
"id": 0,
"name": "name"
}
]
}{
"error": {
"id": "invalid_id",
"message": "Invalid ID supplied"
}
}{
"error": {
"id": "not_found",
"message": "Pet not found"
}
}Returns Examples
{
"name": "doggie",
"photoUrls": [
"string"
],
"id": 10,
"category": {
"id": 1,
"name": "Dogs"
},
"status": "available",
"tags": [
{
"id": 0,
"name": "name"
}
]
}{
"error": {
"id": "invalid_id",
"message": "Invalid ID supplied"
}
}{
"error": {
"id": "not_found",
"message": "Pet not found"
}
}