All checks were successful
Build and Push to Private Registry101 / build (push) Successful in 10s
57 lines
1.0 KiB
Markdown
57 lines
1.0 KiB
Markdown
# Posts API
|
|
|
|
This is the Posts API project, a simple API for managing blog posts.
|
|
|
|
## Table of Contents
|
|
- [Installation](#installation)
|
|
- [Usage](#usage)
|
|
- [Endpoints](#endpoints)
|
|
- [Contributing](#contributing)
|
|
- [License](#license)
|
|
|
|
## Installation
|
|
|
|
1. Clone the repository:
|
|
```bash
|
|
git clone https://git.fairfaxmedia.net/posts-api/papi-py.git
|
|
```
|
|
2. Navigate to the project directory:
|
|
```bash
|
|
cd papi-py
|
|
```
|
|
3. Install the dependencies:
|
|
```bash
|
|
pip install -r requirements.txt
|
|
```
|
|
|
|
## Usage
|
|
|
|
To start the server, run:
|
|
```bash
|
|
python3 papi.py
|
|
```
|
|
|
|
## Endpoints
|
|
|
|
### GET /posts
|
|
Retrieve a list of all posts.
|
|
|
|
### POST /posts
|
|
Create a new post.
|
|
|
|
### GET /posts/{id}
|
|
Retrieve a specific post by ID.
|
|
|
|
### PUT /posts/{id}
|
|
Update a specific post by ID.
|
|
|
|
### DELETE /posts/{id}
|
|
Delete a specific post by ID.
|
|
|
|
## Contributing
|
|
|
|
Contributions are welcome! Please open an issue or submit a pull request.
|
|
|
|
## License
|
|
|
|
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. |