getPetDetail(data: GetPetDetail)
Requires:
@ray-js/ray≥1.6.27
Description
Get pet details
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Yes | Request parameters: ownerId (home ID), id (pet ID) |
Return Value
Type: Promise<PetDetail>
Promise; resolves to pet details (PetDetail)
Referenced Types
type
PetDetail| Property | Type | Description |
|---|---|---|
ownerId | string | Home ID |
petType | "cat" | "dog" | Pet type |
name | string | Pet name; must not exceed 40 characters |
avatar | string | Pet avatar path; starts with "smart/" |
sex | number | Sex: 0 - female, 1 - male, 2 - spayed female, 3 - neutered male |
activeness | number | Activity level: 0 - inactive, 1 - normal, 2 - very active |
birth | number | Birthday, unit: milliseconds |
weight | number | Weight, unit: g |
breedCode | string | Breed code (obtain from the pet breed list API) |
rfid | string | rfid |
id | number | Pet ID |
avatarDisplay | string | Accessible path for pet avatar |
breedName | string | Breed name |
extInfo | string | Additional information; do not include sensitive information |
personalities | string[] | Pet personality code |
| Front-facing photo of the pet | ||
| Pet feature code | ||
devIds | string[] | Associated device IDs |
| Associated main food information | ||
weightType | 0 | 1 | 2 | Body condition: 0 - underweight, 1 - normal, 2 - overweight (requires associated main food, breed, etc.) |
dailyCalorie | number | Daily recommended calories, unit: Kcal (requires associated main food, breed, etc.) |
dailyFeeding | number | Daily recommended feeding amount, unit: g (requires associated main food, breed, etc.) |
gmtCreate | number | Creation timestamp, in milliseconds |
gmtModified | number | Update timestamp, in milliseconds |
Valid Values
PetDetail.petType
| Value | Description | Since |
|---|---|---|
cat | - | - |
dog | - | - |
PetDetail.weightType
| Value | Description | Since |
|---|---|---|
0 | - | - |
1 | - | - |
2 | - | - |