You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// With the list of VINs, you could query your service
177
+
// to obtain the dataset of imagery for those vehicles.
178
+
179
+
// Code to query your service goes here.
180
+
constimagesData=awaitqueryYourService(vins);
181
+
182
+
// With the returned `imagesData`, you could then construct an array of objects in the following format to use when calling `API.insertGalleryContent`.
The `insertGalleryContent` method allows you to add media to media galleries across various pages of Dealer.com sites. The only currently supported target is `vehicle-media`, which will insert media into the media carousel of Vehicle Details Pages.
238
+
The `insertGalleryContent` method allows you to add media to media galleries across various pages of Dealer.com sites. The only currently supported target is `vehicle-media`, which will insert media into the media carousels on Search Results Pages and Vehicle Details Pages.
193
239
194
-
`objOrArray` is an array of objects describing the media to be inserted. If you have a single image, you can pass a single object instead. Each object has a `type` field to specify the type of media to be inserted. The only currently supported media type is `image`.
240
+
`arrayOfObjects` is an array of objects describing the media to be inserted. Each object requires a `vin` field for the target vehicle, as well as an `images` array with fields describing the images to insert for that vehicle. The `type` field specifies the type of media to be inserted. The only currently supported media type is `image`. Utilizing `vehicle-data-updated-v1` to know when the list of vehicles changes combined with `API.utils.getAttributeForVehicles`, you can easily obtain a list of the VINs for vehicles shown on the page. With this data, you could query your service to get the dataset of imagery for those vehicles, then construct the array of objects for `API.insertGalleryContent`. See the example code for more details on this approach.
195
241
196
-
The `image` type supports the following additional attributes:
242
+
The `images` array objects support the following additional attributes:
0 commit comments