UNPKG

n8n-nodes-dataforseo

Version:

DataForSEO is an SEO and marketing data provider, empowering businesses with invaluable insights via APIs and databases.

160 lines 9.14 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getProductsAdvnced = getProductsAdvnced; exports.getProductsHTML = getProductsHTML; exports.getSellersAdvnced = getSellersAdvnced; exports.getSellersHtml = getSellersHtml; exports.getProductSpecificationAdvnced = getProductSpecificationAdvnced; exports.getProductSpecificationHtml = getProductSpecificationHtml; exports.getProductInfo = getProductInfo; exports.getProductReviews = getProductReviews; const generalFunctions_1 = require("../../../functions/generalFunctions"); const dataForSeoRequest_1 = require("../../../functions/dataForSeoRequest"); async function getProductsAdvnced(ef, i) { const params = { url: '/merchant/google/products/task_post', body: [{ keyword: ef.getNodeParameter('keyword', i), url: ef.getNodeParameter('url', i) || null, priority: ef.getNodeParameter('priority', i) || null, location_name: ef.getNodeParameter('location_name', i), language_name: ef.getNodeParameter('language_name', i), location_coordinate: ef.getNodeParameter('location_coordinate', i) || null, se_domain: ef.getNodeParameter('se_domain', i) || null, depth: ef.getNodeParameter('depth', i) || null, max_crawl_pages: ef.getNodeParameter('max_crawl_pages', i) || null, search_param: ef.getNodeParameter('search_param', i) || null, price_min: ef.getNodeParameter('price_min', i) || null, price_max: ef.getNodeParameter('price_max', i) || null, sort_by: ef.getNodeParameter('sort_by', i) || null }] }; return (0, dataForSeoRequest_1.dataForSeoPOSTGETRequest)(ef, params, '/merchant/google/products/task_get/advanced/'); } async function getProductsHTML(ef, i) { const params = { url: '/merchant/google/products/task_post', body: [{ keyword: ef.getNodeParameter('keyword', i), url: ef.getNodeParameter('url', i) || null, priority: ef.getNodeParameter('priority', i) || null, location_name: ef.getNodeParameter('location_name', i), language_name: ef.getNodeParameter('language_name', i), location_coordinate: ef.getNodeParameter('location_coordinate', i) || null, se_domain: ef.getNodeParameter('se_domain', i) || null, depth: ef.getNodeParameter('depth', i) || null, max_crawl_pages: ef.getNodeParameter('max_crawl_pages', i) || null, search_param: ef.getNodeParameter('search_param', i) || null, price_min: ef.getNodeParameter('price_min', i) || null, price_max: ef.getNodeParameter('price_max', i) || null, sort_by: ef.getNodeParameter('sort_by', i) || null }] }; return (0, dataForSeoRequest_1.dataForSeoPOSTGETRequest)(ef, params, '/merchant/google/products/task_get/html/'); } async function getSellersAdvnced(ef, i) { const specifications = ef.getNodeParameter('additional_specifications', i); const parsedSpecifications = (0, generalFunctions_1.parseSpecifications)(specifications); const params = { url: '/merchant/google/sellers/task_post', body: [{ product_id: ef.getNodeParameter('product_id', i) || null, data_docid: ef.getNodeParameter('data_docid', i) || null, priority: ef.getNodeParameter('priority', i) || null, location_name: ef.getNodeParameter('location_name', i), language_name: ef.getNodeParameter('language_name', i), location_coordinate: ef.getNodeParameter('location_coordinate', i) || null, se_domain: ef.getNodeParameter('se_domain', i) || null, get_shops_on_google: ef.getNodeParameter('get_shops_on_google', i), additional_specifications: parsedSpecifications }] }; return (0, dataForSeoRequest_1.dataForSeoPOSTGETRequest)(ef, params, '/merchant/google/sellers/task_get/advanced/'); } async function getSellersHtml(ef, i) { const specifications = ef.getNodeParameter('additional_specifications', i); const parsedSpecifications = (0, generalFunctions_1.parseSpecifications)(specifications); const params = { url: '/merchant/google/sellers/task_post', body: [{ product_id: ef.getNodeParameter('product_id', i) || null, data_docid: ef.getNodeParameter('data_docid', i) || null, priority: ef.getNodeParameter('priority', i) || null, location_name: ef.getNodeParameter('location_name', i), language_name: ef.getNodeParameter('language_name', i), location_coordinate: ef.getNodeParameter('location_coordinate', i) || null, se_domain: ef.getNodeParameter('se_domain', i) || null, get_shops_on_google: ef.getNodeParameter('get_shops_on_google', i), additional_specifications: parsedSpecifications }] }; return (0, dataForSeoRequest_1.dataForSeoPOSTGETRequest)(ef, params, '/merchant/google/sellers/task_get/html/'); } async function getProductSpecificationAdvnced(ef, i) { const specifications = ef.getNodeParameter('additional_specifications', i); const parsedSpecifications = (0, generalFunctions_1.parseSpecifications)(specifications); const params = { url: '/merchant/google/product_spec/task_post', body: [{ product_id: ef.getNodeParameter('product_id', i) || null, data_docid: ef.getNodeParameter('data_docid', i) || null, priority: ef.getNodeParameter('priority', i) || null, location_name: ef.getNodeParameter('location_name', i), language_name: ef.getNodeParameter('language_name', i), location_coordinate: ef.getNodeParameter('location_coordinate', i) || null, se_domain: ef.getNodeParameter('se_domain', i) || null, additional_specifications: parsedSpecifications }] }; return (0, dataForSeoRequest_1.dataForSeoPOSTGETRequest)(ef, params, '/merchant/google/product_spec/task_get/advanced/'); } async function getProductSpecificationHtml(ef, i) { const specifications = ef.getNodeParameter('additional_specifications', i); const parsedSpecifications = (0, generalFunctions_1.parseSpecifications)(specifications); const params = { url: '/merchant/google/product_spec/task_post', body: [{ product_id: ef.getNodeParameter('product_id', i) || null, data_docid: ef.getNodeParameter('data_docid', i) || null, priority: ef.getNodeParameter('priority', i) || null, location_name: ef.getNodeParameter('location_name', i), language_name: ef.getNodeParameter('language_name', i), location_coordinate: ef.getNodeParameter('location_coordinate', i) || null, se_domain: ef.getNodeParameter('se_domain', i) || null, additional_specifications: parsedSpecifications }] }; return (0, dataForSeoRequest_1.dataForSeoPOSTGETRequest)(ef, params, '/merchant/google/product_spec/task_get/html/'); } async function getProductInfo(ef, i) { const params = { url: '/merchant/google/product_info/task_post', body: [{ product_id: ef.getNodeParameter('product_id', i) || null, data_docid: ef.getNodeParameter('data_docid', i) || null, priority: ef.getNodeParameter('priority', i) || null, location_name: ef.getNodeParameter('location_name', i), language_name: ef.getNodeParameter('language_name', i), location_coordinate: ef.getNodeParameter('location_coordinate', i) || null, se_domain: ef.getNodeParameter('se_domain', i) || null }] }; return (0, dataForSeoRequest_1.dataForSeoPOSTGETRequest)(ef, params, '/merchant/google/product_info/task_get/advanced/'); } async function getProductReviews(ef, i) { const params = { url: '/merchant/google/reviews/task_post', body: [{ product_id: ef.getNodeParameter('product_id', i) || null, data_docid: ef.getNodeParameter('data_docid', i) || null, priority: ef.getNodeParameter('priority', i) || null, location_name: ef.getNodeParameter('location_name', i), language_name: ef.getNodeParameter('language_name', i), location_coordinate: ef.getNodeParameter('location_coordinate', i) || null, se_domain: ef.getNodeParameter('se_domain', i) || null, depth: ef.getNodeParameter('depth_reviews', i) || null }] }; return (0, dataForSeoRequest_1.dataForSeoPOSTGETRequest)(ef, params, '/merchant/google/reviews/task_get/advanced/'); } //# sourceMappingURL=google_shopping.js.map