2.3.3 • Published 4 years ago
@haven/contentful v2.3.3
Haven Contentful Custom Client
Automatically flattens the contentful response to consolidate fields and sys recursively.
Usage
Usage is the same as contentful. The difference is the response you get back from getEntries and getEntry.
{
sys: {
id: '...',
contentType: {
sys: {
id: '...'
}
}
},
fields: {
title: '...'
},
metadata: {
...
}
}{
id: '...'
contentType: '...',
title: '...',
metadata: {
...
}
}Assets get flattened to a single object:
{
id: "...",
contentType: "image/png",
description: "",
fileName: "...",
height: 585,
size: 725715,
title: "...",
url: "...",
width: 920
}