katsana/silverstreet 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

katsana/silverstreet

最新稳定版本:v3.2.1

Composer 安装命令:

composer require katsana/silverstreet

包简介

Silverstreet API Client for PHP

README 文档

README

tests Latest Stable Version Total Downloads Latest Unstable Version License

Installation

To install through composer, simply put the following in your composer.json file:

{
    "require": {
        "katsana/silverstreet": "^3.0",
        "php-http/guzzle6-adapter": "^2.0"
    }
}

HTTP Adapter

Instead of utilizing php-http/guzzle6-adapter you might want to use any other adapter that implements php-http/client-implementation. Check Clients & Adapters for PHP-HTTP.

Usages

Creating Silverstreet Client

You can start by creating a client by using the following code (which uses php-http/guzzle6-adapter):

<?php

use Silverstreet\Client;

$http = Laravie\Codex\Discovery::client();


$silverstreet = new Client($http, 'your-api-username', 'your-api-password');

You could also use php-http/discovery to automatically pick available adapter installed via composer:

<?php

use Silverstreet\Client;

$silverstreet = Client::make('your-api-username', 'your-api-password');

Sending Text Messages

You can send text messages by running the following code.

$silverstreet->uses('Message')
    ->text('Hello world', '+60123456789', $sender);

Checking Credit Balance

You can request for available balance by running the following code.

$balance = $silverstreet->uses('Credit')->available();

echo $balance; // 400

统计信息

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

GitHub 信息

  • Stars: 7
  • Watchers: 4
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2016-09-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固