{"id":27613786,"url":"https://github.com/zulusssss/api_final_yatube","last_synced_at":"2025-04-23T02:20:02.486Z","repository":{"id":163008810,"uuid":"599150198","full_name":"Zulusssss/api_final_yatube","owner":"Zulusssss","description":"api final yatube","archived":false,"fork":false,"pushed_at":"2023-12-20T17:00:05.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-12-20T18:23:22.253Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Zulusssss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-02-08T14:59:31.000Z","updated_at":"2023-12-20T18:23:26.034Z","dependencies_parsed_at":"2023-12-20T18:23:25.634Z","dependency_job_id":"18ff938f-d195-4be7-9df1-37a564c37b59","html_url":"https://github.com/Zulusssss/api_final_yatube","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zulusssss%2Fapi_final_yatube","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zulusssss%2Fapi_final_yatube/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zulusssss%2Fapi_final_yatube/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zulusssss%2Fapi_final_yatube/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zulusssss","download_url":"https://codeload.github.com/Zulusssss/api_final_yatube/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250354722,"owners_count":21416779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-23T02:20:01.870Z","updated_at":"2025-04-23T02:20:02.469Z","avatar_url":"https://github.com/Zulusssss.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API for \"Yatube\"\n\n## Tecnhologies\n\n- Python 3.9.10\n- Django 3.2.16\n- djangorestframework 3.12.4\n- SQLite3\n\n## Description\n\nThe REST API for the \"Yatube\" project.\nImplemented API functionality for the project https://github.com/Zulusssss/hw05_final.\n\n## Functional\n\n- Subscription and unsubscription from an authorized user;\n- An authorized user views posts, creates new ones deletes and modifies them;\n- View communities;\n- Commenting, viewing, deleting and updating comments;\n- Filtering by fields;\n- Authentication using a JWT token.\n\n## Installation\n\n1. Clone a repository:\n\n   ```python\n   git clone git@github.com:Zulusssss/api_final_yatube.git\n   ```\n\n2. Go to the project folder:\n\n   ```python\n   cd api_final_yatube/\n   ```\n\n3. Install a virtual environment for the project:\n\n   ```python\n   python -m venv venv\n   ```\n\n4. Activate the virtual environment for the project:\n\n   ```python\n   # for OS Linux and macOS\n   source venv/bin/activate\n\n   # for OS Windows\n   source venv/Scripts/activate\n   ```\n\n5. Install dependencies:\n\n   ```python\n   python3 -m pip install --upgrade pip\n   pip install -r requirements.txt\n   ```\n\n6. Perform migrations at the project level:\n\n   ```python\n   cd yatube\n   python3 manage.py makemigrations\n   python3 manage.py migrate\n   ```\n\n7. Fill in the env-file like it\n   ```text\n   SECRET_KEY=\u003cYour_some_long_string\u003e\n   DEBUG=False\n   ```\n\n8. Run the project:\n\n   `python manage.py runserver`\n\n## Request examples\n\nGetting a token\n\nSend a POST request to the address `api/v1/jwt/create/` и передать 2 поля в `data`:\n\n1. `username`\n2. `password`\n\nCreating a post\n\nSend a POST request to the address `api/v1/posts/` and pass the required `text` field, specify `Authorization` in the header:`Bearer \u003ctoken\u003e`.\n\n1. Request example:\n\n   ```json\n   {\n     \"text\": \"My first post.\"\n   }\n   ```\n\n2. Response example:\n\n   ```json\n   {\n     \"id\": 2,\n     \"author\": \"user1\",\n     \"text\": \"My first post.\",\n     \"pub_date\": \"2022-05-22T13:00:32.021094Z\",\n     \"image\": null,\n     \"group\": null\n   }\n   ```\n\nCommenting on a user's post\n\nSend a POST request to the address `api/v1/posts/{post_id}/comments/` and pass the required fields `post` and `text`, specify `Authorization` in the header:`Bearer \u003ctoken\u003e`.\n\n1. Request example:\n\n   ```json\n   {\n     \"post\": 1,\n     \"text\": \"Test\"\n   }\n   ```\n\n2. Response example:\n\n   ```json\n   {\n     \"id\": 1,\n     \"author\": \"user1\",\n     \"text\": \"Test\",\n     \"created\": \"2022-04-22T12:06:13.146875Z\",\n     \"post\": 1\n   }\n   ```\n\n## Resources\n\n```python\n# Project documentation\nhttp://127.0.0.1:8000/redoc/\n```\n\n```python\n# API testing software, Postman\nhttps://www.postman.com/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzulusssss%2Fapi_final_yatube","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzulusssss%2Fapi_final_yatube","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzulusssss%2Fapi_final_yatube/lists"}