How to access number of watchers and views in Java Script?

I’m trying to write a script that updates prices depending of number of parameters. I need the number of views and number of watchers for a listing object in JS. I don’t see any of these properties in eBay Listing JavaScript object properties documentation. Trying to use “.views” or “.watchers” does not work, it’s NaN, undefined. Anyone figured out how to access this data? Devs please advise. Thanks!

Here you go:

GarageSale 9.6 Beta 2 Released

Here is a example script:

function run(){
	for (const listing of selectedListings) {
		consoleLog("watchers:" + listing.watchers);
		consoleLog("views:" + listing.views);
	}
}
1 Like

That was fast! Many thanks!!!

Any chance you can also add startDate to JavaScript eBay object properties? Thanks again!!!

1 Like

Please check out Beta 3:

Scratch that. Better wait for beta 4.

Okay! :+1: :+1: :+1:

Now it should be working:

Can this START DATE be added to the smart group items list?

Checkout the latest beta version. It features a “Day since Start” smart group rule:

Awesome, thank you!!!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.