1. Go to this page and download the library: Download breakpoint/etsy-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/ */
breakpoint / etsy-php example snippets
$esty = new \breakpoint\etsy\EtsyClient('your-keystring', 'your-secret');
$results = $etsy->listing->findAllFeaturedListings();
foreach ($results as $item) {
echo $item->listing_id;
}
$etsy->listing-> // method found in API documentation
$etsy->userprofile->updateUserProfile(
// first array is parameters
['user_id', 'user_123'],
// second array is data you are changing
['first_name' => 'john', 'last_name' => 'developer']);
$results = $etsy->listing->findAllFeaturedListings();
$results[0]; // access the item at that position
$results->count(); // returns number of items
$results->first(); // access the first item
$results->add(object); // useful if you are performing requests with multiple pages