# api-sdk **Repository Path**: uclbrt/api-sdk ## Basic Information - **Project Name**: api-sdk - **Description**: API SDK for Qrmaster - **Primary Language**: PHP - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2019-02-27 - **Last Updated**: 2025-05-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # uclbrt-api-sdk #### Introduction This SDK is to help the developer to quickly connect to the QR Master Access Management System. #### Installation ```bash $ composer require uclbrt/api-sdk ``` #### Instructions ###### Create room key ```php 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 ```php /**** 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 1. QR Master [http://qrm.uclbrt.com/](http://qrm.uclbrt.com/) 2. DevelopDoc [http://qrm.uclbrt.com/openProfile.html#openCenterMenuAnchor](http://qrm.uclbrt.com/openProfile.html#openCenterMenuAnchor) #### Licence code The MIT License (MIT).For more information, please refer to [License code](https://gitee.com/uclbrt/api-sdk/blob/master/LICENSE).