2017 © Pedro Peláez
 

library roomfinder

Finding available meeting rooms, and reserving them

image

degordian/roomfinder

Finding available meeting rooms, and reserving them

  • Tuesday, November 28, 2017
  • by Degordian
  • Repository
  • 6 Watchers
  • 3 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 11 Versions
  • 0 % Grown

The README.md

Room resource managment, finding and reserving available meeting rooms


A php wrapper around something that can handle rooms and their availability(google calendar for instance)
, (*1)

How to install (Composer)

composer require degordian/roomfinder

or add to your project's composer.json, (*2)

"require": {
    "degordian/roomfinder": "*"
}

How to use

First you have to atuthenticate yourself for using google calendar for instance
A google calendar example is in examples/auth
You can add new adapters for room resourcing, currently only Google Calendar is supported, (*3)

Create a google app here:
https://console.developers.google.com/apis/credentials/oauthclient
Export the client_secret.json file
Save it to disk, and paste the path to the file into $clientSecretPath
For $credentialsPath, use the location on your disk where you want the auth.php script to create your auth file
Through the command line, call, (*4)

   php examples/auth.php

This will serve you a google link to authenticate yourself and create a credential file you can then use in your project
, (*5)

Using that file you can now you can initialize an adapter for those rooms, (*6)

$roomResourceAdapter = new RoomResourceGoogleCalendar();
$roomResourceAdapter->setConfig([
    'applicationName' => 'FindARoom',
    'credentialsPath' => '/Users/tonymrakovcic/credentials/calendar-findaroom.json',
    'clientSecretPath' => '/Users/tonymrakovcic/credentials/client_secret.json',
    'scopes' => [\Google_Service_Calendar::CALENDAR],
    'accessType' => 'offline',
])->init();


Initialize a room handler, and register the adapter, (*7)

$roomHandler = new RoomHandler();
$roomHandler->setRoomResourceAdapter($roomResourceAdapter);


Create a room from some data, (*8)

$rooms  = [
    [
        'name' => 'Meeting room one',
        'id' => 'YOUR_CALENDAR_ID_1@group.calendar.google.com',
        'size' => Room::SIZE_BIG,
        'resourceClass' => RoomResourceGoogleCalendar::class,
    ],
    [
        'name' => 'Meeting room two',
        'id' => 'YOUR_CALENDAR_ID_2@group.calendar.google.com',
        'size' => Room::SIZE_MEDIUM,
        'resourceClass' => RoomResourceGoogleCalendar::class,
    ]
];


Add the rooms to the room handler, (*9)

$roomHandler->addRooms($rooms);


Find the availability of all rooms, (*10)

$roomsAvailable = $roomHandler->getAllRoomsAvailability();


Find an availble room, that wont be occupied in the next x minutes, (*11)

$availableRoomNow = $roomHandler->findAvailableRoom(RoomHandler::HOUR);


Find an available room, that wont be occupied in the next x minutes, and filter by size, (*12)

$roomsAvailable = $roomHandler->findAvailableBigRoom();


, (*13)

Reserve a room in the calendar, (*14)

$reservation = $roomHandler->reserveRoom($roomsAvailable[0]);

Contribute

Contributions and comments are more than welcome :)
, (*15)

Questions, problems?

We will do our best to answer all issues, (*16)

License

MIT License, (*17)

The Versions

28/11 2017

dev-master

9999999-dev

Finding available meeting rooms, and reserving them

  Sources   Download

MIT

The Requires

 

by Tony Mrakovcic

calendar meetings reservations rooms

28/11 2017

v1.0.8

1.0.8.0

Finding available meeting rooms, and reserving them

  Sources   Download

MIT

The Requires

 

by Tony Mrakovcic

calendar meetings reservations rooms

28/11 2017

dev-room-resources

dev-room-resources

Finding available meeting rooms, and reserving them

  Sources   Download

MIT

The Requires

 

by Tony Mrakovcic

calendar meetings reservations rooms

13/11 2017

v1.0.7

1.0.7.0

Finding available meeting rooms, and reserving them

  Sources   Download

MIT

The Requires

 

by Tony Mrakovcic

calendar meetings reservations rooms

13/11 2017

v1.0.6

1.0.6.0

Finding available meeting rooms, and reserving them

  Sources   Download

MIT

The Requires

 

by Tony Mrakovcic

calendar meetings reservations rooms

13/11 2017

v1.0.5

1.0.5.0

Finding available meeting rooms, and reserving them

  Sources   Download

MIT

The Requires

 

by Tony Mrakovcic

calendar meetings reservations rooms

13/11 2017

dev-reserve_params

dev-reserve_params

Finding available meeting rooms, and reserving them

  Sources   Download

MIT

The Requires

 

by Tony Mrakovcic

calendar meetings reservations rooms

09/11 2017

dev-licence/change-owner

dev-licence/change-owner

Finding available meeting rooms, and reserving them

  Sources   Download

MIT

The Requires

 

by Tony Mrakovcic

calendar meetings reservations rooms

09/11 2017

v1.0.4

1.0.4.0

Finding available meeting rooms, and reserving them

  Sources   Download

MIT

The Requires

 

by Tony Mrakovcic

calendar meetings reservations rooms

09/11 2017

v1.0.3

1.0.3.0

Finding available meeting rooms, and reserving them

  Sources   Download

The Requires

 

by Tony Mrakovcic

calendar meetings reservations rooms

09/11 2017

1.0

1.0.0.0

Finding available meeting rooms, and reserving them

  Sources   Download

The Requires

 

by Tony Mrakovcic

calendar meetings reservations rooms