Socket
Socket
Sign inDemoInstall

contentful-management

Package Overview
Dependencies
Maintainers
5
Versions
578
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

contentful-management - npm Package Compare versions

Comparing version 0.7.0 to 0.7.1

38

index.js

@@ -133,3 +133,4 @@ 'use strict';

uri: uri,
body: options.body
body: options.body,
headers: options.headers
});

@@ -140,3 +141,4 @@ } else {

uri: uri,
body: options.body
body: options.body,
headers: options.headers
});

@@ -276,2 +278,8 @@ }

var contentTypeId = getId(contentType);
if(!contentTypeId) {
throw new PropError('Entry creation needs a content type id', {
contentType: contentType,
entry: entry
});
}
var path = creationPathForResource(this, 'Entry', entry);

@@ -287,2 +295,15 @@ return this.client.request(path, {

updateEntry: function(entry) {
var spaceId = getId(this);
var id = getId(entry);
var version = getVersion(entry);
return this.client.request('/spaces/' + spaceId + '/entries/' + id, {
method: 'PUT',
headers: {
'X-Contentful-Version': version
},
body: JSON.stringify(getData(entry))
}).then(_.partial(Entry.parse, this.client));
},
getEntry: function(id) {

@@ -305,15 +326,2 @@ return this.client.request('/spaces/' + this.sys.id + '/entries/' + id)

updateEntry: function(entry) {
var spaceId = getId(this);
var id = getId(entry);
var version = getVersion(entry);
return this.client.request('/spaces/' + spaceId + '/entries/' + id, {
method: 'PUT',
headers: {
'X-Contentful-Version': version
},
body: JSON.stringify(getData(entry))
}).then(_.partial(Entry.parse, this.client));
},
publishEntry: function(entry, publishVersion) {

@@ -320,0 +328,0 @@ var spaceId = getId(this);

{
"name": "contentful-management",
"description": "Client for Contentful's Content Management API",
"version": "0.7.0",
"version": "0.7.1",
"homepage": "https://www.contentful.com/developers/documentation/content-management-api/",

@@ -6,0 +6,0 @@ "main": "index.js",

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