{"id":20980593,"url":"https://github.com/php-api-clients/pusher","last_synced_at":"2026-02-27T09:13:18.026Z","repository":{"id":49034672,"uuid":"64565182","full_name":"php-api-clients/pusher","owner":"php-api-clients","description":":ocean: Async first Pusher Client","archived":false,"fork":false,"pushed_at":"2023-12-15T17:44:57.000Z","size":429,"stargazers_count":35,"open_issues_count":6,"forks_count":11,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-08-21T05:49:07.755Z","etag":null,"topics":["api-client","async","async-php","hacktoberfest","php","php-api-clients","php7","pusher","pusher-client","reactphp","websocket"],"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/php-api-clients.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2016-07-30T21:40:05.000Z","updated_at":"2024-11-01T22:35:51.000Z","dependencies_parsed_at":"2023-12-15T18:52:24.633Z","dependency_job_id":null,"html_url":"https://github.com/php-api-clients/pusher","commit_stats":{"total_commits":160,"total_committers":7,"mean_commits":"22.857142857142858","dds":0.25625,"last_synced_commit":"3bc39c68c8b98c9558902581f7d5cd8ac93bdbb1"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/php-api-clients/pusher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-api-clients%2Fpusher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-api-clients%2Fpusher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-api-clients%2Fpusher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-api-clients%2Fpusher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/php-api-clients","download_url":"https://codeload.github.com/php-api-clients/pusher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-api-clients%2Fpusher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29889091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T08:34:21.514Z","status":"ssl_error","status_checked_at":"2026-02-27T08:32:38.035Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api-client","async","async-php","hacktoberfest","php","php-api-clients","php7","pusher","pusher-client","reactphp","websocket"],"created_at":"2024-11-19T05:29:14.679Z","updated_at":"2026-02-27T09:13:17.995Z","avatar_url":"https://github.com/php-api-clients.png","language":"PHP","readme":"# Pusher API Client for PHP 7 and 8\n\n[![Linux Build Status](https://travis-ci.org/php-api-clients/pusher.svg?branch=master)](https://travis-ci.org/php-api-clients/pusher)\n[![Latest Stable Version](https://poser.pugx.org/api-clients/pusher/v/stable.png)](https://packagist.org/packages/api-clients/pusher)\n[![Total Downloads](https://poser.pugx.org/api-clients/pusher/downloads.png)](https://packagist.org/packages/api-clients/pusher)\n[![Code Coverage](https://scrutinizer-ci.com/g/php-api-clients/pusher/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/php-api-clients/pusher/?branch=master)\n[![License](https://poser.pugx.org/api-clients/pusher/license.png)](https://packagist.org/packages/api-clients/pusher)\n[![PHP 7 ready](http://php7ready.timesplinter.ch/php-api-clients/pusher/badge.svg)](https://appveyor-ci.org/php-api-clients/pusher)\n\n# Installation\n\nTo install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `^`.\n\n```bash\ncomposer require api-clients/pusher\n```\n\n# Usage\n\n```php\n$loop = Factory::create();\n$client = AsyncClient::create($loop, 'Application ID here');\n// OR when you need to specify the cluster\n$client = AsyncClient::create($loop, 'Application ID here', null, 'cluster-here');\n\n$client-\u003echannel('channel_name')-\u003esubscribe(\n    function (Event $event) { // Gets called for each incoming event\n        echo 'Channel: ', $event-\u003egetChannel(), PHP_EOL;\n        echo 'Event: ', $event-\u003egetEvent(), PHP_EOL;\n        echo 'Data: ', json_encode($event-\u003egetData()), PHP_EOL;\n    },\n    function ($e) { // Gets called on errors\n        echo (string)$e;\n    },\n    function () { // Gets called when the end of the stream is reached\n        echo 'Done!', PHP_EOL;\n    }\n);\n\n$loop-\u003erun();\n```\n\nFor more examples see the [examples directory](examples).\n\n# Features\n\nThis project aims to be 100% compatible with [Pusher's features](https://pusher.com/features) in `v1.3`.\n\n- [X] Subscribe to channels\n- [ ] Presence channels\n- [ ] Authentication\n\n# License\n\nThe MIT License (MIT)\n\nCopyright (c) 2017 Cees-Jan Kiewiet\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-api-clients%2Fpusher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphp-api-clients%2Fpusher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-api-clients%2Fpusher/lists"}