1. Go to this page and download the library: Download rhysnhall/etsy-php-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/ */
rhysnhall / etsy-php-sdk example snippets
composer
use Etsy\Etsy;
$etsy = new Etsy(
$client_id,
$access_token
);
// Do the Etsy things.
use Etsy\Etsy;
use Etsy\Resources\User;
$etsy = new Etsy($apiKey, $accessToken);
// Get the authenticated user.
$user = User::me();
// Get the users shop.
$shop = $user->shop();
// Get a Listing Resource
$listing = \Etsy\Resources\Listing::get($shopId);
$listingTitle = $listing->title;
$shop = $listing->shop;
$json = $listing->toJson();
$array = $listing->toArray();
$reviews = Review::all();
$firstReview = $reviews->data[0];
$firstReview = $reviews->first();
$count = $reviews->count();
$reviews->append(['shop_id' => $shopId]);
// Get 100 results using pagination.
foreach($reviews->paginate(200) as $review) {
...
}