{"id":21684490,"url":"https://github.com/scaledrone/scaledrone-php","last_synced_at":"2025-04-12T07:51:35.493Z","repository":{"id":83637887,"uuid":"50447454","full_name":"ScaleDrone/scaledrone-php","owner":"ScaleDrone","description":"PHP API client for Scaledrone Realtime Messaging Service","archived":false,"fork":false,"pushed_at":"2017-11-09T17:02:21.000Z","size":31,"stargazers_count":11,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T10:43:12.084Z","etag":null,"topics":["php","push-notifications","real-time","scaledrone"],"latest_commit_sha":null,"homepage":"https://www.scaledrone.com/","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/ScaleDrone.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-26T17:51:58.000Z","updated_at":"2024-03-21T10:16:40.000Z","dependencies_parsed_at":"2023-05-28T01:15:33.049Z","dependency_job_id":null,"html_url":"https://github.com/ScaleDrone/scaledrone-php","commit_stats":{"total_commits":27,"total_committers":3,"mean_commits":9.0,"dds":"0.33333333333333337","last_synced_commit":"76d9fe674f9fec2c6cb5586f0c6a4297fc1cb08f"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScaleDrone%2Fscaledrone-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScaleDrone%2Fscaledrone-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScaleDrone%2Fscaledrone-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScaleDrone%2Fscaledrone-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ScaleDrone","download_url":"https://codeload.github.com/ScaleDrone/scaledrone-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248537003,"owners_count":21120689,"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":["php","push-notifications","real-time","scaledrone"],"created_at":"2024-11-25T16:15:50.307Z","updated_at":"2025-04-12T07:51:35.488Z","avatar_url":"https://github.com/ScaleDrone.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ScaleDrone PHP\nOfficial ScaleDrone PHP pushing library. This is a wrapper around the REST API.\n\n## Installation\n\nMake sure you have [composer](https://getcomposer.org) installed.\n\nInstall it directly:\n\n```\ncomposer require scaledrone/scaledrone\n```\n\nOr add the following to your `composer.json`:\n\n```json\n{\n    \"require\": {\n        \"scaledrone/scaledrone\": \"*\"\n    }\n}\n```\n\nThen update your dependencies:\n\n```bash\n$ php composer.phar update\n```\n\n## Usage\nCreate a new instance of ScaleDrone passing it the `channel_id` and `secret_key` that you can find from the channel's page\n```php\n$auth = array(\n    'channel_id' =\u003e 'CHANNEL_ID',\n    'secret_key' =\u003e 'SECRET_KEY'\n);\n\n$client = ScaleDrone\\Client::create($auth);\n```\n\nIf you wish to connect using a [JSON Web Token](https://www.scaledrone.com/docs/jwt-authentication) you can set it like this:\n```php\n$auth = array(\n    'channel_id' =\u003e 'CHANNEL_ID',\n    'bearer' =\u003e 'GENERATED_JWT'\n);\n\n$client = ScaleDrone\\Client::create($auth);\n```\n\nPublishing a message\n```php\n$room = 'notifications';\n$message = ['email' =\u003e 'test2@foo.bar', 'name' =\u003e 'php name'];\n$response = $client-\u003epublish($room, $message);\n```\n\nChannel stats\n```php\n$response = $client-\u003echannel_stats();\n```\n\nGetting the complete list of users from all rooms\n```php\n$response = $client-\u003emembers_list();\n```\n\nGetting the list of users in a room\n```php\n$response = $client-\u003eroom_members_list('roomName');\n```\n\nGetting the list of rooms and their members\n```php\n$response = $client-\u003eall_room_members_list('roomName');\n```\n\n## Running Tests\n\nClone this repository and change directories to the repository root. Install all dependencies with `composer install`.\nThen, just run `vendor/bin/phpunit`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscaledrone%2Fscaledrone-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscaledrone%2Fscaledrone-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscaledrone%2Fscaledrone-php/lists"}