{"id":19621562,"url":"https://github.com/pkg6/easy-im","last_synced_at":"2025-04-28T03:32:18.984Z","repository":{"id":40523912,"uuid":"482915664","full_name":"pkg6/easy-im","owner":"pkg6","description":"非官方即时通信 IM，支持腾讯IM，环信IM，极光IM，融云IM，网易云信IM等","archived":false,"fork":false,"pushed_at":"2024-03-01T04:24:37.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-05T06:11:09.720Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/pkg6.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}},"created_at":"2022-04-18T16:24:36.000Z","updated_at":"2023-01-04T03:57:41.000Z","dependencies_parsed_at":"2023-02-07T05:00:28.068Z","dependency_job_id":"dc986f2e-8583-4871-ba7c-08e2b1d07898","html_url":"https://github.com/pkg6/easy-im","commit_stats":{"total_commits":1,"total_committers":1,"mean_commits":1.0,"dds":0.0,"last_synced_commit":"68092e88ea70115b0092da2c0cdfc47734957d58"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg6%2Feasy-im","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg6%2Feasy-im/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg6%2Feasy-im/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg6%2Feasy-im/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pkg6","download_url":"https://codeload.github.com/pkg6/easy-im/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251246278,"owners_count":21558762,"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":"2024-11-11T11:23:33.709Z","updated_at":"2025-04-28T03:32:18.598Z","avatar_url":"https://github.com/pkg6.png","language":"PHP","readme":"\u003cp align=\"center\"\u003e\n\t\u003cstrong\u003e非官方即时通信SDK easy-im\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003e 非官方即时通信SDK，支持腾讯IM，环信IM，极光IM，融云IM，网易云信IM等\n\n\n## 安装\n\n~~~~\ncomposer require pkg6/easy-im\n~~~~\n\n## 请求日志开启\n\n~~~\n\\Pkg6\\easyIm\\Kernel\\BaseClient::$request_log=true;\n~~~\n\n## 自定义缓存\n\n\u003e 基于https://packagist.org/packages/psr/simple-cache#1.0\n\n~~~\n$config = [\n    'appId'      =\u003e '5978322198',\n    'identifier' =\u003e 'administrator',\n    'secretKey'  =\u003e 'nfugb53xtlhyfq2kgiriganruyoagh93it1zwysmh2tmj5tnnmuqhd2og5ofktjt',\n    'cache'      =\u003e [\n        //必须定义\n        \"class\"         =\u003e \\Pkg6\\Cache\\cache\\driver\\File::class,\n        //其他选项\n        'expire'        =\u003e 0,\n        'cache_subdir'  =\u003e true,\n        'prefix'        =\u003e '',\n        'path'          =\u003e './cache/',\n        'hash_type'     =\u003e 'md5',\n        'data_compress' =\u003e false,\n        'tag_prefix'    =\u003e 'tag:',\n        'serialize'     =\u003e [],\n    ],\n];\n$im     = Pkg6\\easyIm\\Factory::Tencent($config);\n~~~\n\n\n## 案例\n\n### [腾讯IM](https://curl.qcloud.com/OcLpzLhC) \n\n~~~\n$config = [\n  'appId'      =\u003e '5978322198',\n  'identifier' =\u003e 'administrator',\n  'secretKey'  =\u003e 'nfugb53xtlhyfq2kgiriganruyoagh93it1zwysmh2tmj5tnnmuqhd2og5ofktjt',\n];\n$im = Pkg6\\easyIm\\Factory::Tencent($config);\n// 自定义请求(账号同步到云端)\n$params = [\n    'Identifier' =\u003e 'easyim',\n    'Nick'       =\u003e 'easyim',\n    'FaceUrl'    =\u003e 'https://github.com/Pkg6/easy-im',\n];\n$im-\u003erequest-\u003esend('im_open_login_svc/account_import', $params);\n~~~\n\n### [环信IM](https://www.easemob.com/) \n\n~~~\n$config = [\n  'appKey'       =\u003e '',\n  'clientId'     =\u003e '',\n  'clientSecret' =\u003e '',\n  'orgName'      =\u003e '',\n  'appName'      =\u003e '',\n];\n$im = Pkg6\\easyIm\\Factory::Huanxin($config);\n\n// 自定义请求(账号同步到云端)\n$params = [\n    'username' =\u003e 'easyim',\n    'password' =\u003e '123456',\n    'nickname' =\u003e 'easyim'\n];\n$im-\u003erequest-\u003esend('post', 'users', $params);\n~~~\n\n### [极光IM](https://www.jiguang.cn/im)\n\n~~~\n$config = [\n  'appKey'       =\u003e '',\n  'masterSecret' =\u003e '',\n];\n$im = Pkg6\\easyIm\\Factory::Jiguang($config);\n\n// 自定义请求(账号同步到云端)\n$params = [[\n    'username' =\u003e 'easyim',\n    'password' =\u003e '123456',\n]];\n$im-\u003erequest-\u003esend('post', 'v1/users/', $params);\n\n//IM REST Report V2\n//获取消息\n$im-\u003erequest-\u003esend('get', 'v2/messages?count=500\u0026begin_time=2015-11-02 10:10:10\u0026end_time=2015-11-02 10:10:12',[],true);\n~~~\n\n### [融云IM](https://www.jiguang.cn/im) \n\n~~~\n$config = [\n  'appKey'    =\u003e '',\n  'appSecret' =\u003e '',\n];\n$im = Pkg6\\easyIm\\Factory::RongCloud($config);\n\n// 自定义请求(账号同步到云端)\n$params=[\n    'userId' =\u003e 'easyim',\n    'name'   =\u003e 'easyim',\n];\n$im-\u003erequest-\u003esend('user/getToken.json', $params);\n~~~\n###  [网易云信IM](https://yunxin.163.com/) \n\n~~~\n$config = [\n  'appKey'    =\u003e '',\n  'appSecret' =\u003e '',\n];\n$im = Pkg6\\easyIm\\Factory::Yunxin($config);\n// 自定义请求（账号同步到云端）\n$params = [\n    'accid' =\u003e 'easyim',\n    'name'  =\u003e 'easyim',\n];\n$im-\u003erequest-\u003esend('nimserver/user/create.action', $params);\n~~~\n\n\n\n\n## 支持厂商\n\n- [腾讯IM](https://curl.qcloud.com/OcLpzLhC) \n- [环信IM](https://www.easemob.com/) \n- [极光IM](https://www.jiguang.cn/im)\n- [融云IM](https://www.jiguang.cn/im) \n- [网易云信IM](https://yunxin.163.com/) \n\n\n\n##  加入我们\n\n如果你认可我们的开源项目，有兴趣为 easy-im 的发展做贡献，竭诚欢迎加入我们一起开发完善。无论是 报告错误或 是 Pull Request 开发，那怕是修改一个错别字也是对我们莫大的帮助。\n\n\n##  许可协议\n[MIT](https://opensource.org/licenses/MIT)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkg6%2Feasy-im","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpkg6%2Feasy-im","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkg6%2Feasy-im/lists"}