ebay-api
Version:
eBay API for Node and Browser
51 lines (50 loc) • 1.64 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const index_js_1 = __importDefault(require("../../index.js"));
/**
* The Marketing API retrieves eBay products based on a metric, such as Best Selling, as well as products that were
* also bought and also viewed.
*/
class Marketing extends index_js_1.default {
get basePath() {
return '/buy/marketing/v1_beta';
}
//
// Marketing
// Client Credentials: https://api.ebay.com/oauth/api_scope/buy.marketing
//
/**
* This call returns products that were also bought when shoppers bought the product specified in the request.
* @param params
*/
getAlsoBoughtByProduct(params) {
return this.get(`/merchandised_product/get_also_bought_products`, {
params
});
}
/**
* This call returns products that were also viewed when shoppers viewed the product specified in the request.
*
* @param params
*/
getAlsoViewedByProduct(params) {
return this.get(`/merchandised_product/get_also_viewed_products`, {
params
});
}
/**
* This call returns an array of products based on the category and metric specified.
*
* @param params
*/
getMerchandisedProducts(params) {
return this.get(`/merchandised_product`, {
params
});
}
}
exports.default = Marketing;
Marketing.id = 'Marketing';