momentum / msg-online
This package is abandoned and no longer maintained.
No replacement package was suggested.
The official SDK for using the Marine Stores Guide API
0.0.19-alpha
2016-06-06 13:16 UTC
Requires
- guzzlehttp/guzzle: ~6.0
Requires (Dev)
- phpunit/phpunit: 4.0.*
This package is not auto-updated.
Last update: 2023-10-14 13:51:21 UTC
README
This SDK provides an API in which you can query the Marine Stores Guide API.
Requirements
- A valid developer licence and api key
Installing
Composer
You can install the bindings via Composer
composer require momentum/msg-online
To use the bindings, use Composer's autoload:
require_once('vendor/autoload.php');
Get account details
This will return account details for the authenticated user
require('vendor/autoload.php'); // Initialise the MSGOnline client with your API key \Momentum\MsgOnline\Client::setApiKey('%APIKEY%'); $user = new \Momentum\MSGOnline\User(); $user->getCurrentUser();
Get API version details
require('vendor/autoload.php'); // Initialise the MSGOnline client with your API key \Momentum\MsgOnline\Client::setApiKey('%APIKEY%'); $api = new \Momentum\MSGOnline\API(); $api->currentVersion();
Get all products
This will return all products within the API
require('vendor/autoload.php'); // Initialise the MSGOnline client with your API key $client = new \Momentum\MsgOnline\Client('%APIKEY%'); $products = new \Momentum\MsgOnline\Products(); // List all products $products->all(); // Search the products API $products->search($keywords, $parameters = array()); // Get a product by its IMPA Code $products->getProductByCode($code);
Available parameters for search:
category_id
Limit products to a single categorypage
The page number