File tree Expand file tree Collapse file tree 5 files changed +12
-13
lines changed
examples/javaScript/feeds Expand file tree Collapse file tree 5 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -75,4 +75,5 @@ node_modules/
7575.tmp /*
7676npm-debug.log
7777npm-debug.log /*
78- package-lock.json
78+ package-lock.json
79+ response.txt
Original file line number Diff line number Diff line change 1+ 0.0.23
2+ - Bug Fix for Feed Result charset
3+
140.0.22
25 - Bug Fix Default value for XML parsing
36 - Add Support for the Subscription APIs, Recommendations API
Original file line number Diff line number Diff line change @@ -4,11 +4,10 @@ var accessKey = process.env.AWS_ACCESS_KEY_ID || 'YOUR_KEY';
44var accessSecret = process . env . AWS_SECRET_ACCESS_KEY || 'YOUR_SECRET' ;
55
66var amazonMws = require ( '../../../lib/amazon-mws' ) ( accessKey , accessSecret ) ;
7- var fse = require ( 'fs-extra' ) ;
87
98/**
109 * Use __CHARSET__ to override charset option.;
11- * This along with __RAW__ do not get written in the request.
10+ * This along with __RAW__ do NOT get written in the request.
1211 * */
1312function feedRequest ( ) {
1413 var FeedSubmissionId = '10101010XXX' ;
@@ -18,14 +17,14 @@ function feedRequest() {
1817 'SellerId' : 'SELLER_ID' ,
1918 'MWSAuthToken' : 'MWS_AUTH_TOKEN' ,
2019 'FeedSubmissionId' : FeedSubmissionId ,
21- __CHARSET__ : 'latin1'
20+ // __CHARSET__: 'latin1'
21+ __CHARSET__ : 'ISO-8859-1'
2222 } , function ( error , response ) {
2323 if ( error ) {
2424 console . log ( 'error ' , error ) ;
2525 return ;
2626 }
27- fse . writeFileSync ( 'response.txt' , response . data ) ;
28- console . log ( 'Headers' , response . Headers ) ;
27+ console . log ( 'response ' , JSON . stringify ( response ) ) ;
2928 } ) ;
3029}
3130
Original file line number Diff line number Diff line change @@ -277,11 +277,7 @@ AmazonMwsResource.prototype = {
277277 debug ( 'Inside user Charset option' ) ;
278278 charset = userOptions . userCharset ;
279279 try {
280- /**
281- * https://github.com/ashtuchkin/iconv-lite/issues/32
282- */
283- var win1251String = iconv . decode ( bufferString , 'win1251' ) ;
284- responseString = iconv . encode ( win1251String , charset ) ;
280+ responseString = iconv . decode ( bufferString , charset ) ;
285281 } catch ( Exception ) {
286282 debug ( 'Exception iconv ' , Exception ) ;
287283 return callback . call ( self , new Error . AmazonMwsAPIError ( {
@@ -336,7 +332,7 @@ AmazonMwsResource.prototype = {
336332 }
337333 // debug('response', response);
338334 try {
339- ResponseMetadata = response . ResponseMetadata ;
335+ ResponseMetadata = response . ResponseMetadata || { } ;
340336 } catch ( exception ) {
341337 debug ( 'exception' , exception ) ;
342338 ResponseMetadata = { } ;
Original file line number Diff line number Diff line change 11{
22 "name" : " amazon-mws" ,
3- "version" : " 0.0.22 " ,
3+ "version" : " 0.0.23 " ,
44 "description" : " Amazon MWS API wrapper" ,
55 "keywords" : [
66 " Amazon MWS" ,
You can’t perform that action at this time.
0 commit comments