Listing Collection
The Listing Collection view embeds a collection of listings into your application or website. You can configure it using various options and listen for events to track user interactions.
To embed a Listing Detail view, call:
residently.embedView("collection", options);
Example
residently.embedView("collection", {
container: html_element_to_render_into,
collectionToken: "provided_by_residently"
});
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
view | "collection" | ✅ Yes | Must be `"collection" to show the listing collection view. |
options | object | ✅ Yes | Configuration options for the embed view. |
options object
| Property | Type | Required | Description |
|---|---|---|---|
container | HTMLElement | ✅ Yes | The HTML element where the listing will be rendered. |
collectionToken | string | ✅ Yes | The unique identifier for the listing collection to show. Our team will provide this during onboarding. |
Events
Events allow you to track user interactions within the embedded view.
listingClicked
A user clicks on a listing to view its details.
Example usage
residently.on("listingClicked", (listing) => {
console.log("User clicked on listing:", listing);
});
enquiryDetails object schema:
| Property | Type | Description |
|---|---|---|
listingId | string | The unique identifier of the listing. |