Pet Services
Manages pet profiles, profile images, and AI-recommended pet images.
Pre-requisite: The user has to be signed in to perform the following operations.
Overview
The pet services APIs provide functionality to create and manage pet profiles, upload and manage pet images, and handle AI-recommended pet image workflows.
Create Pet Profile
To create a new pet profile within a space, The following method can be used:
spaceId(required): The space ID of the User.request(required): Contains pet profile information.
Factory.petService.createPetProfile(
spaceId: String,
request: CreatePetProfileRequest
) -> IVPublisher<PetProfile>
List Pet Profiles
To fetch all pet profiles associated with a space, The following method can be used:
spaceId(required): The space ID of the User.
Factory.petService.listPetProfiles(
spaceId: String
) -> IVPublisher<ListPetProfilesResponse>
Get Pet Profile
To fetch detailed information of a specific pet profile, The following method can be used:
spaceId(required): The space ID of the User.petId(required): The ID of the Pet.
Factory.petService.getPetProfile(
spaceId: String,
petId: String
) -> IVPublisher<PetProfileDetail>
Update Pet Profile
To update an existing pet profile, The following method can be used:
spaceId(required): The space ID of the user.petId(required): The ID of the pet.request(required): Updated pet profile details.
Factory.petService.updatePetProfile(
spaceId: String,
petId: String,
request: UpdatePetProfileRequest
) -> IVPublisher<PetProfile>
Delete Profile Image
To delete the profile image of a pet, The following method can be used:
spaceId(required): The space ID of the user.petId(required): The ID of the pet.
Factory.petService.deleteProfileImage(
spaceId: String,
petId: String
) -> IVPublisher<Void>
Delete Pet Profile
To delete a pet profile, The following method can be used:
spaceId(required): The space ID of the user.petId(required): The ID of the pet.
Factory.petService.deletePetProfile(
spaceId: String,
petId: String
) -> IVPublisher<Void>
Get Pet Image Upload URL
To fetch upload URL for pet image uploads, The following method can be used:
spaceId(required): The space ID of the user.limit(Optional): Maximum number of images allowed.
Factory.petService.getPetImageUploadURL(
spaceId: String,
limit: Int?
) -> IVPublisher<GetUploadUrlResponse>
Upload Pet Image
To fetchs all pet profiles associated with a space, The following method can be used:
spaceId(required): The space ID of the user.petId(required): The ID of the pet.name(required): Name of the image file.data(required): Binary image data.url(required): Upload URL.authToken(required): Authorization token for upload.
Factory.petService.uploadImage(
spaceId: String,
name: String,
data: Data,
url: String,
authToken: String,
petId: String
) -> IVPublisher<Void>
Attach Pet Images
To associate uploaded images with a pet profile, The following method can be used:
spaceId(required): The space ID of the user.petId(required): The ID of the pet.request(required): Contains image attachment details.
Factory.petService.attachPetImages(
spaceId: String,
petId: String,
request: AttachPetImagesRequest
) -> IVPublisher<PetProfileDetail>
Detach Pet Images
To remove associated images from a pet profile, The following method can be used:
spaceId(required): The space ID of the user.petId(required): The ID of the pet.request(required): Contains image detachment details.
Factory.petService.detachPetImages(
spaceId: String,
petId: String,
request: DetachPetImagesRequest
) -> IVPublisher<PetProfileDetail>
Get Recommended Pet Images
To fetch AI-recommended pet images, The following method can be used:
spaceId(required): The space ID of the user.petId(required): The ID of the pet.
Factory.petService.getRecommendedPetImages(
spaceId: String,
petId: String
) -> IVPublisher<RecommendedPet>
Update Pet Images Feedback
To fetchs all pet profiles associated with a space, The following method can be used:
spaceId(required): The space ID of the user.petId(required): The ID of the pet.request(required): Contains feedback details.
Factory.petService.updatePetImagesFeedback(
spaceId: String,
petId: String,
request: PetImagesFeedbackRequest
) -> IVPublisher<Void>