Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

youcan

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

youcan

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

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

youcan Logo

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 ActionResponsable Method
Get All ProductsmyStore.products.getAllProducts()
Get Products with sort, include, limit and page myStore.products.getProducts({ })
Get Product By IDmyStore.products.getProductById("PRODUCT_ID")
Create ProductmyStore.products.createProduct(productData)
Update ProductmyStore.products.updateProduct("PRODUCT_ID", productData)

See Example

See Products documentation

Orders

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

See Example

See Orders documentation

Reviews

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

See Example

See Reviews documentation

Categories

Categories ActionResponsable Method
Get All CategoriesmyStore.categories.getAllCategories()
Get Categories with sort, include, limit and page myStore.categories.getCategories({ })
Get Category By IDmyStore.categories.getCategoryById("CATEGORY_ID")
Create CategorymyStore.categories.createCategory(categoryData)
Update CategorymyStore.categories.updateCategory("CATEGORY_ID", categoryData)
Delete CategorymyStore.categories.deleteCategory("CATEGORY_ID")

See Example

See categories documentation

Coupons

Coupons ActionResponsable Method
Get All CouponsmyStore.coupons.getAllCoupons()
Get Coupons with sort, include, limit and page myStore.coupons.getCoupons({ })
Get Coupon By IDmyStore.coupons.getCouponById("COUPON_ID")
Create CouponmyStore.coupons.createCoupon(couponData)
Update CouponmyStore.coupons.updateCoupon("COUPON_ID", couponData)
Delete CouponmyStore.coupons.deleteCoupon("COUPON_ID")

See Example

See Coupons documentation

Customers

Customers ActionResponsable Method
Get All CustomersmyStore.customers.getAllCustomers()
Get Customers with sort, include, limit and page myStore.customers.getCustomers({ })
Get Customer By IDmyStore.customers.getCustomerById("CUSTOMER_ID")
Create CustomermyStore.customers.createCustomer(customerData)
Update CustomermyStore.customers.updateCustomer("CUSTOMER_ID", customerData)
Delete CustomermyStore.customers.deleteCustomer("CUSTOMER_ID")

See Example

See Customers documentation

Languages

Languages ActionResponsable Method
Get All LanguagesmyStore.languages.getLanguages()
Set Default Languages myStore.languages.setLanguageDefault("LANGUAGE_ID")

See Example

See Languages documentation

Menus

Menus ActionResponsable Method
Get All MenusmyStore.menus.getMenus()
Get Menu By IDmyStore.menus.getMenuById("MENU_ID")
Create MenumyStore.menus.createMenu(menuData)
Update MenumyStore.menus.updateMenu("MENU_ID", menuData)

See Example

See Menus documentation

Pages

Pages ActionResponsable Method
Get All PagesmyStore.pages.getAllPages()
Get Customers with sort, include, limit, page, search myStore.pages.getPages({ })
Get Page By IDmyStore.pages.getPageById("PAGE_ID")
Create PagemyStore.pages.createPage(pageData)
Update PagemyStore.pages.updatePage("PAGE_ID", pageData)
Delete PagemyStore.pages.deletePage("PAGE_ID")

See Example

See Pages documentation

Rest Hooks

Rest Hooks ActionResponsable Method
Get All Rest HooksmyStore.resthooks.getAllResthooks()
Subscribe to event HookmyStore.resthooks.resthookSubscribe("EVENT", "TARGET_URL")
Unsubscribe from event HookmyStore.resthooks.resthookUnsubscribe("RESTHOOK_ID")

See Example

See Rest Hooks documentation

Product Inventory

Product Inventory ActionResponsable Method
Incerement Product InventorymyStore.productInventory.IncrementProductInventory("PRODUCT_ID", inventoryData)
Decerement Product InventorymyStore.productInventory.DecrementProductInventory("PRODUCT_ID", inventoryData)

See Example

See Product Inventory documentation

Shipping Zones

Shipping Zones ActionResponsable Method
Get All Shipping ZonesmyStore.coupons.getAllShippingZones()
Get Shipping Zones with sort, include, limit and page myStore.coupons.getShippingZones({ })
Get Shipping Zone By IDmyStore.coupons.getShippingZoneById("SHIPPING_ZONE_ID")
Create Shipping ZonemyStore.coupons.createShippingZone(shippingZoneData)
Update Shipping ZonemyStore.coupons.updateShippingZone("SHIPPING_ZONE_ID", shippingZoneData)
Delete Shipping ZonemyStore.coupons.deleteShippingZone("SHIPPING_ZONE_ID")
Create Shipping RatemyStore.coupons.createShippingRate("SHIPPING_ZONE_ID", shippingRatesDate)
Update Shipping RatemyStore.coupons.createShippingRate("SHIPPING_ZONE_ID", shippingRatesDate)

See Example

See Shipping Zones documentation

Store

Store ActionResponsable Method
Get Store DetailsmyStore.store.getDetails()
Get Store PacksmyStore.store.getPacks()
Get Store ProfitmyStore.store.getProfit()
Create Support TicketmyStore.store.createSupportTicket(ticketData)

See Example

See Store documentation

Upsells

Upsells ActionResponsable Method
Get All UpsellsmyStore.coupons.getAllUpsells()
Get Upsells with limit and page myStore.coupons.getUpsells({ })
Get Upsell By IDmyStore.coupons.getUpsellById("UPSELL_ID")
Create UpsellmyStore.coupons.createUpsell(upsellData)
Update UpsellmyStore.coupons.updateUpsell("UPSELL_ID", upsellData)
Delete UpsellmyStore.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!]

Buy Me A Coffee

Keywords

FAQs

Package last updated on 24 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc