PHP code example of ominity / ominity-api-php
1. Go to this page and download the library: Download ominity/ominity-api-php library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ominity / ominity-api-php example snippets
$ominity = new \Ominity\Api\OminityApiClient();
$ominity->setApiEndpoint("https://ominity.example.com/api");
$ominity->setApiKey("q48fd94qs98fd4sqf89fza9sqd89f4");
/** @var $ominity \Ominity\Api\OminityApiClient */
$ominity->enableDebugging();
try {
$ominity->commerce->products->get(1);
} catch (\Ominity\Api\Exceptions\ApiException $exception) {
$request = $exception->getRequest();
}
/** @var $ominity \Ominity\Api\OminityApiClient */
$ominity->disableDebugging();
bash
composer