From e8dfe754ddcf49a1394f052060fea5ca8d228312 Mon Sep 17 00:00:00 2001 From: DAnn2012 Date: Wed, 31 Jul 2024 20:37:15 +0200 Subject: [PATCH] Fix typo (README.md) (#50156) * Update README.md * Add changefile(s) from automation for the following project(s): @woocommerce/api * Update heading to fix lint failure --------- Co-authored-by: github-actions Co-authored-by: Jonathan Lane --- packages/js/api/README.md | 6 +++--- packages/js/api/changelog/50156-patch-9 | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 packages/js/api/changelog/50156-patch-9 diff --git a/packages/js/api/README.md b/packages/js/api/README.md index e014365465f..aeb0c3c996f 100644 --- a/packages/js/api/README.md +++ b/packages/js/api/README.md @@ -10,9 +10,9 @@ features: _\* TypeScript Definitions and Repositories are currently only supported for [Products](https://woocommerce.github.io/woocommerce-rest-api-docs/#products), and partially supported for [Orders](https://woocommerce.github.io/woocommerce-rest-api-docs/#orders)._ -## Differences from @woocommerce/woocomerce-rest-api +## Differences from @woocommerce/woocommerce-rest-api -WooCommerce has two API clients in JavaScript for interacting with a WooCommerce installation's RESTful API. This package, and the [@woocommerce/woocomerce-rest-api](https://www.npmjs.com/package/@woocommerce/woocommerce-rest-api) package. +WooCommerce has two API clients in JavaScript for interacting with a WooCommerce installation's RESTful API. This package, and the [@woocommerce/woocommerce-rest-api](https://www.npmjs.com/package/@woocommerce/woocommerce-rest-api) package. The main difference between them is the Repositories and the TypeScript definitions for the supported endpoints. When using Axios directly, as you can do with both libraries, you query the WooCommerce API in a raw object format, following the [API documentation](https://woocommerce.github.io/woocommerce-rest-api-docs/#introduction) parameters. Comparatively, with the Repositories provided in this package, you have the parameters as properties of an object, which gives you the benefits of auto-complete and strict types, for instance. @@ -104,7 +104,7 @@ The following methods are available on all repositories if the corresponding met - `read( objectId )` - Read a single object of the model type - `update( objectId, {...properties} )` - Update a single object of the model type -#### Child Repositories +#### Child Repositories Use In child model repositories, each method requires the `parentId` as the first parameter: diff --git a/packages/js/api/changelog/50156-patch-9 b/packages/js/api/changelog/50156-patch-9 new file mode 100644 index 00000000000..b0d6fbdf8cb --- /dev/null +++ b/packages/js/api/changelog/50156-patch-9 @@ -0,0 +1,4 @@ +Significance: patch +Type: tweak +Comment: Fix typo (README.md) +