承接 wonderpush/wonderpush-php-lib 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

wonderpush/wonderpush-php-lib

最新稳定版本:v2.1.1

Composer 安装命令:

composer require wonderpush/wonderpush-php-lib

包简介

PHP library for WonderPush

README 文档

README

Build Status Latest Stable Version License Coverage Status

Find the full WonderPush services documentation at: https://docs.wonderpush.com/docs.

Introduction

This project contain a PHP library for interacting with the WonderPush services. It helps you performing calls to the Management API. This contrasts with the SDKs, which are targeted at being integrated within your apps and handle interactions with the users.

APIs

WonderPush comes as two APIs, one aimed at the user devices, and the other optional one aimed at your servers and tools. The former is simply called the REST API, whereas the latter is called the Management API.

This tool helps you performing calls to the Management API.

Management API Reference

All references for the WonderPush Management API are available on the WonderPush documentation pages: https://docs.wonderpush.com/reference.

Documentation

Please see https://wonderpush.github.io/wonderpush-php-lib for up-to-date documentation.

Requirements

PHP 5.3.3 and later.

Composer

You can install the bindings via Composer. Run the following command:

composer require wonderpush/wonderpush-php-lib

To use the bindings, use Composer's autoload:

require_once('vendor/autoload.php');

Manual Installation

If you do not wish to use Composer, you can download the latest release. Then, to use the bindings, include the init.php file.

require_once('/path/to/wonderpush-php-lib/init.php');

Dependencies

The bindings require the following extension in order to work properly:

If you use Composer, these dependencies should be handled automatically. If you install manually, you'll want to make sure that these extensions are available.

Getting Started

Simple usage looks like:

$wonderpush = new \WonderPush\WonderPush(WONDERPUSH_ACCESS_TOKEN, WONDERPUSH_APPLICATION_ID);
$response = $wonderpush->deliveries()->create(
    \WonderPush\Params\DeliveriesCreateParams::_new()
        ->setTargetSegmentIds('@ALL')
        ->setNotification(\WonderPush\Obj\Notification::_new()
            ->setAlert(\WonderPush\Obj\NotificationAlert::_new()
                ->setTitle('Using the PHP library')
                ->setText('Hello, WonderPush!')
            ))
);
echo $response->getNotificationId();

Configuring a Logger

The library does minimal logging, but it can be configured with a PSR-3 compatible logger so that messages end up there instead of error_log:

$wonderpush->setLogger($logger);

Development

Install dependencies:

composer install

Tests

Install dependencies as mentioned above (which will resolve PHPUnit), then you can run the test suite:

./test

Or to run an individual test file:

vendor/bin/phpunit tests/SomeTest.php

统计信息

  • 总下载量: 93.25k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 3
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 未知

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固