UNPKG

r6-data.js

Version:

Rainbow Six Siege API wrapper for player's stats, maps, operators, ranks, seasons, charms etc. Last updated Y10S3

22 lines (16 loc) 601 B
const axiosInstance = require('../axiosInstance/axiosInstance'); const buildUrlAndParams = require('./util'); async function getUniversalSkins({ name } = {}) { try { const url = buildUrlAndParams('/universalSkins', { name }); const response = await axiosInstance.get(url); return response.data; } catch (error) { console.error('Error during the getUniversalSkins request:', error.message); if (error.response && error.response.status === 401) { throw new Error('request error'); } throw error; } } module.exports = getUniversalSkins;