cybercog / php-pushwoosh
一个PHP库,可以轻松使用Pushwoosh REST Web Services发送PUSH通知。
2.1.0
2024-06-19 15:00 UTC
Requires
- php: ^8.0
- ext-curl: *
- ext-json: *
Requires (Dev)
- phpunit/phpunit: ^9.0|^10.0
- dev-master
- 2.1.0
- 2.0.0
- v1.x-dev
- 1.12.0
- 1.11.0
- 1.10.0
- 1.9.0
- 1.8.0
- 1.7.1
- 1.7.0
- 1.6.1
- 1.6.0
- 1.5.3
- 1.5.2
- 1.5.1
- 1.5.0
- 1.4.0
- 1.3.1
- 1.3.0
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.1.0
- 0.1.0-alpha5
- 0.1.0-alpha4
- 0.1.0-alpha3
- 0.1.0-alpha2
- 0.1.0-alpha1
- dev-fix-package-json-repository
This package is auto-updated.
Last update: 2024-09-19 15:29:39 UTC
README
一个PHP库,可以轻松使用Pushwoosh REST Web Services发送PUSH通知。
因为原始项目停滞,所以从 gomoob/php-pushwoosh 分支。
安装
通过Composer引入包。
composer require cybercog/php-pushwoosh
用法
创建并发送Pushwoosh消息的示例。
// Create a Pushwoosh client $pushwoosh = Pushwoosh::create() ->setApplication('XXXX-XXX') ->setAuth('xxxxxxxx'); // Create a request for the '/createMessage' Web Service $request = CreateMessageRequest::create() ->addNotification(Notification::create()->setContent('Hello Jean !')); // Call the REST Web Service $response = $pushwoosh->createMessage($request); // Check if it's ok if ($response->isOk()) { print 'Great, my message has been sent !'; } else { print 'Oops, the sent failed :-('; print 'Status code : ' . $response->getStatusCode(); print 'Status message : ' . $response->getStatusMessage(); }
许可协议
PHP Pushwoosh
包是开源软件,由 MIT许可协议 许可,由 Anton Komarev 发布。
关于CyberCog
CyberCog 是一个由爱好者组成的社交团体。研究产品与软件开发中的最佳解决方案是我们的热情所在。