Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated v1_beta #167

Open
ojameno opened this issue Feb 26, 2024 · 0 comments
Open

Deprecated v1_beta #167

ojameno opened this issue Feb 26, 2024 · 0 comments

Comments

@ojameno
Copy link

ojameno commented Feb 26, 2024

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/ebay-node-api/src/taxonomy-api.js b/node_modules/ebay-node-api/src/taxonomy-api.js
index a1fba80..4a7c617 100644
--- a/node_modules/ebay-node-api/src/taxonomy-api.js
+++ b/node_modules/ebay-node-api/src/taxonomy-api.js
@@ -13,7 +13,7 @@ const getDefaultCategoryTreeId = function (marketPlaceId) {
     marketPlaceId = upperCase(marketPlaceId);
     if (!this.options.appAccessToken) throw new Error('Missing Access token, Generate access token');
     const auth = 'Bearer ' + this.options.appAccessToken;
-    return makeRequest(this.options, `/commerce/taxonomy/v1_beta/get_default_category_tree_id?marketplace_id=${marketPlaceId}`, 'GET', auth).then((result) => {
+    return makeRequest(this.options, `/commerce/taxonomy/v1/get_default_category_tree_id?marketplace_id=${marketPlaceId}`, 'GET', auth).then((result) => {
         return JSON.parse(result);
     });
 };
@@ -27,7 +27,7 @@ const getCategoryTree = function (categoryTreeId) {
     if (!categoryTreeId) categoryTreeId = 0;
     if (!this.options.appAccessToken) throw new Error('Missing Access token, Generate access token');
     const auth = 'Bearer ' + this.options.appAccessToken;
-    return makeRequest(this.options, `/commerce/taxonomy/v1_beta/category_tree/${categoryTreeId}`, 'GET', auth).then((result) => {
+    return makeRequest(this.options, `/commerce/taxonomy/v1/category_tree/${categoryTreeId}`, 'GET', auth).then((result) => {
         return JSON.parse(result);
     });
 };
@@ -43,7 +43,7 @@ const getCategorySubtree = function (categoryTreeId, categoryId) {
     if (!categoryId) throw new Error('Missing Categor id \n Refer documentation here https://developer.ebay.com/api-docs/commerce/taxonomy/resources/category_tree/methods/getCategorySubtree#h2-samples');
     if (!this.options.appAccessToken) throw new Error('Missing Access token, Generate access token');
     const auth = 'Bearer ' + this.options.appAccessToken;
-    return makeRequest(this.options, `/commerce/taxonomy/v1_beta/category_tree/${categoryTreeId}/get_category_subtree?category_id=${categoryId}`, 'GET', auth).then((result) => {
+    return makeRequest(this.options, `/commerce/taxonomy/v1/category_tree/${categoryTreeId}/get_category_subtree?category_id=${categoryId}`, 'GET', auth).then((result) => {
         return JSON.parse(result);
     });
 };
@@ -59,7 +59,7 @@ const getCategorySuggestions = function (categoryTreeId, keyword) {
     if (!keyword) throw new Error('Missing keyword \n Refer documentation here https://developer.ebay.com/api-docs/commerce/taxonomy/resources/category_tree/methods/getCategorySuggestions');
     if (!this.options.appAccessToken) throw new Error('Missing Access token, Generate access token');
     const auth = 'Bearer ' + this.options.appAccessToken;
-    return makeRequest(this.options, `/commerce/taxonomy/v1_beta/category_tree/${categoryTreeId}/get_category_suggestions?q=${keyword}`, 'GET', auth).then((result) => {
+    return makeRequest(this.options, `/commerce/taxonomy/v1/category_tree/${categoryTreeId}/get_category_suggestions?q=${keyword}`, 'GET', auth).then((result) => {
         return JSON.parse(result);
     });
 };
@@ -74,7 +74,7 @@ const getItemAspectsForCategory = function (categoryTreeId, categoryId) {
     if (!categoryId) throw new Error('Missing Category id \n Refer documentation here https://developer.ebay.com/api-docs/commerce/taxonomy/resources/category_tree/methods/getItemAspectsForCategory#h2-samples');
     if (!this.options.appAccessToken) throw new Error('Missing Access token, Generate access token');
     const auth = 'Bearer ' + this.options.appAccessToken;
-    return makeRequest(this.options, `/commerce/taxonomy/v1_beta/category_tree/${categoryTreeId}/get_item_aspects_for_category?category_id=${categoryId}`, 'GET', auth).then((result) => {
+    return makeRequest(this.options, `/commerce/taxonomy/v1/category_tree/${categoryTreeId}/get_item_aspects_for_category?category_id=${categoryId}`, 'GET', auth).then((result) => {
         return JSON.parse(result);
     });
 };

This issue body was partially generated by patch-package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant