1. Go to this page and download the library: Download dominicwatts/onbuysdk 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/ */
dominicwatts / onbuysdk example snippets
$config = [
'consumer_key' => 'test_consumer_key',
'secret_key' => 'test_secret_key'
];
use Xigen\Library\OnBuy\Auth;
$auth = new Auth(
$config
);
$auth->getToken(); // This is your token
use Xigen\Library\OnBuy\Brand\Brand;
$brand = new Brand($auth->getToken());
$brand->getBrand('keyword', 'asc', 10, 0);
$brand->getResponse();
$brand->getBrandById(123);
$brand->getResponse();
use Xigen\Library\OnBuy\Category\Category;
$category = new Category($auth->getToken());
$category->getCategory([
'name' => 'test'
]);
$category->getResponse();
$category->getCategory([
'name' => 'test',
'category_type_id' => 1 // department
]);
$category->getResponse();
$category->getCategoryById(13490);
$category->getResponse();
use Xigen\Library\OnBuy\Category\Feature;
$categoryFeature = new Feature($auth->getToken());
$categoryFeature->getFeatureById(13490);
$categoryFeature->getResponse();
use Xigen\Library\OnBuy\Category\Technical;
$categoryTechnical = new Technical($auth->getToken());
$categoryTechnical->getTechnicalDetailById(13490);
$categoryTechnical->getResponse();
$categoryTechnical->getGroupById(13490, 125);
$categoryTechnical->getResponse();
use Xigen\Library\OnBuy\Category\Variant;
$categoryVariant = new Variant($auth->getToken());
$categoryVariant->getVariantId(13490);
$categoryVariant->getResponse();
use Xigen\Library\OnBuy\Commission\Commission;
$commission = new Commission($auth->getToken());
$commission->getTier();
$commission->getResponse();
$commission->getTierById(13490, 125);
$commission->getResponse();
use Xigen\Library\OnBuy\Condition\Condition;
$condition = new Condition($auth->getToken());
$condition->getCondition();
$condition->getResponse();
use Xigen\Library\OnBuy\Queue\Queue;
$queue = new Queue($auth->getToken());
$queue->getQueue([
'queue_ids' => '123,456',
'status' => 'pending'
]);
$queue->getResponse();
$queue->getQueueById(123);
$queue->getResponse();
use Xigen\Library\OnBuy\Seller\Seller;
$seller = new Seller($auth->getToken());
$seller->getSellerById(123);
$seller->getResponse();
use Xigen\Library\OnBuy\Seller\Delivery;
$sellerDelivery = new Delivery($auth->getToken());
$sellerDelivery->getDelivery();
$sellerDelivery->getResponse();
use Xigen\Library\OnBuy\Seller\Entity;
$sellerEntity = new Entity($auth->getToken());
$sellerEntity->getEntity();
$sellerEntity->getResponse();
$sellerEntity->getEntityById(123);
$sellerEntity->getResponse();
use Xigen\Library\OnBuy\Site\Site;
$site = new Site($auth->getToken());
$site->getSite([
'name' => 'test'
]);
$site->getResponse();
$site->getSiteById(123);
$site->getResponse();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.