momentum / msg-online
The official SDK for using the Marine Stores Guide API
Installs: 19
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
pkg:composer/momentum/msg-online
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_idLimit products to a single categorypageThe page number