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

contential

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

contential - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

2

package.json
{
"name": "contential",
"version": "0.0.6",
"version": "0.0.7",
"description": "JavaScript client for Contential.",

@@ -5,0 +5,0 @@ "author": "Tom Andre",

@@ -36,2 +36,29 @@ import axios from 'axios';

async update({ regionId, spaceId, recordId, localeId, data, apiKey }) {
try {
const apiKeyId = apiKey || this.client.apiKey;
regionId = regionId || 'global';
const query = {
localeId,
};
const url = `${
this.client.config[regionId].CONTENT_URL
}/spaces/${spaceId}/records/${recordId}?${queryString.stringify(query)}`;
const contentType =
typeof data === 'object' ? 'application/json' : 'text/plain';
const response = await axios({
method: 'PUT',
url,
headers: {
'content-type': contentType,
'x-api-key': apiKeyId,
},
data,
});
return response.data;
} catch (error) {
throw error.response.data;
}
}
async get({ regionId, spaceId, recordId, localeId, apiKey }) {

@@ -38,0 +65,0 @@ try {

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