Skip to content

World-News-Group/advantage-connector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advantage Connector

An interface to a custom API developed by World News Group to communicate with Advantage software.

Installing via Composer

Only Composer (v2.0) is support at this time.

Add the following in your composer.json:

...
"repositories": [
    {
        "type": "vcs",
        "url": "<Git url to project>
    }
]
...

Then require the library in composer:

composer require world-news-group/advantage-connector

Code Use

Firstly, add the appropriate require and use statement (goes something like this):

require('vendor/autoload.php');

use WorldNewsGroup\Advantage\AdvantageConnector;

Secondary, configure the environment the connector will use:

AdvantageConnector::configure($api_key, $endpoint);

AdvantageConnector::getCustomer('999999999');

All results are returned as SQL queries, so column names often won't match up with the "official" Advantage API.

Development/Testing

Each read-only method has a test built for regression testing.

./vendor/bin/phpunit ./tests

We like (should) to meet phpstan level 3 compatibility

./vendor/bin/phpstan analyze ./src -l 3

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages