-
Notifications
You must be signed in to change notification settings - Fork 75
/
shopping.js
51 lines (41 loc) · 1.34 KB
/
shopping.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
'use strict';
const Ebay = require('../src/index');
const { clientId } = require('./credentials/index');
let ebay = new Ebay({
clientID: clientId,
});
ebay.getAllCategories('1234').then((data) => {
console.log(data); //extract data.CategoryArray
}, (error) => {
console.log(error);
});
// // Get User Profile
// // https://developer.ebay.com/devzone/shopping/docs/callref/GetUserProfile.html
ebay.getUserDetails({ userId: 'ajaykumapratha_0', includeSelector: 'Details' }).then((data) => {
console.log(data);
}, (error) => {
console.log(error);
});
// Get Item Status
// https://developer.ebay.com/devzone/shopping/docs/callref/GetItemStatus.html
ebay.getItemStatus(['153265274986', '153265274986']).then((data) => {
console.log(data);
}, (error) => {
console.log(error);
});
// https://developer.ebay.com/devzone/shopping/docs/callref/GetShippingCosts.html
ebay.getShippingCosts({
itemId: '153265274986', destinationCountryCode: 'US',
destinationPostalCode: '95128'
}).then((data) => {
console.log(data);
}, (error) => {
console.log(error);
});
//https://developer.ebay.com/devzone/shopping/docs/callref/getsingleitem.html
ebay.getSingleItem('153265274986').then((data) => {
console.log(data);
});
ebay.getMultipleItems({ itemId: ['153265274986', '153265274986'] }).then((data) => {
console.log(data);
});