evonove / mkm-sdk

33 stars 14 forks source link

fix bug in API_MAP/2.0/wants_list breaking op. #56

Closed lukegothic closed 4 years ago

lukegothic commented 4 years ago

API_MAP/2.0/wants_list has a dict with duplicate keys (get_wants_list), so only the latest one is preserved, thus making it unable to query for all the wantlists of the authenticated user.

Proposed fix is to rename the get_wants_list "items" key as shown in the code.

silvanocerza commented 4 years ago

Hey! Nice catch and thank you for contributing to the project but I'd love if you could do it a bit differently just to avoid breaking changes for existing users.

I'd leave the second get_wants_list, the one you changed, as get_wants_list and change the first one, that should return all list, to get_all_wants_list.

This way existing users will keep using get_wants_list as always without changing code and use get_all_wants_list if they need it.

lukegothic commented 4 years ago

You are right my friend.