eve-val / evelink

Python bindings for the EVE API.
Other
91 stars 30 forks source link

API-breaking change: consider refactoring starbase fuel list to separate out by type #231

Closed clstb closed 4 years ago

clstb commented 8 years ago

corp.starbase_details(starbase_id) https://gyazo.com/467fa6240ed2a3f33cb7837f20e23c51 can u please use keys than are indentifiable ? how is someone supposed to read which is fuel/stront without looking up the typeid in the static export ?

ayust commented 8 years ago

You can call EVE.type_names_from_ids to translate the IDs.

We typically prefer to avoid using item names as keys since sometimes they change (CCP has been known to rename items for usability reasons), and that could break comparisons.

clstb commented 8 years ago

that isnt quite what i meant, i would suggest splitting it in 2 entries for ex.

fuel : {blocks : { type_id : xxx, quantity : xxx }, stront : { type_id : xxx, quantiity : xxx }}

so the dictionary keys are not changing for each pos.

ayust commented 8 years ago

Changing the format like that would break backwards compatibility. We could consider doing it the next time we're doing a breaking release, but probably won't happen right away.

In the meantime, here's one fairly concise workaround if you don't care about the type, only the amount:

STRONT = 16275
fuel_blocks = sum(v for k,v in pos['fuel'].items() if k != STRONT)
clstb commented 8 years ago

that will work well, thank you very much

faithfully Claas Störtenbecker