3 Star 2 Fork 0

广州畅联信息科技有限公司 / api-sdk

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

uclbrt-api-sdk

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

  1. QR Master http://qrm.uclbrt.com/
  2. DevelopDoc http://qrm.uclbrt.com/openProfile.html#openCenterMenuAnchor

Licence code

The MIT License (MIT).For more information, please refer to License code.

The MIT License (MIT) Copyright (c) 2019 Paddy Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

API SDK for Qrmaster 展开 收起
PHP
MIT
取消

发行版 (3)

全部

贡献者

全部

近期动态

加载更多
不能加载更多了
PHP
1
https://gitee.com/uclbrt/api-sdk.git
git@gitee.com:uclbrt/api-sdk.git
uclbrt
api-sdk
api-sdk
master

搜索帮助

14c37bed 8189591 565d56ea 8189591