rmasters / inbox
用于Inbox API的PHP包装器
dev-master
2014-08-02 13:38 UTC
Requires
- php: >=5.4
- guzzlehttp/guzzle: ~4.0
Requires (Dev)
- phpunit/phpunit: ~4
- satooshi/php-coveralls: dev-master
This package is not auto-updated.
Last update: 2024-09-24 03:30:15 UTC
README
A PHP wrapper around the Inbox API.
安装
此Composer包在Packagist上的名称为rmasters/inbox
。您可以使用Composer工具安装它:
composer require "rmasters/inbox:~1"
,- 或者在您的composer.json的
require
部分中添加:"rmasters/inbox": "~1"
。
此包处于开发初期 - 预期API将在v1.0稳定发布前进行一些更改。
要求
用法
首先查看API文档,以熟悉Inbox概念。
// Specify a custom server, or use inboxapp.com by default $inbox = new Inbox\Inbox('http://127.0.0.1:5555/'); // Get namespace (email account) information $accountId = 'awa6ltos76vz5hvphkp8k17nt'; $account = $inbox->account($accountId); // => Account // Get messages $inbox->messages($account)->all(); // => Message[] $inbox->messages($accountId)->get($messageId); // => Message
方向
一些注意事项和需要注意的事项
- 鉴于
namespace
是PHP中的保留字,命名空间被称为账户。