Skip to content

Commit 939ddab

Browse files
authored
Feature/picture url super size (#122)
* return url super size * add supersizeurl to url request
1 parent 2dbdb37 commit 939ddab

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/buildURL.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const buildURL = {
2323
baseUrl += options.param ? '&' + options.param + '=' + options.name : '';
2424
baseUrl += options.additionalParam ? '&' + options.additionalParam : '';
2525
baseUrl += options.sortOrder ? '&sortOrder=' + options.sortOrder : '';
26-
baseUrl += '&outputSelector(0)=SellerInfo&outputSelector(1)=PictureURLLarge';
26+
baseUrl += '&outputSelector(0)=SellerInfo&outputSelector(1)=PictureURLLarge&outputSelector(2)=PictureURLSuperSize';
2727
baseUrl += options.limit ? '&paginationInput.entriesPerPage=' + options.limit : '';
2828
baseUrl += options.globalID ? '&GLOBAL-ID=' + options.globalID : '';
2929
baseUrl += options.pageNumber ? '&paginationInput.pageNumber=' + options.pageNumber : '';

test/buildURL.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ describe('test building url methods', () => {
88

99

1010
it('test search url', () => {
11-
const expectedSearchUrl = 'https://svcs.ebay.com/services/search/FindingService/v1?SECURITY-APPNAME=testID&OPERATION-NAME=findItemsByKeywords&SERVICE-VERSION=1.0.0&RESPONSE-DATA-FORMAT=JSON&keywords=iphone&outputSelector(0)=SellerInfo&outputSelector(1)=PictureURLLarge&paginationInput.entriesPerPage=6&GLOBAL-ID=EBAY-US';
11+
const expectedSearchUrl = 'https://svcs.ebay.com/services/search/FindingService/v1?SECURITY-APPNAME=testID&OPERATION-NAME=findItemsByKeywords&SERVICE-VERSION=1.0.0&RESPONSE-DATA-FORMAT=JSON&keywords=iphone&outputSelector(0)=SellerInfo&outputSelector(1)=PictureURLLarge&outputSelector(2)=PictureURLSuperSize&paginationInput.entriesPerPage=6&GLOBAL-ID=EBAY-US';
1212
const options = {
1313
name: 'iphone',
1414
operationName: 'findItemsByKeywords',

test/finding.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('test ebay finding Api', () => {
2727
const ebay = new Ebay({
2828
clientID: 'ABCD'
2929
});
30-
nockFindingApi.get('/services/search/FindingService/v1?SECURITY-APPNAME=ABCD&OPERATION-NAME=findItemsAdvanced&SERVICE-VERSION=1.0.0&RESPONSE-DATA-FORMAT=JSON&paginationInput.entriesPerPage=2&keywords=ipad&itemFilter(0).name=ExpeditedShippingType&itemFilter(0).value=OneDayShipping&outputSelector(0)=SellerInfo&outputSelector(1)=PictureURLLarge&GLOBAL-ID=EBAY-US')
30+
nockFindingApi.get('/services/search/FindingService/v1?SECURITY-APPNAME=ABCD&OPERATION-NAME=findItemsAdvanced&SERVICE-VERSION=1.0.0&RESPONSE-DATA-FORMAT=JSON&paginationInput.entriesPerPage=2&keywords=ipad&itemFilter(0).name=ExpeditedShippingType&itemFilter(0).value=OneDayShipping&outputSelector(0)=SellerInfo&outputSelector(1)=PictureURLLarge&outputSelector(2)=PictureURLSuperSize&GLOBAL-ID=EBAY-US')
3131
.reply(200, { 'findItemsAdvancedResponse': [{ 'ack': ['Success'] }] });
3232
return ebay.findItemsAdvanced({
3333
entriesPerPage: 2,

0 commit comments

Comments
 (0)