Find pet by ID.
client.pets.retrieve(numberpetID, RequestOptionsoptions?): Pet { name, photoUrls, id, 3 more }
/pet/{petId}
Find pet by ID.
Parameters
petID: number
formatint64
Returns
Find pet by ID.
import Barkend from 'barkend';
const client = new Barkend({
apiKey: process.env['BARKEND_API_KEY'], // This is the default and can be omitted
});
const pet = await client.pets.retrieve(0);
console.log(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"
}
}