{"id":13486731,"url":"https://github.com/guanguans/notify","last_synced_at":"2026-04-02T17:55:59.822Z","repository":{"id":37718942,"uuid":"363314736","full_name":"guanguans/notify","owner":"guanguans","description":"Push notification SDK(AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、Zulip).","archived":false,"fork":false,"pushed_at":"2025-04-04T21:49:56.000Z","size":1902,"stargazers_count":647,"open_issues_count":0,"forks_count":45,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-05T00:32:46.533Z","etag":null,"topics":["bark","bot-api","dingtalk","discord","gitter","googlechat","lark","mattermost","microsoftteams","notification","ntfy","push","pushback","pushover","qq","rocketchat","slack","telegram","wework","zulip"],"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/guanguans.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"patreon":"guanguans","custom":"https://www.guanguans.cn/images/wechat.jpeg"}},"created_at":"2021-05-01T03:33:48.000Z","updated_at":"2025-04-04T21:49:53.000Z","dependencies_parsed_at":"2024-01-22T03:27:11.746Z","dependency_job_id":"970a1e3f-1338-4a43-83de-ae39533e1381","html_url":"https://github.com/guanguans/notify","commit_stats":{"total_commits":961,"total_committers":4,"mean_commits":240.25,"dds":"0.11342351716961496","last_synced_commit":"c0d152f7f6f206955c6d23cc65210258cf45debc"},"previous_names":[],"tags_count":129,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guanguans%2Fnotify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guanguans%2Fnotify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guanguans%2Fnotify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guanguans%2Fnotify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guanguans","download_url":"https://codeload.github.com/guanguans/notify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248339186,"owners_count":21087212,"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":["bark","bot-api","dingtalk","discord","gitter","googlechat","lark","mattermost","microsoftteams","notification","ntfy","push","pushback","pushover","qq","rocketchat","slack","telegram","wework","zulip"],"created_at":"2024-07-31T18:00:50.404Z","updated_at":"2026-04-02T17:55:59.791Z","avatar_url":"https://github.com/guanguans.png","language":"PHP","readme":"# notify\n\n\u003e [!NOTE]\n\u003e Push notification SDK(AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NotifyX、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).\n\n[![tests](https://github.com/guanguans/notify/actions/workflows/tests.yml/badge.svg)](https://github.com/guanguans/notify/actions/workflows/tests.yml)\n[![php-cs-fixer](https://github.com/guanguans/notify/actions/workflows/php-cs-fixer.yml/badge.svg)](https://github.com/guanguans/notify/actions/workflows/php-cs-fixer.yml)\n[![codecov](https://codecov.io/gh/guanguans/notify/branch/main/graph/badge.svg?token=URGFAWS6S4)](https://codecov.io/gh/guanguans/notify)\n[![Latest Stable Version](https://poser.pugx.org/guanguans/notify/v)](https://packagist.org/packages/guanguans/notify)\n[![GitHub release (with filter)](https://img.shields.io/github/v/release/guanguans/notify)](https://github.com/guanguans/notify/releases)\n[![Total Downloads](https://poser.pugx.org/guanguans/notify/downloads)](https://packagist.org/packages/guanguans/notify)\n[![License](https://poser.pugx.org/guanguans/notify/license)](https://packagist.org/packages/guanguans/notify)\n\n## Platform support\n\n[//]: # (https://github.com/CaoMeiYouRen/push-all-in-one)\n[//]: # (https://github.com/caronc/apprise)\n[//]: # (https://github.com/dschep/ntfy)\n[//]: # (https://github.com/LeslieLeung/heimdallr)\n[//]: # (https://github.com/nikoksr/notify)\n[//]: # (https://github.com/songquanpeng/message-pusher)\n\n* [AnPush](src/AnPush/README.md)\n* [Bark](src/Bark/README.md)\n* [Chanify](src/Chanify/README.md)\n* [DingTalk](src/DingTalk/README.md)\n* [Discord](src/Discord/README.md)\n* [~~Gitter~~](src/Gitter/README.md)\n* [GoogleChat](src/GoogleChat/README.md)\n* [IGot](src/IGot/README.md)\n* [Lark](src/Lark/README.md)\n* [Mattermost](src/Mattermost/README.md)\n* [MicrosoftTeams](src/MicrosoftTeams/README.md)\n* [NotifyX](src/NotifyX/README.md)\n* [~~NowPush~~](src/NowPush/README.md)\n* [Ntfy](src/Ntfy/README.md)\n* [Push](src/Push/README.md)\n* [Pushback](src/Pushback/README.md)\n* [PushBullet](src/PushBullet/README.md)\n* [PushDeer](src/PushDeer/README.md)\n* [PushMe](src/PushMe/README.md)\n* [Pushover](src/Pushover/README.md)\n* [PushPlus](src/PushPlus/README.md)\n* [QQ](src/QQ/README.md)\n* [RocketChat](src/RocketChat/README.md)\n* [ServerChan](src/ServerChan/README.md)\n* [ShowdocPush](src/ShowdocPush/README.md)\n* [SimplePush](src/SimplePush/README.md)\n* [Slack](src/Slack/README.md)\n* [Telegram](src/Telegram/README.md)\n* [WeWork](src/WeWork/README.md)\n* [WPush](src/WPush/README.md)\n* [XiZhi](src/XiZhi/README.md)\n* [YiFengChuanHua](src/YiFengChuanHua/README.md)\n* [ZohoCliq](src/ZohoCliq/README.md)\n* [ZohoCliqWebHook](src/ZohoCliqWebHook/README.md)\n* [Zulip](src/Zulip/README.md)\n\n## Related repositories\n\n* [https://github.com/guanguans/laravel-exception-notify](https://github.com/guanguans/laravel-exception-notify)\n* [https://github.com/guanguans/yii-log-target](https://github.com/guanguans/yii-log-target)\n\n## Requirement\n\n* PHP \u003e= 8.2\n\n## Installation\n\n```shell\ncomposer require guanguans/notify -v\n```\n\n## Usage example\n\n### Quick start\n\n```php\n$response = (new Guanguans\\Notify\\DingTalk\\Client(\n        new Guanguans\\Notify\\DingTalk\\Authenticator('c44fec1ddaa8a833156efb77b7865d62ae13775418030d94d05da08bfca73')\n    ))\n    -\u003esend(\n        Guanguans\\Notify\\DingTalk\\Messages\\BtnsActionCardMessage::make([\n            'title' =\u003e 'This is title(keyword).',\n            'text' =\u003e 'This is text.',\n        ])\n    )\n    // -\u003edump()\n    -\u003ejson();\n```\n\n```php\n// 1. Create authenticator\n$authenticator = new Guanguans\\Notify\\DingTalk\\Authenticator(\n    'c44fec1ddaa8a833156efb77b7865d62ae13775418030d94d05da08bfca73',\n    // 'SECc32bb7345c0f73da2b9786f0f7dd5083bd768a29b82e6d460149d730eee51'\n);\n\n// 2. Create client\n$client = new Guanguans\\Notify\\DingTalk\\Client($authenticator);\n\n// 3. Create message\n$message = Guanguans\\Notify\\DingTalk\\Messages\\BtnsActionCardMessage::make([\n    'title' =\u003e 'This is title(keyword).',\n    'text' =\u003e 'This is text.',\n    // 'btnOrientation' =\u003e 1,\n    // 'btns' =\u003e [\n    //     [\n    //         'title' =\u003e 'This is title 1.',\n    //         'actionURL' =\u003e 'https://github.com/guanguans/notify',\n    //     ],\n    // ],\n])\n    -\u003ebtnOrientation(1)\n    -\u003eaddBtn([\n        'title' =\u003e 'This is title 2.',\n        'actionURL' =\u003e 'https://github.com/guanguans/notify',\n    ]);\n\n// 4. Send message\n$response = $client\n    // -\u003ebaseUri('base-uri')\n    // -\u003econnectTimeout(10)\n    // -\u003edebug(true)\n    // -\u003eproxy('http://127.0.0.1:1087')\n    // -\u003etimeout(30)\n    // -\u003everify(false)\n    // -\u003epush(\n    //     GuzzleHttp\\Middleware::log(\n    //         new Psr\\Log\\NullLogger,\n    //         new GuzzleHttp\\MessageFormatter(GuzzleHttp\\MessageFormatter::DEBUG)\n    //     ),\n    //     'log'\n    // )\n    // -\u003ebefore(\n    //     'log',\n    //     GuzzleHttp\\Middleware::mapRequest(\n    //         static fn (Psr\\Http\\Message\\RequestInterface $request) =\u003e $request\n    //     ),\n    // )\n    -\u003esend($message)\n    -\u003edump()\n    // -\u003ethrow()\n    -\u003ejson();\n```\n\n### Asynchronous requests\n\n```php\n$promise = $client-\u003esendAsync($message);\n$response = $promise-\u003ewait();\n```\n\n### Concurrent requests\n\n```php\n/** @var iterable\u003carray-key, \\Guanguans\\Notify\\Foundation\\Contracts\\Message\u003e $messages */\n/** @var array\u003carray-key, \\Guanguans\\Notify\\Foundation\\Response|\\Psr\\Http\\Message\\ResponseInterface\u003e $responses */\n$responses = $client-\u003epool($messages);\n```\n\n### Hyperf integration\n\n```php\nuse Guanguans\\Notify\\Foundation\\Client;\nuse GuzzleHttp\\HandlerStack;\nuse Hyperf\\Guzzle\\CoroutineHandler;\nuse Hyperf\\Guzzle\\HandlerStackFactory;\nuse Hyperf\\Guzzle\\PoolHandler;\n\n// Set Handler directly\n// $client-\u003esetHandler(make(CoroutineHandler::class));\n// $client-\u003esetHandler(make(PoolHandler::class));\n$client-\u003esetHandler((fn () =\u003e $this-\u003egetHandler($this-\u003eoption))-\u003ecall(new HandlerStackFactory));\n\n// Or set HandlerStackResolver\n$client-\u003esetHandlerStackResolver(static fn (Client $client): HandlerStack =\u003e array_reduce(\n    $client-\u003edefaultMiddlewares(),\n    static fn (HandlerStack $handlerStack, callable $middleware) =\u003e tap($handlerStack)-\u003epush($middleware),\n    (new HandlerStackFactory)-\u003ecreate()\n));\n```\n\n### Completion\n\n\u003e [!TIP]\n\u003e Required to install [Laravel Idea](https://plugins.jetbrains.com/plugin/13441-laravel-idea) plugin.\n\n![completion](docs/completion.jpg)\n\n## Composer scripts\n\n```shell\ncomposer checks:required\ncomposer notify:generate-ide-json\ncomposer notify:platform-lint\ncomposer php-cs-fixer:fix\ncomposer test\n```\n\n## Benchmark\n\n```shell\ncomposer benchmark\n```\n\n```shell\n+---------------------+--------------------------+-----+-------+-----+----------+-----------+--------+\n| benchmark           | subject                  | set | revs  | its | mem_peak | mode      | rstdev |\n+---------------------+--------------------------+-----+-------+-----+----------+-----------+--------+\n| SendMessageBench    | benchSendMessage         |     | 10000 | 3   | 6.432mb  | 156.609μs | ±0.33% |\n| CreateInstanceBench | benchCreateAuthenticator |     | 10000 | 3   | 5.208mb  | 0.657μs   | ±0.68% |\n| CreateInstanceBench | benchCreateMessage       |     | 10000 | 3   | 5.208mb  | 1.769μs   | ±0.20% |\n| CreateInstanceBench | benchCreateClient        |     | 10000 | 3   | 82.791mb | 13.827μs  | ±0.40% |\n+---------------------+--------------------------+-----+-------+-----+----------+-----------+--------+\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n* [guanguans](https://github.com/guanguans)\n* [All Contributors](../../contributors)\n\n## Thanks\n\n[![](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg)](https://www.jetbrains.com/?from=https://github.com/guanguans)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.\n","funding_links":["https://patreon.com/guanguans","https://www.guanguans.cn/images/wechat.jpeg"],"categories":["Libraries","PHP"],"sub_categories":["SDK"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguanguans%2Fnotify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguanguans%2Fnotify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguanguans%2Fnotify/lists"}