uclbrt / api-sdk
Qrmaster API SDK for PHP
v1.1.2
2022-04-25 01:30 UTC
Requires
- php: >=5.4.0
Requires (Dev)
- php: >=5.4.0
This package is not auto-updated.
Last update: 2025-05-05 15:40:47 UTC
README
Introduction
This SDK is to help the developer to quickly connect to the QR Master Access Management System.
Installation
$ composer require uclbrt/api-sdk
Instructions
Create room key
use uclbrt\Key;
...
try{
$key = new Key([
'accountSid' => 'your account sid from QR Master',
'authToken' => 'your auth token from QR Master',
]);
$key->setCommunityNo('your community No. from QR Master');
$key->setCommunityTimezone('Timezone set in the information of community of QR Master, eg: Asia/Shanghai, Etc/GMT-8');
$cardNo = $key->createRoomKey($mobile, $areaCode, $roomNo, $floorNo, $buildNo);
}
catch (Exception $e)
{
// Your wrong operation
}
...
Available Methods
/**** QR code related ****/
// Create room key
createRoomKey($mobile, $areaCode, $roomNo, $floorNo='', $buildNo='', $startTime='', $endTime='', $sendSms=0, $times=0)
// Create floor key
createFloorKey($mobile, $areaCode, $floorNo, $buildNo, $startTime='', $endTime='', $sendSms=0)
// Create Building key
createBuildingKey($mobile, $areaCode, $buildNo, $startTime='', $endTime='', $sendSms=0)
// Create room lost keys
createRoomLostKey($mobile, $areaCode, $roomNo, $floorNo='', $buildNo='', $startTime='', $endTime='')
// Room Card lost report
reportCardLost($cardNo, $wholeRoom = false)
// Get room key(link)
getRoomKeyLink($mobile, $areaCode, $cardNo='')
// Get floor key(link)
getFloorKeyLink($mobile, $areaCode, $cardNo='')
// Get building key(link)
getBuildingKeyLink($mobile, $areaCode, $cardNo='')
// Get room key(image)
getRoomKeyImage($mobile, $areaCode, $cardNo, $openEndTime='')
// Get Floor key(image)
getFloorKeyImage($mobile, $areaCode, $cardNo, $openEndTime='', $lockType=0)
// Get Building key(image)
getBuildingKeyImage($mobile, $areaCode, $cardNo, $openEndTime='', $lockType=0)
// Cancel the room key
cancelRoomKey($cardNo)
// Cancel the floor key
cancelFloorKey($cardNo)
// Cancel the building key
cancelBuildingKey($cardNo)
// Generate QRP room cipher
generateQRPRoomCipher($mobile, $areaCode, $roomNo, $floorNo='', $buildNo='', $startTime='', $endTime='', $cipherType = 1)
// Get QRP room cipher
getQRPRoomCipher($mobile, $areaCode, $cardNo)
/**** Issuer related ****/
// Get the list of card issuers
getMacList()
// Issue RF card
makeCard($issueMac, $buildNo, $floorNo, $roomNo, $endTime, $creatorAreaCode, $creatorMobile, $creatorPassword, $owner = '', $opentype = 0, $ownerGender = 1, $ownerAreaCode = '', $ownerMobile = '', $creatorEmail = '')
// Issue RF lost card
makeLostCard($issueMac, $buildNo, $floorNo, $roomNo, $endTime, $creatorAreaCode, $creatorMobile, $creatorPassword, $owner = '', $opentype = 0, $ownerGender = 1, $ownerAreaCode = '', $ownerMobile = '', $creatorEmail = '')
// Read Card
readCard($issueMac, $creatorAreaCode, $creatorMobile, $creatorPassword, $operateCardType, $creatorEmail = '')
// Cancel Card
cancelCard($issueMac, $serialNum, $creatorAreaCode, $creatorMobile, $creatorPassword, $operateCardType, $creatorEmail = '')
Reference link
- QR Master http://qrm.uclbrt.com/
- DevelopDoc http://qrm.uclbrt.com/openProfile.html#openCenterMenuAnchor
Licence code
The MIT License (MIT).For more information, please refer to License code.