Skip to content

fix(api): align core cli requests with sure#5

Open
JSONbored wants to merge 1 commit into
we-promise:mainfrom
JSONbored:codex/feat-cli-api-compat
Open

fix(api): align core cli requests with sure#5
JSONbored wants to merge 1 commit into
we-promise:mainfrom
JSONbored:codex/feat-cli-api-compat

Conversation

@JSONbored
Copy link
Copy Markdown

Summary

  • Align core request behavior with the current Sure API contract.

What changed

  • Uses GET /api/v1/accounts/{id} for accounts show.
  • Maps transaction and trade filters to current API parameter names while keeping practical legacy aliases.
  • Adds client PATCH support and updates transaction updates to use PATCH.
  • Escapes path parameters for changed show/update routes.
  • Updates README examples and removes the stale account-show limitation note.

Why

  • The CLI had drifted from the merged Sure API surface, especially around account show, filters, and update verbs.

Validation

  • go test -count=1 ./...
  • go test -race ./...
  • go vet ./...
  • tools/validate-samples.sh
  • git diff --check
  • gitleaks detect --no-git --redact --source . --verbose

Notes

  • Draft for review. No live Sure smoke test was run because local credentials/test data were not used.

Use the current account show endpoint, current transaction and trade filters, and PATCH for transaction updates. Fix the root binary ignore rule and update README examples for the current auth and request shape.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Warning

Rate limit exceeded

@JSONbored has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 59 minutes and 30 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 479e961c-fa95-40b9-a6bd-07af5ec11889

📥 Commits

Reviewing files that changed from the base of the PR and between 48830d1 and ff346d1.

📒 Files selected for processing (10)
  • .gitignore
  • README.md
  • cmd/sure-cli/root/accounts_cmd.go
  • cmd/sure-cli/root/trades_cmd.go
  • cmd/sure-cli/root/trades_cmd_test.go
  • cmd/sure-cli/root/transactions_cmd.go
  • cmd/sure-cli/root/transactions_cmd_test.go
  • cmd/sure-cli/root/transactions_update_cmd.go
  • internal/api/client.go
  • internal/api/client_test.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@JSONbored JSONbored marked this pull request as ready for review May 7, 2026 06:30
@superagent-security superagent-security Bot added contributor:verified Contributor passed trust analysis. pr:verified PR passed security analysis. labels May 7, 2026
@jjmata jjmata requested a review from dgilperez May 13, 2026 16:31
@jjmata
Copy link
Copy Markdown
Contributor

jjmata commented May 13, 2026

Hey @dgilperez ... can Wolfgang review these and the rest of what @JSONbored just submitted? 🤖

@jjmata jjmata assigned jjmata and JSONbored and unassigned jjmata May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor:verified Contributor passed trust analysis. pr:verified PR passed security analysis.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants