MediaLab Showroom API
MediaLab API Definitions
Template:
A Template is an actual room design. So template 1 might be the store-like showroom, and template 2 might be the 2-story penthouse design showroom. Each template has an ID (Id), a set of unique themes (colors), and a unique set of image slots (ImageSlots). In the API, Templates can be assigned to a Store record using the ThemeId, because each ThemeId implies a certain Template. Changing a Template in a Store record involves swapping out the ImageSlot IDs one by one, so that the new slot IDs match the new Template.
Theme:
A Theme is a color variation within a Template. Each theme is represented by a ThemeId, unique to the Template that owns it. You can assign a Template to a Store record using a ThemeId, because each ThemeId implies a certain template. Themes are image-agnostic, as each Theme within a Template uses the same image slots. We need to map Themes to Templates and vice-versa on our side, so that we can do quick lookups to set the default Theme when a Store’s Template changes.
Store:
A store is a Plumb Club member. Each store in the MediaLab API represents a member, and contains properties for the member’s Template choice, Theme choice, and Image Slots. The “Name” field in the Store record is set using the memberShowroom showroomURL from the PHP side.
Image Slots:
Each Template has a set of unique Image Slots that are used to plug images into the Template. When a Store changes Templates, we need to change both the Template and the Image Slots associated with that Store.
See issue here for notes on development of API: https://punchmark.atlassian.net/browse/TPC-11