Charity Fund - API-service to collect funds on charity projects.
- Clone repository:
git clone git@github.com:MikeWazowskyi/cat_charity_fund.git
cd cat_charity_fund
- Create .env file using .env_example:
.env_example
-
In Docker container + GNU make:
make start
-
Linux/macOS
chmod +x run.sh ./run.sh
-
Windows OS
run.bat
Request:
Content-Type: application/json
{
"name": "New project",
"description": "New project description",
"full_amount": 10000
}
Response:
{
"name": "New project",
"description": "New project description",
"full_amount": 10000,
"id": 1,
"invested_amount": 0,
"fully_invested": false,
"create_date": "2023-08-24T14:15:22Z",
"close_date": "2023-08-24T14:15:22Z"
}
Content-Type: application/json
Response:
[
{
"name": "New project",
"description": "New project description",
"full_amount": 10000,
"id": 1,
"invested_amount": 0,
"fully_invested": false,
"create_date": "2023-08-24T14:15:22Z",
"close_date": "2023-08-24T14:15:22Z"
}
]
Content-Type: application/json
Response:
[
{
"name": "New project",
"description": "New project description",
"full_amount": 10000,
"id": 1,
"invested_amount": 0,
"fully_invested": false,
"create_date": "2023-08-24T14:15:22Z",
"close_date": "2023-08-24T14:15:22Z"
}
]
Content-Type: application/json
Request:
Editable fields:
- name
- description
- full_amount
{
"name": "Updated new project",
"description": "Updated new project description",
"full_amount": 10000 0
}
Response:
[
{
"name": "Updated new project",
"description": "Updated new project description",
"full_amount": 100000,
"id": 1,
"invested_amount": 0,
"fully_invested": false,
"create_date": "2023-08-24T14:15:22Z",
"close_date": "2023-08-24T14:15:22Z"
}
]
Request:
Optional fields:
- comment
Content-Type: application/json
{
"comment": "New donation",
"full_amount": 10000
}
Response:
{
"full_amount": 10000,
"comment": "New donation",
"id": 1,
"create_date": "2023-08-24T14:15:22Z"
}
Content-Type: application/json
Response:
[
{
"full_amount": 1000,
"comment": "New donation",
"id": 1,
"create_date": "2023-08-24T14:15:22Z",
"user_id": 1,
"invested_amount": 0,
"fully_invested": false,
"close_date": "2023-08-24T14:15:22Z"
}
]
Content-Type: application/json
Response:
[
{
"full_amount": 1000,
"comment": "New comment",
"id": 1,
"create_date": "2023-08-24T14:15:22Z"
}
]
http://<host>:<port>/docs