sam152/roomlio-sdk

PHP SDK for Roomlio.

0.1.1 2023-03-20 00:43 UTC

This package is auto-updated.

Last update: 2024-12-20 04:32:57 UTC


README

An unofficial PHP SDK for Roomlio.

Example of using the embed API:

<?php

use RoomlioSdk\EmbedApi\SecureEmbedCodePayloadGenerator;
use RoomlioSdk\EmbedApi\Room;
use RoomlioSdk\EmbedApi\CurrentUser;

$payloadGenerator = new SecureEmbedCodePayloadGenerator('hmac-secret');

$embedPayload = $payloadGenerator->singleRoom(new Room('key', 'Room Name'), new CurrentUser('uid-1', 'Jobe Taskman'));
var_export($embedPayload);

Example of using the web API:

<?php

use RoomlioSdk\WebApi\WebApiClient;
use GuzzleHttp\Client;

$client = new WebApiClient('api-key', new Client());

$response = $client->roomHistory('room-key');
var_export($response->data);

while ($response->hasMore()) {
    $response = $client->nextPage($response);
    var_export($response->data);
}