File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ let ebay = new Ebay({
55} ) ;
66
77ebay . getAllCategories ( ) . then ( ( data ) => {
8- console . log ( data ) ;
8+ console . log ( data ) ; //data.CategoryArray
99} , ( error ) => {
1010 console . log ( error ) ;
1111} )
Original file line number Diff line number Diff line change @@ -33,11 +33,10 @@ const buildURL = {
3333 */
3434 buildShoppingUrl ( options ) {
3535 let base_url = "http://open.api.ebay.com/Shopping?" ;
36- base_url += "SECURITY-APPNAME=" + options . clientID ;
37- base_url += "&OPERATION-NAME=" + options . operationName ;
38- base_url += "&SERVICE-VERSION=1.0.0&RESPONSE-DATA-FORMAT=JSON&REST-PAYLOAD&" ;
39- base_url += options . param + "=" + options . name ;
40- base_url += "&paginationInput.entriesPerPage=" + options . limit ;
36+ base_url += "appid=" + options . clientID ;
37+ base_url += "&callname=" + options . operationName ;
38+ base_url += "&version=967&siteid=0&responseencoding=JSON&" ;
39+ base_url += options . param + "=" + options . name + "&IncludeSelector=ChildCategories" ;
4140 //base_url += "&GLOBAL-ID=" + oglobalID;
4241 return base_url ;
4342 } ,
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ Ebay.prototype = {
5050 getAllCategories : function ( categoryID ) {
5151 //console.log(url);
5252 this . options . name = categoryID ? categoryID : - 1 ;
53- this . options . operationName = "findItemsByKeywords " ;
53+ this . options . operationName = "GetCategoryInfo " ;
5454 this . options . param = "CategoryID" ;
5555 let url = urlObject . buildShoppingUrl ( this . options ) ;
5656 console . log ( url ) ;
You can’t perform that action at this time.
0 commit comments