PHP code example of lucasfidelis / mercado-livre-sdk
1. Go to this page and download the library: Download lucasfidelis/mercado-livre-sdk 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/ */
lucasfidelis / mercado-livre-sdk example snippets
use LucasFidelis\MercadoLivreSdk\Client\Client;
use LucasFidelis\MercadoLivreSdk\Managers\ProductManager;
...
$itemId = 'MLB123456789';
$client = new Client($CLIENT_ID, $CLIENT_SECRET, $ACCESS_TOKEN, $REFRESH_TOKEN);
$productManager = new ProductManager($client);
$product = $productManager->findById($itemId);
$product->setPrice(123.45);
$productManager->updatePrice($product);