opensaucesystems/simwoodapi

A simple object orientated way to interact with the simwood.com API

v0.1.5 2017-05-09 13:33 UTC

README

Simwood Logo

About:

This php composer package provides a simple object orientated way to interact with the simwood.com API.

Author:

@lcherone

Setup:

Using composer add the package to your project:

composer require opensaucesystems/simwoodapi

Initializing the client

<?php
require 'vendor/autoload.php';

/**
 * Initialize the API client class
 */
$simwood = new opensaucesystems\simwood\APIClient(
    'APIUSER', //<-- get from simwood
    'APIKEY'   //<-- get from simwood
);
?>

Account Id:

I've chosen to not include this in the class construct, so it must be passed to each method call if required, this is because of the way the API has multiple accounts levels.

You can set it in a variable or you can hard-code it to the method call, no biggie!

<?php
$account_id = '999999';
?>

Making calls:

To interact with the API its as simple as calling a class method or property, endpoints are dynamically loaded when traversed to.

See the wikis below for further details on each endpoint.

[ ] Todo
[-] Partially done
[X] Done
[!] Broken