klaviyo / klaviyo-node-sdk

Node SDK for developers to use Klaviyo's Public API
https://developers.klaviyo.com/
14 stars 2 forks source link

Standardize opts #5

Closed elkelk closed 1 year ago

elkelk commented 2 years ago

Currently when passing the opts into any of these methods there is no clarity of documentation or standards around the necessary keys to pass in. For example when digging into the code TrackIdentify.identifyPost requires a data: key to be present at the top level of opts while ListsSegments.subscribe requires a body: key to be present.

These keys should be standardized and added to the documentation. The necessary top level payload key should be constructed in the library dynamically based on the required keys.

jon-batscha commented 2 years ago

Hey, thanks for reaching out!

You are 100% correct that these endpoints (and others) need to be standardized. With that said, I am happy to share that we are in the process of completely revamping our API to address these kind of issues, as well as add new functionality.

If you’re interested in getting access to the Alpha release of our API, please reach out to our team here: developers@klaviyo.com . You can also sign up for our developer newsletter in the footer of our developer site: developers.klaviyo.com

Please feel free to reach out with any additional suggestions. The quality of our APIs and SDKs is a core focus for us, and your feedback is a key component of that. Cheers!

Ian-Montgomery-Klaviyo commented 1 year ago

Our new API is out along with its corresponding SDK.

If you need help migrating, read our Migrating from V1/V2 to the new Klaviyo APIs and Comparison between v1/v2 and new APIs or check out the github repo above.