{"id":27192230,"url":"https://github.com/imactool/hikcloud","last_synced_at":"2025-04-09T18:44:12.768Z","repository":{"id":42225459,"uuid":"503247050","full_name":"iMactool/hikcloud","owner":"iMactool","description":"海康云牟、企业内部应用开发-社区","archived":false,"fork":false,"pushed_at":"2023-11-27T07:01:29.000Z","size":54,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T18:04:52.912Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iMactool.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-06-14T07:07:46.000Z","updated_at":"2024-07-05T12:03:23.000Z","dependencies_parsed_at":"2023-11-27T08:24:42.828Z","dependency_job_id":"5cc20642-a357-4112-a8e3-62e7d8a4aaae","html_url":"https://github.com/iMactool/hikcloud","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"6436326383d412285ab2a0f9c1a8aceff34eff6f"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMactool%2Fhikcloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMactool%2Fhikcloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMactool%2Fhikcloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMactool%2Fhikcloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iMactool","download_url":"https://codeload.github.com/iMactool/hikcloud/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248090734,"owners_count":21046141,"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","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":"2025-04-09T18:44:12.110Z","updated_at":"2025-04-09T18:44:12.759Z","avatar_url":"https://github.com/iMactool.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e hikcloud \u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e 企业内部应用开发-社区.\u003c/p\u003e\n \n\n## 安装\n\n```shell\n$ composer require imactool/hikcloud -vvv\n```\n\n## 使用\n\n```php\n\n\trequire __DIR__ .'/vendor/autoload.php';\n\n\tuse Imactool\\Hikcloud\\HikCloud;\n\n\n\t$config = [\n\t\t'client_id'     =\u003e '客户端ID',\n\t\t'client_secret' =\u003e '访问密钥'\n\t];\n\t\n\t$hikCloud = new HikCloud($config);\n\t\n\t//开始使用\n       $params = [\n            'communityName' =\u003e'龙湖社区',\n            'provinceCode' =\u003e'130002',\n            'addressDetail' =\u003e'玉兰大道与黄山路交叉口192号'\n\t];\n    $res = $hikCloud-\u003eCommunit-\u003ecommunities($params);\n    var_dump($res);\n\n```\n\n`client_id` 使用云眸系统管理员账号登录开放平台门户网站 [open2.hik-cloud.com](https://www.hik-cloud.com/poseidon/index.html#/) ，进入密钥管理页面查看获取\n\n`client_secret` 使用云眸账号登录开放平台门户网站 [open2.hik-cloud.com](https://www.hik-cloud.com/poseidon/index.html#/) ，进入密钥管理页面查看获取\n\n更多用法请参考源码，支持 6000C。\n\n6000c 拉取视频流 demo\n\n```php\n\n    #1、分页查询云眸社区租户下的社区\n\t$params = [\n\t\t'pageNo'=\u003e1,\n\t\t'pageSize'=\u003e100\n\t];\n    $res = $hik-\u003eCommunit-\u003egetCommunities($params);\n    var_export($res);\n \n    #2、查询社区下的设备列表\n\t$params = [\n\t\t'communityId'=\u003e'123456789',\n\t\t'pageNo'=\u003e2,\n\t\t'pageSize'=\u003e100\n\t];\n\t$res = $hik-\u003eDevice-\u003egetDeviceByCommunityId($params);\n\tvar_export($res);\n\n    #3、查询社区下设备通道列表\n\t$params = [\n\t\t'communityId'=\u003e'123456789',\n\t\t'pageNo'=\u003e2,\n\t\t'pageSize'=\u003e100\n\t];\n\t$res = $hik-\u003eDevice-\u003egetDeviceChannelByCommunityId($params);\n\tvar_dump($res);\n\n\t#4、 获取标准流预览地址(支持6000C子设备通道。)\n\t$params = [\n\t\t'channelId' =\u003e  '1234526789',\n\t\t'protocol'  =\u003e 4,\n\t\t'expireTime' =\u003e 180\n\t];\n\t$res = $hik-\u003eDevice-\u003egetLiveAddressNew($params); \n \tvar_dump($res);\n \t\n \t\n    #查询设备详情\n\t$deviceId = '744e45a58f1c45aa84096fc00476ce53';\n\t$res = $hik-\u003eDevice-\u003egetDeviceInfo($deviceId);\n \tvar_dump($res);\n\n\n\n```\n\n## 参考文档\n\u003e 请熟悉和参考文档的参数要求\n\n[企业内部应用开发-社区 ](https://pic.hik-cloud.com/opencustom/apidoc/online/neptune/4cb4c4f2147e4624bc29408ac70e92c4.html?timestamp=1653966047558)\n\n#### 典型使用场景\n- 访客邀请：通过云眸社区 API实现住户邀请访客以二维码开门的方式出入社区场景。\n- 社区管理：通过云眸社区 API实现社区、楼栋、单元、户室信息的增、删、改、查操作，应用于智慧社区管理场景。\n- 门禁管理：通过云眸社区 API远程操控海康门禁对讲设备，实现人员权限下发，远程一键开门等业务场景。\n- 可视对讲：通过云眸社区 API接入海康可视对讲设备，第三方通过集成可视对讲SDK，实现单元门口机/围墙机的APP呼叫功能，应用于智慧社区场景。\n\n## Contributing\n\nYou can contribute in one of three ways:\n\n1. File bug reports using the [issue tracker](https://github.com/imactool/hikcloud/issues).\n2. Answer questions or fix bugs on the [issue tracker](https://github.com/imactool/hikcloud/issues).\n3. Contribute new features or update the wiki.\n\n_The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable._\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimactool%2Fhikcloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimactool%2Fhikcloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimactool%2Fhikcloud/lists"}