Simwood API Connector v0.0.1
This is very early alpha code so there are many holes to fill and you might even find major bugs. Please be aware we are actively developing this code so check back often and use at your own risk!
Prerequisites
Before you could take advantage of this API class you need to Order API access.
Example usage 1
Token based Authentication:
// write posts data into a variable container
$auth = $_POST['auth'];
// create options array
$options = array(
'user' => $auth['user'],
'password' => $auth['pass'],
'output' => 'json'
);
// call simwood class and pass in options data
$simwood = Simwood::get_instance($options);
// get token
$token = $simwood->get_auth_token();
Example usage 2
Get account balance:
// get options
$options = array(
'token' => "0c4fb20a9dbffac185d467262d8abe53a94aae5e",
'output' => 'json',
);
// get balance
$response = Simwood::get_instance()->get('BALA', $options)->run();