nascentdigital / contentfully

A simple but performant REST client for Contentful.
MIT License
18 stars 7 forks source link

CreatedAt and UpdatedAt to come back from Contentful in the response #11

Closed sofiamatulis closed 5 years ago

sofiamatulis commented 5 years ago

For TI, we need the datePublished and dateModified for entries.

From the docs, I noticed It comes from contentful as sys.createdAt and sys.updatedAt but I believe these are being stripped out.

Can we add them in?

sofiamatulis commented 5 years ago

@bernietrinh

kretzm commented 5 years ago

I've added a PR to include the sys.updatedAt. We won't need the sys.createdAt, I think we should use the publishDate, which is already sent across in the response. The reason why is that createdAt is when the content entry is first created, but only in draft mode, not set to 'publish'. publishDate is when the entry first gets published. I haven't yet hit a use case where we would need to differentiate between when the entry was created and when it was first published - I've only ever needed to know when the entry was published. If that changes, then we could expose the sys.createdAt.