Download the PHP package lustmored/lockme-sdk without Composer
On this page you can find all versions of the php package lustmored/lockme-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package lockme-sdk
LockMe SDK
PHP SDK for interacting with the LockMe API. This library provides a simple interface for authentication and making API calls to the LockMe platform.
For comprehensive API documentation, please visit https://apidoc.lock.me/.
Requirements
- PHP 7.2 or higher
- ext-json
- Composer
Installation
You can install the package via composer:
Configuration
To use the SDK, you need to create an instance with your client credentials:
Authentication
The SDK uses OAuth2 for authentication. Here's how to implement the authentication flow:
Step 1: Get Authorization URL
Step 2: Handle the Callback
Step 3: Use the Saved Token
API Usage Examples
Test Connection
Get Room List
Get Room Details
Edit Room Details
Get Bookings for a Room
Add a Booking
Get Booking Details
Note: Whenever a booking ID is used, you can also use an external ID (the one set via API) by using the format "ext/{id}". For example:
$reservationId = 'ext/abc123';
Edit a Booking
Delete a Booking
Get Date Settings
Set Date Settings
Available Methods
getAuthorizationUrl(array $scopes): Get the authorization URL for OAuth2 flowgetTokenForCode(string $code, string $state): Exchange authorization code for access tokenrefreshToken(?AccessToken $accessToken): Refresh an access tokensetDefaultAccessToken($token): Set the default access token for API callsloadAccessToken(callable $load, ?callable $save): Load and optionally set up saving of access tokenTest(): Test the API connectionRoomList(): Get list of roomsGetRoom(int $roomId): Get room detailsEditRoom(int $roomId, array $data): Update room details (calendarMarginonly)Reservation(int $roomId, string $id): Get booking detailsAddReservation(array $data): Create a new bookingDeleteReservation(int $roomId, string $id): Delete a bookingEditReservation(int $roomId, string $id, array $data): Edit a bookingMoveReservation(int $roomId, string $id, array $data): Move a bookingGetReservations(int $roomId, DateTime $date): Get bookings for a room on a specific dateGetMessage(int $messageId): Get a messageMarkMessageRead(int $messageId): Mark a message as readGetDateSettings(int $roomId, DateTime $date): Get settings for a specific dateSetDateSettings(int $roomId, DateTime $date, array $settings): Set settings for a specific dateRemoveDateSettings(int $roomId, DateTime $date): Remove custom settings for a specific dateGetDaySettings(int $roomId, int $day): Get settings for a specific day of the weekSetDaySettings(int $roomId, int $day, array $settings): Set settings for a specific day of the week
License
This package is licensed under the GPL-3.0-or-later License - see the LICENSE file for details.
Author
- Jakub Caban ([email protected])
All versions of lockme-sdk with dependencies
ext-json Version *
league/oauth2-client Version ^2.2
lustmored/oauth2-lockme Version ^1.6.0
symfony/lock Version ^6.0 || ^7.0 || ^8.0