@radio-retail/api-client
Advanced tools
Comparing version 1.0.11 to 1.0.12
@@ -57,7 +57,5 @@ const getData = require('../utils/get-raw-data'); | ||
getAccountById(clientId, accountId) { | ||
return instance.get(`${baseRoute}/${clientId}/accounts/${accountId}`).then(res => { | ||
res.data.data.ifMatch = res.headers.etag; | ||
return res.data.data; | ||
}); | ||
getAccountById(clientId, accountId, params, config = {}) { | ||
config.params = params; | ||
return instance.get(`${baseRoute}/${clientId}/accounts/${accountId}`, config).then(getData(config.raw)); | ||
}, | ||
@@ -73,2 +71,26 @@ | ||
// Divisions | ||
createDivison(clientId, accountId, data, config = {}) { | ||
return instance.post(`${baseRoute}/${clientId}/accounts/${accountId}/divisions`, data, config).then(getData(config.raw)); | ||
}, | ||
deleteDivision(clientId, accountId, divisionId) { | ||
return instance.delete(`${baseRoute}/${clientId}/accounts/${accountId}/divisions/${divisionId}`); | ||
}, | ||
getDivisions(params, config = {}) { | ||
config.params = params; | ||
return instance.get(`${baseRoute}/${clientId}/accounts/${accountId}/divisions`, config).then(getData(config.raw)); | ||
}, | ||
getDivisionById(clientId, accountId, divisionId, params, config = {}) { | ||
config.params = params; | ||
return instance.get(`${baseRoute}/${clientId}/accounts/${accountId}/divisions/${divisionId}`, config).then(getData(config.raw)); | ||
}, | ||
patchDivision(clientId, accountId, divisionId, params, config = {}) { | ||
config.params = params; | ||
return instance.patch(`${baseRoute}/${clientId}/accounts/${accountId}/divisions/${divisionId}`, config).then(getData(config.raw)); | ||
}, | ||
// Sites | ||
@@ -75,0 +97,0 @@ getSitesForClient(clientId = '', accountId = '', config = {}) { |
{ | ||
"name": "@radio-retail/api-client", | ||
"description": "Radio Retail API client", | ||
"version": "1.0.11", | ||
"version": "1.0.12", | ||
"main": "dist/index.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9753
237