{"id":19648305,"url":"https://github.com/wilsonkinyua/flash-cards","last_synced_at":"2026-06-13T00:32:03.452Z","repository":{"id":117122301,"uuid":"421005580","full_name":"WilsonKinyua/flash-cards","owner":"WilsonKinyua","description":"This is a REST API for flash cards. It is a simple, fast and easy way to create, edit and delete flash cards. It is also a way to share your flash cards with other people.","archived":false,"fork":false,"pushed_at":"2021-10-26T21:13:36.000Z","size":334,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-27T00:42:42.961Z","etag":null,"topics":["django-rest-framework","python","rest-api"],"latest_commit_sha":null,"homepage":"https://flash-cards-rest-api.herokuapp.com/api/notes/","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/WilsonKinyua.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-25T12:00:55.000Z","updated_at":"2021-10-26T21:08:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"0c8e52f3-7db3-4041-97c2-62a4394ff113","html_url":"https://github.com/WilsonKinyua/flash-cards","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/WilsonKinyua/flash-cards","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WilsonKinyua%2Fflash-cards","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WilsonKinyua%2Fflash-cards/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WilsonKinyua%2Fflash-cards/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WilsonKinyua%2Fflash-cards/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WilsonKinyua","download_url":"https://codeload.github.com/WilsonKinyua/flash-cards/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WilsonKinyua%2Fflash-cards/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34268187,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["django-rest-framework","python","rest-api"],"created_at":"2024-11-11T14:47:53.207Z","updated_at":"2026-06-13T00:32:03.423Z","avatar_url":"https://github.com/WilsonKinyua.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flash cards 😃 REST API Documentation\n\n\u003c!-- #### Created By Wilson Kinyua Muthoni on 26-10-2021 - 0717255460 --\u003e\n\nThis is a REST API for flash cards. It is a simple, fast and easy way to create, edit and delete flash cards. It is also a way to share your flash cards with other people.\n\nThe entire application is built on django REST framework. It is a powerful framework that allows you to create RESTful APIs in a very simple way.\n\nIt also contains a simple user authentication system. It is very easy to use and very secure.\n\n## Setup Requirements\n\n    - Git\n    - Python 3.8\n    - Django 3.2\n    - Django REST framework 3.12\n    - PostgreSQL\n    - Postman\n    - Cloudinary\n         - CLOUD_NAME\n         - API_KEY\n         - API_SECRET\n\n    - Heroku cli (if you want to deploy to Heroku)\n\n## Setup Installation\n\n    - Clone the repository\n    - Run the following commands in the terminal:\n        - cd \u003cpath_to_project\u003e (if you cloned the repository)\n        - virtualenv env\n        - source env/bin/activate\n        - pip install -r requirements.txt\n        - cp .env.example .env\n        - python manage.py makemigrations\n        - python manage.py migrate\n        - python manage.py runserver\n    - Open Postman to test the API endpoints or use the following link:\n        - http://localhost:8000/api/\u003cthe_endpoint\u003e\n\n# REST API\n\nThe REST API to the flashcards app is described below.\n\n## Get list of Subjects\n\n### Request\n\n`GET /api/subjects/`\n\n    curl -i -H 'Accept: application/json' http://127.0.0.1:8000/api/subjects/\n\n### Response\n\n    HTTP 200 OK\n    Allow: GET, POST, HEAD, OPTIONS\n    Content-Type: application/json\n    Vary: Accept\n\n    [\n        {\n        \"id\": 4,\n        \"name\": \"science\",\n        \"created_at\": \"2021-10-26T15:20:29.583538+03:00\",\n        \"updated_at\": \"2021-10-26T15:20:29.583559+03:00\"\n       },\n    ]\n\n## Create a new Subject\n\n### Request\n\n`POST /api/subjects/`\n\n    curl -i -H 'Accept: application/json' -d 'name=chemistry' http://127.0.0.1:8000/api/subjects/\n\n### Response\n\n    HTTP/1.1 201 Created\n    Date: Thu, 26 Oct 2021 12:36:30 GMT\n    Status: 201 Created\n    Connection: close\n    Content-Type: application/json\n    Location: /thing/1\n    Content-Length: 36\n\n    {\n        \"id\": 7,\n        \"name\": \"chemistry\",\n        \"created_at\": \"2021-10-26T20:22:05.483774+03:00\",\n        \"updated_at\": \"2021-10-26T20:22:05.483800+03:00\"\n    }\n\n## Get a specific Subject\n\n### Request\n\n`GET /api/subjects/id/`\n\n    curl -i -H 'Accept: application/json' http://127.0.0.1:8000/api/subjects/4/\n\n### Response\n\n    HTTP/1.1 200 OK\n    Date: Thu, 26 Oct 2021 12:36:30 GMT\n    Status: 200 OK\n    Connection: close\n    Content-Type: application/json\n    Content-Length: 36\n\n    {\n        \"id\": 4,\n        \"name\": \"science\",\n        \"created_at\": \"2021-10-26T15:20:29.583538+03:00\",\n        \"updated_at\": \"2021-10-26T15:20:29.583559+03:00\"\n    }\n\n## Get a non-existent Thing\n\n### Request\n\n`GET /api/subjects/id/`\n\n    curl -i -H 'Accept: application/json' http://localhost:7000/thing/9999\n\n### Response\n\n    HTTP/1.1 404 Not Found\n    Date: Thu, 26 Oct 2021 12:36:30 GMT\n    Status: 404 Not Found\n    Connection: close\n    Content-Type: application/json\n    Content-Length: 35\n\n    {\n        \"detail\": \"Not found.\"\n    }\n\n## Create new Note\n\n### Request\n\n`POST /api/notes/`\n\n    curl -i -H 'Accept: application/json' -d 'user=1\u0026title=study computer\u0026description=\u0026subject=3' http://localhost:7000/api/notes/\n\n### Response\n\n    HTTP/1.1 201 Created\n    Date: Thu, 26 Oct 2021 12:36:30 GMT\n    Status: 201 Created\n    Connection: close\n    Content-Type: application/json\n    Location: /thing/2\n    Content-Length: 35\n\n    [\n        {\n            \"id\": 1,\n            \"user\": 1,\n            \"title\": \"study computer\",\n            \"description\": \"Most computers....\",\n            \"subject\": 3,\n            \"created_at\": \"2021-10-25T22:33:13.053112+03:00\",\n            \"updated_at\": \"2021-10-26T15:37:37.802552+03:00\"\n        }\n    ]\n\n## Get list of Notes\n\n### Request\n\n`GET /api/notes/`\n\n    curl -i -H 'Accept: application/json' http://127.0.0.1:8000/api/notes/\n\n### Response\n\n    HTTP/1.1 200 OK\n    Date: Thu, 26 Oct 2021 12:36:30 GMT\n    Status: 200 OK\n    Connection: close\n    Content-Type: application/json\n    Content-Length: 74\n\n    [\n        {\n            \"id\": 1,\n            \"user\": 1,\n            \"title\": \"study computer\",\n            \"description\": \"Most computers....\",\n            \"subject\": 3,\n            \"created_at\": \"2021-10-25T22:33:13.053112+03:00\",\n            \"updated_at\": \"2021-10-26T15:37:37.802552+03:00\"\n        }\n    ]\n\n## Get a specific Note\n\n`GET /api/notes/id/`\n\n    curl -i -H 'Accept: application/json' http://127.0.0.1:8000/api/notes/1/\n\n### Response\n\n    HTTP/1.1 200 OK\n    Date: Thu, 26 Oct 2021 12:36:30 GMT\n    Status: 200 OK\n    Connection: close\n    Content-Type: application/json\n    Content-Length: 74\n\n    [\n        {\n            \"id\": 1,\n            \"user\": 1,\n            \"title\": \"study computer\",\n            \"description\": \"Most computers....\",\n            \"subject\": 3,\n            \"created_at\": \"2021-10-25T22:33:13.053112+03:00\",\n            \"updated_at\": \"2021-10-26T15:37:37.802552+03:00\"\n        }\n    ]\n\n## Update a Note\n\n`PUT /api/notes/id/`\n\n    curl -i -H 'Accept: application/json' -d 'user=1\u0026title=study computer\u0026description=\u0026subject=3' http://127.0.0.1:8000/api/notes/1/\n\n### Response\n\n    HTTP/1.1 200 OK\n    Date: Thu, 26 Oct 2021 12:36:30 GMT\n    Status: 200 OK\n    Connection: close\n    Content-Type: application/json\n    Content-Length: 35\n\n    [\n        {\n            \"id\": 1,\n            \"user\": 1,\n            \"title\": \"study computer\",\n            \"description\": \"Most computers....\",\n            \"subject\": 3,\n            \"created_at\": \"2021-10-25T22:33:13.053112+03:00\",\n            \"updated_at\": \"2021-10-26T15:37:37.802552+03:00\"\n        }\n    ]\n\n## Delete a Note\n\n`DELETE /api/notes/id/`\n\n    curl -i -H 'Accept: application/json' http://127.0.0.1:8000/api/notes/1/\n\n### Response\n\n    HTTP/1.1 204 No Content\n    Date: Thu, 26 Oct 2021 12:36:30 GMT\n    Status: 204 No Content\n    Connection: close\n    Content-Length: 0\n\n## Get Profiles\n\n`GET /api/profiles/`\n\n    curl -i -H 'Accept: application/json' http://127.0.0.1:8000/api/profiles/\n\n### Response\n\n        HTTP/1.1 200 OK\n        Date: Thu, 26 Oct 2021 12:36:30 GMT\n        Status: 200 OK\n        Connection: close\n        Content-Type: application/json\n        Content-Length: 74\n\n        [\n            {\n                \"user\": 1,\n                \"bio\": \"\",\n                \"profile_pic\": \"image/upload/picha link\",\n                \"contact\": \"\",\n                \"location\": \"\",\n                \"notes\": [],\n                \"created_at\": \"2021-10-26T15:44:22.778462+03:00\",\n                \"updated_at\": \"2021-10-26T15:44:22.778481+03:00\"\n            }\n        ]\n\n## Get a specific Profile\n\n`GET /api/profiles/id/`\n\n    curl -i -H 'Accept: application/json' http://127.0.0.1:8000/api/profiles/1/\n\n### Response\n\n        HTTP/1.1 200 OK\n        Date: Thu, 26 Oct 2021 12:36:30 GMT\n        Status: 200 OK\n        Connection: close\n        Content-Type: application/json\n        Content-Length: 74\n\n        [\n            {\n                \"user\": 1,\n                \"bio\": \"\",\n                \"profile_pic\": \"image/upload/picha link\",\n                \"contact\": \"\",\n                \"location\": \"\",\n                \"notes\": [],\n                \"created_at\": \"2021-10-26T15:44:22.778462+03:00\",\n                \"updated_at\": \"2021-10-26T15:44:22.778481+03:00\"\n            }\n        ]\n\n## Update a Profile\n\n`PUT /api/profiles/id/`\n\n    curl -i -H 'Accept: application/json' -d 'user=1\u0026bio=\u0026profile_pic=\u0026contact=\u0026location=' http://127.0.0.1:8000/api/profiles/1/\n\n### Response\n\n    HTTP/1.1 200 OK\n    Date: Thu, 26 Oct 2021 12:36:30 GMT\n    Status: 200 OK\n    Connection: close\n    Content-Type: application/json\n    Content-Length: 74\n\n    [\n        {\n            \"user\": 1,\n            \"bio\": \"\",\n            \"profile_pic\": \"image/upload/house.png\",\n            \"contact\": \"\",\n            \"location\": \"\",\n            \"notes\": [],\n            \"created_at\": \"2021-10-26T15:44:22.778462+03:00\",\n            \"updated_at\": \"2021-10-26T15:44:22.778481+03:00\"\n        }\n    ]\n\n## User List\n\n### Request\n\n`GET /api/users/`\n\n        curl -i -H 'Accept: application/json' http://127.0.0.1:8000/api/users/\n\n### Response\n\n        HTTP/1.1 200 OK\n        Date: Thu, 26 Oct 2021 12:36:30 GMT\n        Status: 200 OK\n        Connection: close\n        Content-Type: application/json\n        Content-Length: 74\n\n        [\n            {\n                \"id\": 1,\n                \"username\": \"admin\",\n                \"first_name\": \"\",\n                \"last_name\": \"\",\n                \"email\": \"\n            }\n        ]\n\n## Create New User\n\n`POST api/users/create/`\n\n    curl -i -H 'Accept: application/json' -d '  http://127.0.0.1:8000/api/users/create/\n\n### Response\n\n        HTTP/1.1 201 Created\n        Date: Thu, 26 Oct 2021 12:36:30 GMT\n        Status: 201 Created\n        Connection: close\n        Content-Type: application/json\n        Content-Length: 74\n\n        [\n            {\n                \"id\": 1,\n                \"username\": \"admin\",\n                \"first_name\": \"\",\n                \"last_name\": \"\",\n                \"email\": \"\n            }\n        ]\n\n## User Login\n\n`POST api/auth/login/`\n\n    curl -i -H 'Accept: application/json' -d 'username=admin\u0026password=admin' http://127.0.0.1:8000/api/auth/login/\n\n### Response\n\n            HTTP/1.1 200 OK\n            Date: Thu, 26 Oct 2021 12:36:30 GMT\n            Status: 200 OK\n            Connection: close\n            Content-Type: application/json\n            Content-Length: 74\n\n            [\n                {\n                    \"id\": 1,\n                    \"username\": \"admin\",\n                    \"first_name\": \"\",\n                    \"last_name\": \"\",\n                    \"email\": \"\n                }\n            ]\n\n## Logout User\n\n`POST api/auth/logout/`\n\n    curl -i -H 'Accept: application/json' -d 'username=admin\u0026password=admin' http://127.0.0.1:8000/api/auth/logout/\n\n### Response\n\n            HTTP/1.1 200 OK\n            Date: Thu, 26 Oct 2021 12:36:30 GMT\n            Status: 200 OK\n            Connection: close\n            Content-Type: application/json\n            Content-Length: 74\n\n## Known Bugs\n\nSo far so good there are no bugs related to this project 😎\n\n## Support and contact details 🙂\n\nTo make a contribution to the code used or any suggestions you can click on the contact link and email me your suggestions.\n\n- Email: wilson@developerwilson.com\n- Phone: +254717255460\n\n## License\n\nCopyright (c) 2021 Moringa school\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files , to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilsonkinyua%2Fflash-cards","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilsonkinyua%2Fflash-cards","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilsonkinyua%2Fflash-cards/lists"}