Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@radio-retail/api-client

Package Overview
Dependencies
Maintainers
2
Versions
217
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@radio-retail/api-client - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

36

dist/routes/clients.js

@@ -8,3 +8,7 @@ const getData = require('../utils/get-raw-data');

module.exports = function (instance) {
return { ...crud(instance, baseRoute),
return {
// Clients
createClient(data, config = {}) {
return instance.post(baseRoute, data, config).then(getData(config.raw));
},

@@ -28,2 +32,8 @@ getClients(params, config = {}) {

searchClients(params, config = {}) {
return instance.get(`${baseRoute}/search`, {
params
}).then(getData(config.raw));
},
toggleActiveState(clientId, active, config = {}) {

@@ -33,2 +43,3 @@ return instance.post(`${baseRoute}/${clientId}/${active ? 'deactivate' : 'activate'}`, config).then(getData(config.raw));

// Accounts
getAccountsForClient(clientId = '', config = {}) {

@@ -38,2 +49,14 @@ return instance.get(`${baseRoute}/${clientId}/accounts`).then(getData(config.raw));

getAccountById(clientId, accountId) {
return instance.get(`${baseRoute}/${clientId}/accounts/${accountId}`).then(res => {
res.data.data.ifMatch = res.headers.etag;
return res.data.data;
});
},
deleteAccount(clientId, accountId) {
return instance.delete(`${baseRoute}/${clientId}/accounts/${accountId}`);
},
// Sites
getSitesForClient(clientId = '', accountId = '', config = {}) {

@@ -43,14 +66,7 @@ return instance.get(`${baseRoute}/${clientId}/accounts/${accountId}/sites`).then(getData(config.raw));

createClient(data, config = {}) {
return instance.post(baseRoute, data, config).then(getData(config.raw));
},
// General
...crud(instance, baseRoute),
getLanguages(config = {}) {
return instance.get(`${baseRoute}/languages`, config).then(getData(config.raw));
},
searchClients(params, config = {}) {
return instance.get(`${baseRoute}/search`, {
params
}).then(getData(config.raw));
}

@@ -57,0 +73,0 @@

{
"name": "@radio-retail/api-client",
"description": "Radio Retail API client",
"version": "1.0.3",
"version": "1.0.4",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc