Open tobya opened 1 month ago
Thanks for filing a PR @tobya
What you think is missed to remove Draft status?
However I'll manage to check it only at the end of next week.
I think most of the basic changes are there. I would like someone else to test it a little :)
I have only used it for my requirements so there may be stuff missed.
Webflow support replied to me in reference to the sitepublish issue so I'll test out that fix and push.
@wivern-co-uk I'm using this now in my own code to connect via Webflow Api V2 and it seems to be working fine. So it can probably be merged.
Any additional testing by you or other users would be good.
Any additional testing by you or other users would be good.
Sounds good, I'll let you know once there is a feedback on testing.
This seems to be working fine on my project on v2 so you can merge it if you wish to see if anyone else is looking for v2 support.
This is a first go at a V2 upgrade of the library. @wivern-co-uk
This is the basic changes I needed to make to ensure that the V2 api works with my code. There may be things in the existing code that are broken that I have missed as my code doesnt touch them.
I have put some comments in the code on things that I am looking for feedback on (feedback on anything else is also welcomed)
18
Updates
Basically I have made the following updates
_draft
toisDraft
fields
changed tofieldData
publishItem
which allows a collection item to be published rather than entire site.Issues
now the structure is
Setup
In order to use the V2 library you simply need to go to webflow and generate a new V2 api key and use that.
User will need to make some changes to their own code in structure and field names.
Changes
Some notes on what moving to V2 means for people with codebases. These are notes based on my experience and probably not comprehensive.
https://docs.developers.webflow.com/data/changelog/webflow-api-changed-endpoints
Field Names
_
has been changed.fieldData
property.Methods
Retrieving Items
now return a differnt structure. Meta data is at the top level and the fields are one level below in a
fieldData
property. This will require changes to client code.Publish Site
Publish site used to require that you passed an array containing a sub array 'domains' this has now changed and it just requires the user to pass a list of domain strings or domain ids
Publish Item
This is a new api end point for V2 and allows items in collections to be published without publishing the entire site.