Skip to content

Conversation

@cacrespo
Copy link
Owner

@cacrespo cacrespo commented Dec 23, 2025

closes #53

Article API Endpoints

This PR introduces the initial implementation of the Article API, which supports listing and creating articles.

Available operations

  • List all articles
  • Create a new article

GET - List all articles

curl http://localhost:8000/api/v1/articles/

POST - Create a new article

⚠️ Note

The POST method is currently only available from the browser.
Requests from the terminal (e.g., curl) are not supported due to the current authentication and CSRF configuration.

Example request payload:

{
"title": "Test Article",
"author": "Test Author",
"comment": "This is a test comment.",
"link": "https://example.com"
}

- Moves the article API endpoint from /blog/api/v1/ to /api/v1/articles/.
- Creates a new  in the  app to separate API URLs from web URLs.
- Updates the main  to include the new API URLs.
- Adds a docstring to the  to document the endpoint's functionality.
@cacrespo cacrespo merged commit 7e90368 into main Dec 26, 2025
1 check passed
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.

Implement REST API endpoints to post and read articles

2 participants