{"id":18743459,"url":"https://github.com/hanwenbo/ttlock-php-sdk","last_synced_at":"2025-10-13T11:16:57.426Z","repository":{"id":62514559,"uuid":"148633441","full_name":"hanwenbo/TTLock-php-sdk","owner":"hanwenbo","description":"php sdk for TTLock","archived":false,"fork":false,"pushed_at":"2023-05-28T03:10:15.000Z","size":47,"stargazers_count":3,"open_issues_count":3,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-23T16:40:07.175Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hanwenbo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-13T12:20:50.000Z","updated_at":"2023-06-30T15:29:58.000Z","dependencies_parsed_at":"2024-11-07T16:11:49.275Z","dependency_job_id":"b37a693f-a6fb-4c86-b280-5adccb569b23","html_url":"https://github.com/hanwenbo/TTLock-php-sdk","commit_stats":{"total_commits":14,"total_committers":1,"mean_commits":14.0,"dds":0.0,"last_synced_commit":"43b66df85c985d6af4d1c8de426bcfa474385691"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/hanwenbo/TTLock-php-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanwenbo%2FTTLock-php-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanwenbo%2FTTLock-php-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanwenbo%2FTTLock-php-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanwenbo%2FTTLock-php-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hanwenbo","download_url":"https://codeload.github.com/hanwenbo/TTLock-php-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanwenbo%2FTTLock-php-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014762,"owners_count":26085593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T16:11:34.390Z","updated_at":"2025-10-13T11:16:57.411Z","avatar_url":"https://github.com/hanwenbo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TTLock-php-sdk\nphp sdk for TTLock\n\n## Install\n```bash\ncomposer require hanwenbo/ttlock\n```\n\n## 使用\n```php\nuse hanwenbo\\ttlock;\n...\n\n$ttlock = new TTLock($clientId,$clientSecret);\n// oauth2\n$ttlock-\u003eoauth2-\u003etoken($username,$password,$redirect_uri);\n$ttlock-\u003eoauth2-\u003erefreshToken($refresh_token,$redirect_uri);\n\n// date is  Current time (in millisecond)\n$ttlock-\u003euser-\u003eregister($username,$password,$date);\n// Reset password\n$ttlock-\u003euser-\u003eresetPassword($username,$password,$date);\n\n$ttlock-\u003euser-\u003elist($startDate,$endDate,$pageNo,$pageSize,$date);\n$ttlock-\u003euser-\u003edelete($username,$date);\n\n// Lock\n$ttlock-\u003elock-\u003einitialize($lockData,$date,$lockAlias);\n$ttlock-\u003elock-\u003elist($pageNo,$pageSize,$date);\n$ttlock-\u003elock-\u003elistKey($lockId,$pageSize,$date);\n$ttlock-\u003elock-\u003edeleteAllKey($lockId,$date);\n$ttlock-\u003elock-\u003elistKeyboardPwd($lockId,$pageNo,$pageSize,$date);\n$ttlock-\u003elock-\u003echangeAdminKeyboardPwd($lockId,$password,$date);\n$ttlock-\u003elock-\u003echangeDeletePwd($lockId,$password,$date);\n$ttlock-\u003elock-\u003erename($lockId,$lockAlias,$date);\n$ttlock-\u003elock-\u003eresetKey($lockId,$date);\n$ttlock-\u003elock-\u003eresetKeyboardPwd($lockId,$pwdInfo,$timestamp,$date);\n$ttlock-\u003elock-\u003egetKeyboardPwdVersion($lockId,$date);\n$ttlock-\u003elock-\u003eupdateElectricQuantity($lockId,$electricQuantity,$date);\n$ttlock-\u003elock-\u003etransfer($receiverUsername,$lockIdList,$date);\n\n\n// Passcode\n$ttlock-\u003epasscode-\u003eget( int $lockId, int $keyboardPwdVersion, int $keyboardPwdType, int $startDate, int $endDate, int $date ) : array\n$ttlock-\u003epasscode-\u003edelete( int $lockId, int $keyboardPwdId, int $deleteType, int $date ):array\n$ttlock-\u003epasscode-\u003echange( int $lockId, int $keyboardPwdId, string $newKeyboardPwd, int $startDate, int $endDate, int $changeType, int $date ) : array\n$ttlock-\u003epasscode-\u003eadd( int $lockId, string $keyboardPwd, int $startDate, int $endDate, int $addType, int $date ) : array\n\n\n\n// 其他接口本次开发没用上 后续有需要再完善\n\n    \n```\n## TODO\n- Result Model","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanwenbo%2Fttlock-php-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhanwenbo%2Fttlock-php-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanwenbo%2Fttlock-php-sdk/lists"}