diff --git a/src/SlotDbClient.php b/src/SlotDbClient.php index 87d6c8e..43a9796 100644 --- a/src/SlotDbClient.php +++ b/src/SlotDbClient.php @@ -57,6 +57,26 @@ class SlotDbClient return $data; } + public function createSlot(string $slotId, string $slotName, array $props = []): array + { + $slot = [ + 'slot' => $slotId, + 'name' => $slotName, + 'props' => $props + ]; + $res = $this->post("/slots", [ $slot ]); + var_dump((string)$res->getBody()); + $data = json_decode($res->getBody(), true); + return $data; + } + + public function createMultipleSlots($slots): array + { + $res = $this->post("/slots", $slots); + $data = json_decode($res->getBody(), true); + return $data; + } + /** * Update properties for the slot $slotId, return new properties *