PHP code example of orbitalcodes / skyhub-php
1. Go to this page and download the library: Download orbitalcodes/skyhub-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/ */
orbitalcodes / skyhub-php example snippets
l = '[email protected]';
$apiKey = 'ddRTGUrf_bho17FooTjC';
/** @var \SkyHub\Api $api */
$api = new SkyHub\Api($email, $apiKey);
/** @var \SkyHub\Api\Handler\Request\Catalog\Product\AttributeHandler $requestHandler */
$requestHandler = $api->productAttribute();
/**
* Create an Attribute
* @var SkyHub\Api\Handler\Response\HandlerInterface $response
*/
$response = $requestHandler->create('color', 'Color', [
'Blue',
'White',
'Green',
'Yellow'
]);
if ($response->success()) {
echo 'SUCCESS!';
}