Skip to content
This repository was archived by the owner on Mar 25, 2022. It is now read-only.

Add IDs to items, add more functionality to Inventories#16

Merged
alicerunsonfedora merged 6 commits intoprospect-park-db4from
prospect-park-db4-inventories
Dec 21, 2019
Merged

Add IDs to items, add more functionality to Inventories#16
alicerunsonfedora merged 6 commits intoprospect-park-db4from
prospect-park-db4-inventories

Conversation

@alicerunsonfedora
Copy link
Copy Markdown
Member

@alicerunsonfedora alicerunsonfedora commented Dec 13, 2019

This PR makes the following changes:

  • Adds an optional itemId type to ASInventoryItem
  • Implements new export, getItemById, and removeItem methods in ASInventories
  • Deprecates retrieve in favor of export
  • Updates addItem with a silent parameter to stop flooding of notifications if unneeded
  • Updates documentation with new Inventories changes

@alicerunsonfedora alicerunsonfedora requested a review from a team December 13, 2019 21:14
@alicerunsonfedora
Copy link
Copy Markdown
Member Author

Noting that export is a function that takes a function as its parameter to filter the items. For example, to grab IDs of items using export:

idOnlyFilter = lambda item: item.itemId
exportedInv = inventory.export(idOnlyFilter)

(This makes use of the map function to apply this filtering down).

@alicerunsonfedora
Copy link
Copy Markdown
Member Author

Performing executive order and merging.

@alicerunsonfedora alicerunsonfedora merged commit c967f89 into prospect-park-db4 Dec 21, 2019
@alicerunsonfedora alicerunsonfedora deleted the prospect-park-db4-inventories branch December 21, 2019 16:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant