Gede: I love how you (mrkgnao) know all the limits of GOG's system (like the maximum number of logins per hour per IP :-)
Well, I have to live with it on a daily basis. If I am debugging or developing a feature that requires login (such as this one), I know that I have three attempts to get it right, then I need to wait an hour before attempting again, and these shouldn't be one hour before or after MaGog's regular run. Given that MaGog's regular run takes 1.5 hours every 6 hours and employ two logins, I have a pretty narrow window of time to work on new features.
Gede: It seems like I misunderstood your objective (and the number of HTTP requests you can make. Also, I thought HTTPS was optional).
I thought that you wanted to determine that BGEE + BG2EE +IWDEE + BG + BG2 + IWD is cheaper if purchased together, and that the HM + HM2 + HM2C is a bundle. Also, I was under the impression that all these bundles were advertised as such by GOG.
My objective is to determine if a given game has a bundle discount, namely has a larger discount if it is bundled with some other (unknown) games, and what that discount is. C'est tout.
Gede: (Side question: You mean GOG's update flags are not always right?! You keep surprising me!) Surprise is my middle name.
Gede: If you don't care about
what games constitute a bundle, things can be made
simpler (which does not mean simple).
Do you know the current limit of items in GOG's cart?
I don't know exactly, but problems began around the time the catalogue reached 1400 games. However...
You probably assume it's a fixed number. It is not.
In February the same cart size would work on some days and not on others. It was pretty clearly related to how many games were on sale that day (which probably affects the complexity of determining game prices). Accordingly, on weekends it tended to fail more than on weekdays.
Also, like many things on GOG, it might well be affected by server load (e.g. number of accesses allowed before one's IP is blocked for 18 hours is dependent on server load, I believe, which is why it tends to happen more for MaGog during big sales).
Gede: Also, do you also care about the
minimum price for a game, should it be part of two or more bundles?
Yes.
Not that I have seen a game belonging to two bundles. I expect GOG will implode if that ever happened.
Gede: Finally, does the cart need to be updated item by item, or can you alternate between sets of games easily?
This is GOG. The word "easily" does not compute.
There is one cart and two operations: add and remove, each with one parameter (id). I believe you can also send a list of ids, not just one, but I didn't find it faster, so MaGog usually works one by one.
BTW, the more games there are in the cart, the longer it takes to add or remove one game. Adding the 1000th game takes seconds, while adding the 1st takes milliseconds.
EDIT: There is a third operation and that is obtaining the cart contents and prices. It is is a very lengthy operation on GOG (if it doesn't fail, as it does now), so you don't want to do it too often. I do it twice per regular run.