saik0/humblebundle-python

api/v1/user/order structure changed

saik0 opened this issue · 4 comments

It now returns an array like

[
    {'gamekey': '<key>'}
    ...
]

pretty printed and all

Reported downstream at yamatt#1

@yamatt I'm thinking that we:

  • add a gamekeys method that returns a list of strings
  • change method signature order_list(self, gamekeys=None, *args, **kwargs)
    • if no gamekeys call client.gamekeys and recursively fill like #3
  • make ``Order.ensure_subproducts` a no-op and mark it deprecated

order_list will still do what library users were expecting at a high level, clients that want to iterate order-by-order can use the gamekeys method, and we wont have any awkward Gamekey models. Thoughts?

@saik0 seems reasonable to me. My only reservation is that the gamekeys method could do with a more explicit name. get_gamekeys?

@yamatt that sounds good, it would be a good time to change all the other get methods too while deprecating the old names

1.0 ;)