Skip to content

Fix API reference examples to use correct camelCase properties#1917

Merged
ryanio merged 1 commit intomainfrom
fix/api-reference-camelcase
Feb 25, 2026
Merged

Fix API reference examples to use correct camelCase properties#1917
ryanio merged 1 commit intomainfrom
fix/api-reference-camelcase

Conversation

@ryanio
Copy link
Collaborator

@ryanio ryanio commented Feb 25, 2026

Summary

  • Fixes API reference doc examples that incorrectly used snake_case for properties that the SDK converts to camelCase
  • Only corrects the 3 fields that actually have converters: collection.totalSupply, account.profileImageUrl, token.usdPrice
  • Leaves snake_case properties alone where the SDK returns raw API responses without conversion (nft.image_url, contract.contract_standard, stats.total.floor_price, event.event_timestamp)

Built on top of #1911 by @pineapplepeak — refined to only fix fields that actually have camelCase converters in the SDK. The original PR proposed 7 changes, but 4 of them would have been incorrect since those types have no snake_case → camelCase converter.

Test plan

  • Verified each type definition and converter in src/types.ts, src/api/types.ts, and src/utils/converters.ts
  • Type checks pass

🤖 Generated with Claude Code

Only three fields actually have camelCase converters in the SDK:
- collection.totalSupply (via collectionFromJSON)
- account.profileImageUrl (via accountFromJSON)
- token.usdPrice (via paymentTokenFromJSON)

Other fields (nft.image_url, contract.contract_standard, stats.total.floor_price,
event.event_timestamp) are returned as-is from the API without conversion.

Based on #1911 by @pineapplepeak — corrected to only fix the fields that
actually have camelCase converters.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ryanio ryanio merged commit ac882fb into main Feb 25, 2026
8 checks passed
@ryanio ryanio deleted the fix/api-reference-camelcase branch February 25, 2026 21:17
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