From 77be08cdece3b9e897b75be21de281abe251f006 Mon Sep 17 00:00:00 2001 From: Todd Lahman Date: Mon, 19 Dec 2022 11:43:09 -0800 Subject: [PATCH] Update Postman collection with product_list Bump to 2.8.2 --- changelog.txt | 3 +- postman_api_query_example_collection.json | 79 ++++++++++++++++------- wc-api-manager-php-library.php | 22 +++++-- 3 files changed, 75 insertions(+), 29 deletions(-) diff --git a/changelog.txt b/changelog.txt index cfcaf42..7c8e1a0 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,7 +1,8 @@ *** WooCommerce API Manager PHP Library for Plugins and Themes Changelog *** -2021.10.22 - version 2.8.2 +2022.12.19 - version 2.8.2 * Fix: Mispelled word in error message. + * Tweak: Updated API endpoint query example Postman collection to include new product_list API endpoint. 2021.07.09 - version 2.8.1 * Fix: Warning: Trying to access array offset on value of type bool. PHP warning fixed by checking if the API Key string is not empty before using the string to access the api_key element in an array. diff --git a/postman_api_query_example_collection.json b/postman_api_query_example_collection.json index bb82865..b98becc 100644 --- a/postman_api_query_example_collection.json +++ b/postman_api_query_example_collection.json @@ -2,7 +2,8 @@ "info": { "_postman_id": "15a2f398-c8a1-4fb9-9eae-4fbd2dc7bab7", "name": "WC >= 2.0", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "3311052" }, "item": [ { @@ -11,7 +12,7 @@ "method": "POST", "header": [], "url": { - "raw": "http://wc/?wc-api=wc-am-api&wc_am_action=activate&instance=p1uOusaNM5ub3&object=http://dev.toddlahman.com/&product_id=137890&version=1.0&api_key=9f9273c809979608220752449d55fec9fbe85c3e", + "raw": "http://wc/?wc-api=wc-am-api&wc_am_action=activate&instance=p1uOusaNM5ub3&object=http://dev.wc.com&product_id=32960&version=1.0&api_key=b9dc373c7983cda3897c1502574b1bf929e02a53", "protocol": "http", "host": [ "wc" @@ -34,11 +35,11 @@ }, { "key": "object", - "value": "http://dev.toddlahman.com/" + "value": "http://dev.wc.com" }, { "key": "product_id", - "value": "137890" + "value": "32960" }, { "key": "version", @@ -46,7 +47,7 @@ }, { "key": "api_key", - "value": "9f9273c809979608220752449d55fec9fbe85c3e" + "value": "b9dc373c7983cda3897c1502574b1bf929e02a53" } ] } @@ -59,7 +60,7 @@ "method": "POST", "header": [], "url": { - "raw": "http://wc/?wc-api=wc-am-api&wc_am_action=deactivate&instance=p1uOusaNM5ub3&product_id=137890&api_key=9f9273c809979608220752449d55fec9fbe85c3e", + "raw": "http://wc/?wc-api=wc-am-api&wc_am_action=deactivate&instance=p1uOusaNM5ub3&product_id=32960&api_key=b9dc373c7983cda3897c1502574b1bf929e02a53", "protocol": "http", "host": [ "wc" @@ -82,11 +83,11 @@ }, { "key": "product_id", - "value": "137890" + "value": "32960" }, { "key": "api_key", - "value": "9f9273c809979608220752449d55fec9fbe85c3e" + "value": "b9dc373c7983cda3897c1502574b1bf929e02a53" } ] } @@ -99,7 +100,7 @@ "method": "POST", "header": [], "url": { - "raw": "http://wc/?wc-api=wc-am-api&wc_am_action=status&instance=p1uOusaNM5ub3&product_id=137890&api_key=9f9273c809979608220752449d55fec9fbe85c3e", + "raw": "http://wc/?wc-api=wc-am-api&wc_am_action=status&instance=p1uOusaNM5ub3&product_id=32960&api_key=b9dc373c7983cda3897c1502574b1bf929e02a53", "protocol": "http", "host": [ "wc" @@ -122,11 +123,47 @@ }, { "key": "product_id", - "value": "137890" + "value": "32960" }, { "key": "api_key", - "value": "9f9273c809979608220752449d55fec9fbe85c3e" + "value": "b9dc373c7983cda3897c1502574b1bf929e02a53" + } + ] + } + }, + "response": [] + }, + { + "name": "product_list 2.4.6", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "http://wc/?wc-api=wc-am-api&wc_am_action=product_list&instance=p1uOusaNM5ub3&api_key=b9dc373c7983cda3897c1502574b1bf929e02a53", + "protocol": "http", + "host": [ + "wc" + ], + "path": [ + "" + ], + "query": [ + { + "key": "wc-api", + "value": "wc-am-api" + }, + { + "key": "wc_am_action", + "value": "product_list" + }, + { + "key": "instance", + "value": "p1uOusaNM5ub3" + }, + { + "key": "api_key", + "value": "b9dc373c7983cda3897c1502574b1bf929e02a53" } ] } @@ -139,7 +176,7 @@ "method": "POST", "header": [], "url": { - "raw": "http://wc/?wc-api=wc-am-api&wc_am_action=information&instance=p1uOusaNM5ub3&product_id=137890&version=1.0&api_key=9f9273c809979608220752449d55fec9fbe85c3e&plugin_name=simple-comments/simple-comments.php", + "raw": "http://wc/?wc-api=wc-am-api&wc_am_action=information&instance=p1uOusaNM5ub3&product_id=32960&version=1.0&api_key=b9dc373c7983cda3897c1502574b1bf929e02a53&plugin_name=search-engine-ping/search-engine-ping.php", "protocol": "http", "host": [ "wc" @@ -162,7 +199,7 @@ }, { "key": "product_id", - "value": "137890" + "value": "32960" }, { "key": "version", @@ -170,11 +207,11 @@ }, { "key": "api_key", - "value": "9f9273c809979608220752449d55fec9fbe85c3e" + "value": "b9dc373c7983cda3897c1502574b1bf929e02a53" }, { "key": "plugin_name", - "value": "simple-comments/simple-comments.php" + "value": "search-engine-ping/search-engine-ping.php" } ] } @@ -187,7 +224,7 @@ "method": "POST", "header": [], "url": { - "raw": "http://wc/?wc-api=wc-am-api&wc_am_action=update&instance=p1uOusaNM5ub3&product_id=137890&version=1.0&api_key=9f9273c809979608220752449d55fec9fbe85c3e&plugin_name=simple-comments", + "raw": "http://wc/?wc-api=wc-am-api&wc_am_action=update&instance=p1uOusaNM5ub3&product_id=32960&version=1.0&api_key=b9dc373c7983cda3897c1502574b1bf929e02a53&plugin_name=search-engine-ping", "protocol": "http", "host": [ "wc" @@ -210,7 +247,7 @@ }, { "key": "product_id", - "value": "137890" + "value": "32960" }, { "key": "version", @@ -218,15 +255,15 @@ }, { "key": "api_key", - "value": "9f9273c809979608220752449d55fec9fbe85c3e" + "value": "b9dc373c7983cda3897c1502574b1bf929e02a53" }, { "key": "plugin_name", - "value": "simple-comments" + "value": "search-engine-ping" }, { "key": "slug", - "value": "api-manager-php-library", + "value": "search-engine-ping", "disabled": true } ] @@ -239,7 +276,6 @@ { "listen": "prerequest", "script": { - "id": "abf60ea2-7527-488c-a97a-3f4eeb8b9fd7", "type": "text/javascript", "exec": [ "" @@ -249,7 +285,6 @@ { "listen": "test", "script": { - "id": "37707542-3069-4c8a-8d71-26882d5b1616", "type": "text/javascript", "exec": [ "" diff --git a/wc-api-manager-php-library.php b/wc-api-manager-php-library.php index e4017d0..cc5334a 100644 --- a/wc-api-manager-php-library.php +++ b/wc-api-manager-php-library.php @@ -1,10 +1,10 @@