updatePet(data: Partial)

Requires:
@ray-js/ray≥1.6.27

Description

Update pet information

Parameters

PropertyTypeRequiredDescription
YesRequest parameters: must include id, ownerId, and fields to update; see type PetUpdate for details

Return Value

Type: Promise<boolean>
Promise; resolves to whether the update succeeded (boolean)

Valid Values

data.petType
ValueDescriptionSince
cat--
dog--

Examples

Request example

import { updatePet } from '@ray-js/ray';

updatePet({
  id: 1,
  ownerId: 'xxxx',
  petType: 'cat',
  name: 'Fubao',
  avatar: 'smart/xxxx/xxxx/xxxx',
  sex: 1,
  activeness: 1,
  birth: 1614528000000,
  weight: 5000,
  breedCode: 'xxx',
  idPhotos: [
    {
      angle: 'firstFront',
      objectKey: 'xxxx',
    },
  ],
  features: [
    {
      category: 'eyeColor',
      details: ['brown'],
    },
  ],
});

Response example

true