Skip to content

Conversation

@DLBPointon
Copy link

Hi Elaws,

Thanks for producing such a robust script, I've been using it quite a bit over the weekend.

I've added another 5 fields from the API that I quite like to have:

  • avRating - Average Rating reported by the API
  • genre - the categories field in the API
  • bookDesc - The blurb of the book
  • mature - A rating for whether or not a book is rated as MATURE or NOT_MATURE
  • pageCount - The total number of pages reported for the book

This all works <--

I also tried adding retail information, I like to sum up how much my books have cost me and how much I'll be spending on those I haven't read or bought yet, but I ran into an issue where it just does not exist in many cases.

I tried:

	const selectedBookRetail = selection.saleInfo.retailPrice;

	let gprice = 0
        // Presence of retailPrice.amount indicates presence of currencyCode
	if (typeof(selectedBookRetail.amount) !== "undefined") {
		let getPrice = selectedBookRetail.amount
                let getCurrency = selectedBookRetail.currencyCode
	}
       ......
        currency: getCurrency
        price: getPrice

But I don't know enough JavaScript to make this work completely. But I'll work on that if you don't want to.
Thanks,
DLBPointon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant