{"id":19550251,"url":"https://github.com/slunak/pushover-php","last_synced_at":"2025-04-09T15:05:44.106Z","repository":{"id":57825745,"uuid":"269258493","full_name":"slunak/pushover-php","owner":"slunak","description":"Light, simple and fast wrapper for the Pushover API","archived":false,"fork":false,"pushed_at":"2024-10-09T06:30:41.000Z","size":441,"stargazers_count":23,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T15:05:36.655Z","etag":null,"topics":["api-wrapper","pushover","pushover-api","pushover-notifications","pushover-php"],"latest_commit_sha":null,"homepage":"https://pushover.net/api","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/slunak.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-06-04T04:15:21.000Z","updated_at":"2024-12-31T10:55:40.000Z","dependencies_parsed_at":"2024-04-22T08:50:01.240Z","dependency_job_id":"2aa1d289-c76c-4398-a2b0-ccf2222fd28f","html_url":"https://github.com/slunak/pushover-php","commit_stats":{"total_commits":105,"total_committers":3,"mean_commits":35.0,"dds":"0.22857142857142854","last_synced_commit":"a24446ea215a28852200b56c42af3ebaa34c531d"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slunak%2Fpushover-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slunak%2Fpushover-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slunak%2Fpushover-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slunak%2Fpushover-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slunak","download_url":"https://codeload.github.com/slunak/pushover-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248055284,"owners_count":21040157,"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":["api-wrapper","pushover","pushover-api","pushover-notifications","pushover-php"],"created_at":"2024-11-11T04:02:14.792Z","updated_at":"2025-04-09T15:05:44.085Z","avatar_url":"https://github.com/slunak.png","language":"PHP","readme":"# Pushover PHP API Wrapper\n\n[![Build Status](https://github.com/slunak/pushover-php/workflows/CI/badge.svg?branch=master)](https://github.com/slunak/pushover-php/actions)\n[![Latest Stable Version](https://poser.pugx.org/serhiy/pushover/v)](https://packagist.org/packages/serhiy/pushover)\n[![Total Downloads](https://poser.pugx.org/serhiy/pushover/downloads)](https://packagist.org/packages/serhiy/pushover)\n[![License](https://poser.pugx.org/serhiy/pushover/license)](LICENSE)\n\nLight, simple and fast, yet comprehensive wrapper for the [Pushover](https://pushover.net/) API.\n\n### Features\n- Message API ([Example](examples/CompleteNotificationExample.php))\n  - Image attachment\n  - User's device name(s)\n  - Message's title\n  - HTML messages\n  - Supplementary URL and its title\n  - Notification priority\n  - Notification sound (including custom sound)\n  - Message time\n  - Time to live\n- User/Group Validation API ([Example](examples/UserGroupValidationExample.php))\n  - Validation by user or group key\n  - Validation by user and device\n- Receipt API ([Example](examples/ReceiptExample.php))\n  - Query emergency priority receipt\n  - Cancel emergency priority retry\n- Groups API ([Example](examples/GroupsExample.php))\n  - Create a group\n  - List groups\n  - Retrieve information about the group\n  - Add / Remove users\n  - Enable / Disable users\n  - Rename the group\n- Glances API ([Example](examples/GlancesExample.php))\n  - Title\n  - Text\n  - Subtext\n  - Count\n  - Percent\n- Licensing API ([Example](examples/LicensingExample.php))\n  - Check remaining credits\n  - Assign license (not tested)\n- Subscription API ([Example](examples/SubscriptionExample.php))\n  - User Key Migration \n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running.\n\n### Installing\n\n```\ncomposer require serhiy/pushover\n```\n\n### Requirements\n\nI aim to keep the project as simple as possible. All you need to run it is a PHP supported version,\nplus its curl and json extensions. See below the `require` section of project's composer.json file:\n\n```json\n{\n    \"require\": {\n        \"php\": \"\u003e=8.2\",\n        \"ext-curl\": \"*\",\n        \"ext-json\": \"*\"\n    }\n}\n```\n\n## Pushing Messages\n\nInstantiate pushover application and recipient of the notification:\n\n```php\nuse Serhiy\\Pushover\\Application;\nuse Serhiy\\Pushover\\Recipient;\n\n$application = new Application('replace_with_pushover_application_api_token');\n$recipient = new Recipient('replace_with_pushover_user_key');\n```\n\nOr use Dependency Injection to inject them into the services of your app.\n\nCompose a message:\n\n```php\nuse Serhiy\\Pushover\\Api\\Message\\Message;\n\n$message = new Message('This is a test message', 'This is a title of the message');\n```\n\nCreate notification:\n\n```php\nuse Serhiy\\Pushover\\Api\\Message\\Notification;\n\n$notification = new Notification($application, $recipient, $message);\n```\n        \nPush it:\n\n```php\n/** @var \\Serhiy\\Pushover\\Client\\Response\\MessageResponse $response */\n$response = $notification-\u003epush();\n```\n\n\u003e [!TIP]\n\u003e For more code examples, see [examples](examples) folder in the root of the project.\n\n## Working with response\n\nClient returns Response object. Checking if the message was accepted is easy:\n\n```php\nif ($response-\u003eisSuccessful()) {\n    // ...\n}\n```\n\nOne can get status and token returned by Pushover:\n\n```php\n$response-\u003egetRequestStatus();\n$response-\u003egetRequestToken();\n```\n\nOr even unmodified json response from the API (json_decode into an array if needed):\n\n```php\n$response-\u003egetCurlResponse();\n``` \n\nResponse also contains original Request object:\n\n```php\n/** @var \\Serhiy\\Pushover\\Client\\Request\\Request $request */\n$request = $response-\u003egetRequest();\n```\n\nRequest contains array for CURLOPT_POSTFIELDS curl argument and full API URL.\n        \n```php\n$request-\u003egetCurlPostFields();\n$request-\u003egetApiUrl();\n``` \n\n\u003e [!TIP]\n\u003e For complete example refer to [ResponseExample.php](examples/ResponseExample.php).\n\n## Contributing\n\nContributions are very welcome. If you would like to add functionality, before starting your work,\nplease open an issue to discuss the feature you would like to work on.\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\nThere are many PHP wrappers for Pushover API. However, most of them seem abandoned, missing features\nor require extra libraries to work. Nevertheless, many of them inspired me to work on this project.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslunak%2Fpushover-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslunak%2Fpushover-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslunak%2Fpushover-php/lists"}