allisonking / wacks-by-warby

etsy discord integration for a highly specific purpose
0 stars 0 forks source link

Restructure `werbies.json` to also be able to take shift4shop order IDs #8

Closed allisonking closed 1 year ago

allisonking commented 1 year ago

werbies.json is currently keyed by the Etsy store ID. We need to be able to also get the shift4shop ID. The easiest thing to do would probably be to add an optional field to Werbys for shift4shop_id and fill those in. We won't get to index directly into the dict for shift4shop, but performance really is not a concern here for such a small number.

  1. Add a field to each werbies.json with shift4shop's product ID (not sure where to get the product ID, might just need to query the API)
  2. Update wack.py for wacks4shop to be able to grab the werby entry based on shift4shop ID. This will probably entail refactoring announce_new_sales