nateritter / atrium-php
A PHP wrapper for the MX Atrium API.
Installs: 1 319
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=7.0.0
- guzzlehttp/guzzle: ^6.3
- vlucas/phpdotenv: ^2.4
Requires (Dev)
- fzaninotto/faker: ~1.4
- mockery/mockery: 0.9.*
- phpunit/phpunit: ~6.0
This package is auto-updated.
Last update: 2024-12-29 05:04:55 UTC
README
A PHP wrapper for the MX Atrium API. In order to make requests, you will need to sign up for the MX Atrium API and get a MX-API-KEY
and a MX-CLIENT-ID
.
Installation
Use Composer or Yarn to add the library to your application:
composer install nateritter/atrium-php
or
yarn add nateritter/atrium-php
Usage
Use the atrium
module in your source code with the following
use NateRitter\AtriumPHP\AtriumClient;
Then configure your instance with the following. (The ENVIRONMENT
will be either vestibule.mx.com
for the development environment or atrium.mx.com
for the production environment.)
$atriumClient = new AtriumClient('ENVIRONMENT', 'YOUR_MX_API_KEY', 'YOUR_MX_CLIENT_ID');
Then start using class methods to make calls to the Atrium API for data. See the full Atrium documentation for more details.
# use AtriumClient wrapper class use NateRitter\AtriumPHP\AtriumClient; # Configure AtriumClient $atriumClient = new AtriumClient('ENVIRONMENT', 'YOUR_MX_API_KEY', 'YOUR_MX_CLIENT_ID'); # Now begin making Atrium calls $atriumClient->createUser(['identifier' => 'UniqueID']); # Create a user, etc...
Examples
The /examples
directory contains various workflows and code snippets. You will first need to modify the line shown below in each example with the environment, YOUR-MX-API-KEY, and YOUR-MX-CLIENT-ID before running.
$atriumClient = new AtriumClient('ENVIRONMENT', 'YOUR_MX_API_KEY', 'YOUR_MX_CLIENT_ID');