Skip to content

Fix Reddit comment API payload#14

Open
iloveyamlfries wants to merge 1 commit into
public-clis:mainfrom
iloveyamlfries:fix-comment-api-payload
Open

Fix Reddit comment API payload#14
iloveyamlfries wants to merge 1 commit into
public-clis:mainfrom
iloveyamlfries:fix-comment-api-payload

Conversation

@iloveyamlfries

Copy link
Copy Markdown

Summary

  • send comments to /api/comment with Reddit's expected api_type=json, thing_id, and text payload
  • raise on Reddit json.errors responses so failed comments do not print false success
  • make unresolved cached indexes fail with a nonzero Click error instead of returning silently

Verification

  • .venv/bin/python -m pytest
  • .venv/bin/python -m ruff check .

Manual validation

  • Compared the CLI payload with a Chrome DevTools capture of Reddit's /api/comment request shape
  • Verified a real public rdt comment call succeeds after the fix

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