const axios = require('../../axios');

/**
 * @param {string} host
 * @param {string} productId
 * @param {string} token
 * @returns {Promise<*>}
 */
function getProductInfo(host, productId, token) {
  return axios.get(`https://api.${host}/v2/products/${productId}`, {
    headers: {
      Authorization: `Bearer ${token}`,
      'Content-Type': 'application/json',
    },
  });
}

module.exports = getProductInfo;
