SpaceTradersAPI / issues-and-suggestions

16 stars 1 forks source link

Suggestion: include cargo volume in the structures inventory #116

Closed TheMadBotter closed 1 year ago

TheMadBotter commented 3 years ago

The structure object as returned by /users/$username/structures and others has an inventory, being a list of goods with their quantity. This does not list the volume of the goods, in contrast to the cargo property of ships and marketplace offers, which do list the volume of goods.

This presents a problem when you want to transfer the maximum possible quantity of goods from a structure to a ship. Players would have to get the volumePerUnit information elsewhere, either going through all marketplaces and ships in the hope that one of them carries the good or hard coding the volumes.

Alternatively there could be an endpoint that lists all the goods and their volume per unit, e.g. /game/goods.

jadlers commented 3 years ago

It's great getting this kind of information, obviously it's an issue which should be solved! The potential solutions you present are both good. Thanks for filing the issue!