Question related to dealID
A dealID that exists on the API means that the deal is still valid? Is it possible that in the past a dealID used to exist on the API but no longer appears and that means that the deal is no longer valid? What about the lastChange, is it related to the dealID and if so, did that same dealID already existed and something changed (if so can we see what changed?) or is it a new deal?
Comments (4)
-
repo owner -
reporter Thank you for the fast reply! With that in mind I have some follow up questions/ clarifications:
1- If I want to know the
cheapestPriceEver
I can call the Games API to get it. But if I want to get the most expensive price “ever” and it’s respective deal I would have to build an incremental mechanism that would persist thedealID
andlastChange
. Since the API is expected to return the same dealID if there’s a price change, once that occurs I would be able to capture at some point the same dealID with a different lastChange date and consequently be able to compare the change of price.2 - If I want to know if a Deal is not on sale anymore I can check via the
isOnSale
= 0 (which probably means thatnormalPrice
=salePrice
). But if I want to know when a deal is not available anymore, the only way I can think of is by calling thedeals?id=
for the respective dealID and checking if there’s any response back? Considering the mechanism in place from the previous question where I would persist on a schedule the dealID and lastChange, it would linearly increase the amount of deals. There’s no scalable way in which I can think of to extract the information regarding if a deal still exists without calling the API for every persisted deal on a regular basis.
Let me know you thoughts!
-
repo owner -
repo owner - changed status to resolved
- Log in to comment
Good question! So, dealID is actually a bit of a misnomer, as it represents a “deal” object in the database, which is really just a Product, at a given Store. So, this may or may not be on sale (e.g. a ‘Deal’), and it also can change price. This is what the lastChange field represents, the last time that Product has changed price.
The only reason a dealID would go away would be if a Product was removed (or changed name) at a Store. Hope this info helps!