Activity Summary & Insights

The summary is the raw activity record for a pet (PetActivities: Walking, Eating, Littering, Resting (Sleeping is deprecated)); the insight is the backend’s interpretation of it.

All calls are on InstaVision.petService.

Pre-requisite: The user has to be signed in to perform the following operations.


Get pet activity summary

To get a pet’s activity summary over a time range, the following method can be used:

  • spaceId (required): The space ID of the device.
  • petId (required): The pet ID.
  • startDate (required): The start of the time range, in epoch milliseconds.
  • endDate (required): The end of the time range, in epoch milliseconds.
InstaVision.petService.getActivitySummary(
  spaceId = "spaceId",
  petId = "petId",
  startDate = 1700000000000,
  endDate = 1700086400000,
  onSuccess = { summaries ->
    // The list of PetActivitySummary objects
  },
  onError = { error ->
    // The error object contains the error code and message
  }
)

Get pet activity insight

To get an AI-generated activity insight for a pet, the following method can be used:

  • spaceId (required): The space ID of the device.
  • petId (required): The pet ID.
InstaVision.petService.getActivityInsight(
  spaceId = "spaceId",
  petId = "petId",
  onSuccess = { insight ->
    // The insight text (String)
  },
  onError = { error ->
    // The error object contains the error code and message
  }
)

This site uses Just the Docs, a documentation theme for Jekyll.