npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

youcan

v1.0.5

Published

youcan is a package allows the developer to interact easily with the YouCan API

Downloads

40

Readme

youcan is a package allows the developer to interact easily with the YouCan API.

NPM Version NPM Install Size NPM Downloads

Installation

Either through cloning with git or by using npm (the recommended way):

npm install youcan # or using yarn: yarn add youcan

Example Usage

import YouCan from "youcan";

const myStore = new YouCan("YOUCAN_STORE_ACCESS_TOKEN");

myStore.products
	.getAllProducts()
	.then((products) => {
		console.log(products.data);
	})
	.catch((error) => {
		console.error(error.response.data);
	});

See all examples Here

Products

| Product Action | Responsable Method | | - | - | | Get All Products | myStore.products.getAllProducts() | | Get Products with sort, include, limit and page | myStore.products.getProducts({ }) | | Get Product By ID | myStore.products.getProductById("PRODUCT_ID") | | Create Product | myStore.products.createProduct(productData) | | Update Product | myStore.products.updateProduct("PRODUCT_ID", productData) |

See Example

See Products documentation

Orders

| Order Action | Responsable Method | | - | - | | Get All Orders | myStore.orders.getAllOrders() | | Get Orders with sort, include, limit and page | myStore.orders.getOrders({ }) | | Get Order By ID | myStore.orders.getOrderById("ORDER_ID") | | Create Order | myStore.orders.createOrder(orderData) | | Close Order | myStore.orders.closeOrder(orderData) | | Fulfill Order | myStore.orders.fulfillOrder({ orderId: "ORDER_ID" }) | | Pay Order | myStore.orders.payOrder("ORDER_ID") |

See Example

See Orders documentation

Reviews

| Reviews Action | Responsable Method | | - | - | | Get All Reviews | myStore.reviews.getAllReviews() | | Get Reviews with sort, include, limit and page | myStore.reviews.getReviews({ }) | | Get Review By ID | myStore.reviews.getReviewById("REVIEW_ID") | | Create Review | myStore.reviews.createReview("PRODUCT_ID", reviewData) | | Update Review | myStore.reviews.updateReview("REVIEW_ID", reviewData) | | Delete Review | myStore.reviews.deleteReview("REVIEW_ID") | | Get Product Reviews with sort, include, limit and page | myStore.reviews.getReviewsByProductId("PRODUCT_ID", {}) | | Get All Product Reviews | myStore.reviews.getAllReviewsByProductId("PRODUCT_ID") | | Reject Review | myStore.reviews.rejectReview("REVIEW_ID") | | Approve Review | myStore.reviews.approveReview("REVIEW_ID") |

See Example

See Reviews documentation

Categories

| Categories Action | Responsable Method | | - | - | | Get All Categories | myStore.categories.getAllCategories() | | Get Categories with sort, include, limit and page | myStore.categories.getCategories({ }) | | Get Category By ID | myStore.categories.getCategoryById("CATEGORY_ID") | | Create Category | myStore.categories.createCategory(categoryData) | | Update Category | myStore.categories.updateCategory("CATEGORY_ID", categoryData) | | Delete Category | myStore.categories.deleteCategory("CATEGORY_ID") |

See Example

See categories documentation

Coupons

| Coupons Action | Responsable Method | | - | - | | Get All Coupons | myStore.coupons.getAllCoupons() | | Get Coupons with sort, include, limit and page | myStore.coupons.getCoupons({ }) | | Get Coupon By ID | myStore.coupons.getCouponById("COUPON_ID") | | Create Coupon | myStore.coupons.createCoupon(couponData) | | Update Coupon | myStore.coupons.updateCoupon("COUPON_ID", couponData) | | Delete Coupon | myStore.coupons.deleteCoupon("COUPON_ID") |

See Example

See Coupons documentation

Customers

| Customers Action | Responsable Method | | - | - | | Get All Customers | myStore.customers.getAllCustomers() | | Get Customers with sort, include, limit and page | myStore.customers.getCustomers({ }) | | Get Customer By ID | myStore.customers.getCustomerById("CUSTOMER_ID") | | Create Customer | myStore.customers.createCustomer(customerData) | | Update Customer | myStore.customers.updateCustomer("CUSTOMER_ID", customerData) | | Delete Customer | myStore.customers.deleteCustomer("CUSTOMER_ID") |

See Example

See Customers documentation

Languages

| Languages Action | Responsable Method | | - | - | | Get All Languages | myStore.languages.getLanguages() | | Set Default Languages | myStore.languages.setLanguageDefault("LANGUAGE_ID") |

See Example

See Languages documentation

Menus

| Menus Action | Responsable Method | | - | - | | Get All Menus | myStore.menus.getMenus() | | Get Menu By ID | myStore.menus.getMenuById("MENU_ID") | | Create Menu | myStore.menus.createMenu(menuData) | | Update Menu | myStore.menus.updateMenu("MENU_ID", menuData) |

See Example

See Menus documentation

Pages

| Pages Action | Responsable Method | | - | - | | Get All Pages | myStore.pages.getAllPages() | | Get Customers with sort, include, limit, page, search | myStore.pages.getPages({ }) | | Get Page By ID | myStore.pages.getPageById("PAGE_ID") | | Create Page | myStore.pages.createPage(pageData) | | Update Page | myStore.pages.updatePage("PAGE_ID", pageData) | | Delete Page | myStore.pages.deletePage("PAGE_ID") |

See Example

See Pages documentation

Rest Hooks

| Rest Hooks Action | Responsable Method | | - | - | | Get All Rest Hooks | myStore.resthooks.getAllResthooks() | | Subscribe to event Hook | myStore.resthooks.resthookSubscribe("EVENT", "TARGET_URL") | | Unsubscribe from event Hook | myStore.resthooks.resthookUnsubscribe("RESTHOOK_ID") |

See Example

See Rest Hooks documentation

Product Inventory

| Product Inventory Action | Responsable Method | | - | - | | Incerement Product Inventory | myStore.productInventory.IncrementProductInventory("PRODUCT_ID", inventoryData) | | Decerement Product Inventory | myStore.productInventory.DecrementProductInventory("PRODUCT_ID", inventoryData) |

See Example

See Product Inventory documentation

Shipping Zones

| Shipping Zones Action | Responsable Method | | - | - | | Get All Shipping Zones | myStore.coupons.getAllShippingZones() | | Get Shipping Zones with sort, include, limit and page | myStore.coupons.getShippingZones({ }) | | Get Shipping Zone By ID | myStore.coupons.getShippingZoneById("SHIPPING_ZONE_ID") | | Create Shipping Zone | myStore.coupons.createShippingZone(shippingZoneData) | | Update Shipping Zone | myStore.coupons.updateShippingZone("SHIPPING_ZONE_ID", shippingZoneData) | | Delete Shipping Zone | myStore.coupons.deleteShippingZone("SHIPPING_ZONE_ID") | | Create Shipping Rate | myStore.coupons.createShippingRate("SHIPPING_ZONE_ID", shippingRatesDate) | | Update Shipping Rate | myStore.coupons.createShippingRate("SHIPPING_ZONE_ID", shippingRatesDate) |

See Example

See Shipping Zones documentation

Store

| Store Action | Responsable Method | | - | - | | Get Store Details | myStore.store.getDetails() | | Get Store Packs | myStore.store.getPacks() | | Get Store Profit | myStore.store.getProfit() | | Create Support Ticket | myStore.store.createSupportTicket(ticketData) |

See Example

See Store documentation

Upsells

| Upsells Action | Responsable Method | | - | - | | Get All Upsells | myStore.coupons.getAllUpsells() | | Get Upsells with limit and page | myStore.coupons.getUpsells({ }) | | Get Upsell By ID | myStore.coupons.getUpsellById("UPSELL_ID") | | Create Upsell | myStore.coupons.createUpsell(upsellData) | | Update Upsell | myStore.coupons.updateUpsell("UPSELL_ID", upsellData) | | Delete Upsell | myStore.coupons.deleteUpsell("UPSELL_ID") |

See Example

See Upsells documentation

Support

This package costs me time to make and maintain every time.

[I am very 😀 about every coffee!]