Skip to content

docs: fix README example snippets#113

Open
LocNguyenSGU wants to merge 2 commits intoklaviyo:mainfrom
LocNguyenSGU:fix/issue-111-readme-examples
Open

docs: fix README example snippets#113
LocNguyenSGU wants to merge 2 commits intoklaviyo:mainfrom
LocNguyenSGU:fix/issue-111-readme-examples

Conversation

@LocNguyenSGU
Copy link
Copy Markdown

Summary

Fix several README example issues that can break first-time onboarding.

Reproduction

The README included example snippets with a missing comma, an incorrect API class name, an incomplete catch(...) chain, and a malformed fenced code block terminator.

Analysis

The generated SDK exports ImagesApi, but one README example mixed ImageApi and ImagesApi. The same section also had an incomplete promise chain. Separately, the createProfile example had invalid object syntax as shown, and the organizational helpers example closed with four backticks.

Patch Summary

  • fix the createProfile example syntax/indentation
  • fix the organizational helpers fenced code block terminator
  • change the image upload example to consistently use ImagesApi
  • add the missing ); in the image upload catch(...) chain
  • add a regression test for the corrected README examples

Risks

Low. The change is limited to documentation snippets and a lightweight README validation test.

Test Coverage

  • added tests/check-readme-examples.js
  • confirmed it fails before the README fix and passes after the fix

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Comment thread tests/check-readme-examples.js Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant