@alexdee2007/etsy-ts

Etsy API wrapper written in typescript.

Usage no npm install needed!

<script type="module">
  import alexdee2007EtsyTs from 'https://cdn.skypack.dev/@alexdee2007/etsy-ts';
</script>

README

etsy-ts

Most of the code in this package is generated by etsy-api-scrapper.

See Etsy API reference for detailed info on methods and types you can find in this wrapper.

Installation:

npm install etsy-ts --save

Usage:

import {User, Shop, Listing, IUser, IShop, IListing} from "etsy-ts";

(async () => {
    //get user, then user's shop, then shop's listings
    let user = (await User.getUser<IUser>({
        //add your api_key here
        user_id: ["rptr"]
    })).results[0];

    let shop = (await Shop.findAllUserShops<IShop>({
        user_id: user.login_name
    })).results[0];

    let listings = (await Listing.findAllShopListingsActive<IListing>({
        shop_id: shop.shop_id
    })).results;

    console.log("User:", user);
    console.log("Shop:", shop);
    console.log("Listings:", listings);
})();