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

contentful

Package Overview
Dependencies
Maintainers
3
Versions
452
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

contentful - npm Package Compare versions

Comparing version 10.12.7 to 10.12.8

41

ADVANCED.md

@@ -160,2 +160,43 @@ <!-- shared header START -->

### Links to other spaces
As they are part of another space, resolving cross-space linked entities requires a special header to be passed named `x-contentful-resource-resolution`.
To be able to create this header, you need to follow the instructions in this [subsection of our documentation](https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/resource-links:~:text=Extra%20header%20for%20cross%2Dspace%20resolution)
Once you created the Base64 encoded token, you can pass the new header to your client as part of the `headers` option.
When calling the `getEntries` method, The resolved cross space links will be available under the `Entry` array in the `includes` part of the response.
#### Example
```ts
import { createClient } from 'contentful'
const client = createClient({
accessToken: '<you-access-token>',
space: '<your-space-id>',
environment: '<your-environment-id>',
headers: {
'x-contentful-resource-resolution': '<your-base64-generated-header>'
}
})
// getting all Entries
client
.getEntries()
.then((response) => {
// You should find the linked entries in the includes.Entry array
console.log(response.includes.Entry)
})
.catch((err) => console.log(err))
// filtering on one entry
client
.getEntries({ 'sys.id': '<entry-id>' })
.then((response) => {
// You should find the linked entries in the includes.Entry array
console.log(response.includes.Entry)
})
.catch((err) => console.log(err))
```
## Sync

@@ -162,0 +203,0 @@

2

package.json
{
"name": "contentful",
"description": "Client for Contentful's Content Delivery API",
"version": "10.12.7",
"version": "10.12.8",
"homepage": "https://www.contentful.com/developers/documentation/content-delivery-api/",

@@ -6,0 +6,0 @@ "main": "./dist/contentful.node.min.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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