rmasters / inbox
PHP wrapper for the Inbox API
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-11-19 04:05:36 UTC
README
A PHP wrapper around the Inbox API.
Installation
This Composer package is named rmasters/inbox
on Packagist. You can install it:
- using the Composer tool:
composer require "rmasters/inbox:~1"
, - or by adding to your composer.json's
require
section:"rmasters/inbox": "~1"
.
This package is early on in development - expect the API to change a little until a v1.0 stable release.
Requirements
- An Inbox server (open-source or hosted),
- PHP 5.4+.
- Released under an MIT License.
Usage
Take a look over the API documentation first, to familiarise yourself with the Inbox concepts.
// 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
Orientation
A few notes and things to watch out for:
- Given that
namespace
is a reserved word in PHP, Namespaces are referred to as Accounts.