Skip to content

fix(#250): use correct API endpoint for publish_article#251

Merged
drillan merged 2 commits into
mainfrom
fix/250-publish-article-endpoint
Jan 31, 2026
Merged

fix(#250): use correct API endpoint for publish_article#251
drillan merged 2 commits into
mainfrom
fix/250-publish-article-endpoint

Conversation

@drillan

@drillan drillan commented Jan 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace non-existent POST /v3/notes/{id}/publish endpoint with correct PUT /v1/text_notes/{numeric_id}
  • Add _resolve_numeric_note_id call to convert article key to numeric ID
  • Fetch published article via get_article_via_api since PUT returns minimal response
  • Update integration test to verify new API flow

Test plan

  • Unit tests pass (uv run pytest tests/integration/test_article_operations.py::TestPublishArticle -v)
  • All tests pass (uv run pytest -v)
  • Code quality checks pass (uv run ruff check && uv run mypy .)
  • E2E verification with actual note.com account (optional)

Closes #250

🤖 Generated with Claude Code

drillan and others added 2 commits January 31, 2026 20:45
Replace non-existent POST /v3/notes/{id}/publish with PUT /v1/text_notes/{numeric_id}.
The PUT endpoint returns minimal response, so fetch article via get_article_via_api.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…icle

- Add early numeric ID validation to prevent data inconsistency
- Validate PUT response for logical API failures
- Add tests for error handling scenarios
- Improve test docstrings

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@drillan drillan merged commit 27c98d0 into main Jan 31, 2026
2 checks passed
@drillan drillan deleted the fix/250-publish-article-endpoint branch January 31, 2026 14:22
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.

fix: publish_article uses incorrect API endpoint

1 participant