{"id":20930055,"url":"https://github.com/kasim95/web_backend_project_1","last_synced_at":"2026-05-21T03:02:22.486Z","repository":{"id":67676854,"uuid":"242421232","full_name":"kasim95/Web_Backend_Project_1","owner":"kasim95","description":"APIs built using Python and SQLite to save, retrieve, filter posts, and votes for the posts.","archived":false,"fork":false,"pushed_at":"2020-03-11T04:01:32.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-19T18:51:41.642Z","etag":null,"topics":["api-rest","python","python3","sqlite"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kasim95.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2020-02-22T22:34:02.000Z","updated_at":"2020-12-05T07:40:12.000Z","dependencies_parsed_at":"2023-02-27T08:31:26.168Z","dependency_job_id":null,"html_url":"https://github.com/kasim95/Web_Backend_Project_1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasim95%2FWeb_Backend_Project_1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasim95%2FWeb_Backend_Project_1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasim95%2FWeb_Backend_Project_1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasim95%2FWeb_Backend_Project_1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kasim95","download_url":"https://codeload.github.com/kasim95/Web_Backend_Project_1/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243324266,"owners_count":20273100,"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":["api-rest","python","python3","sqlite"],"created_at":"2024-11-18T21:28:37.089Z","updated_at":"2025-12-30T04:29:20.151Z","avatar_url":"https://github.com/kasim95.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# CPSC 449 Web Backend Engineering\n## Project-1\n### Project Members:\n* Raj Chhatbar (chhatbarraj@csu.fullerton.edu) | Role: Ops\n* Mohammed Kasim Panjri (kasimp@csu.fullerton.edu) | Role: Dev 1 Post API\n* Harlik Shah (shahharlik@csu.fullerton.edu) | Role: Dev 2 Vote API\n\n\n#### ---------------------------------- Dev Ops-------------------------------------------\n1) Use this code for generating 3 instance of foreman in a terminal\n```\nforeman start -m post=3,vote=3\n```\n\n2) In separate terminal run\n```\nulimit -n 8192 \u0026\u0026 caddy\n```\n\n3) Then go to localhost:2015/posts or localhost:2015/votes\nex: to get all post in Database run\nhttp://localhost:2015/posts/filter\n\n#### ---------------------------------- Post API-------------------------------------------\n1. Create a new post: Send a POST request to route of create_post() fn\n\u003e \n```\nExample request:\ncurl -i -X POST -H 'Content-Type:application/json' -d '{\"title\":\"Test post\", \"description\":\"This is a test post\", \"username\":\"some_guy_or_gal\", \"community_name\":\"449\"}' http://localhost:2015/posts/create;\n```\n\n2. Delete an existing post: Send a GET request to route of delete_post() fn\n```\nExample request:\ncurl -i -X DELETE http://localhost:2015/posts/delete?post_id=4;\n```\n\n3. Retrieve an existing post: Send a GET request to route of get_post() fn\n```\nExample request:\ncurl -i http://localhost:2015/posts/get?post_id=2;\n```\n\n4. List the n most recent posts to a particular community: Send a GET request to route of get_posts_filter() fn with args (community_name and n)\n```\nExample request:\ncurl -i http://localhost:2015/posts/filter?n=2\u0026community_name=calculus;\n```\n\n5. List the n most recent posts to any community: Send a GET request to route of get_posts_filter() fn with args (n)\n```\nExample request:\ncurl -i http://localhost:2015/posts/filter?n=2;\n```\n\n#### ---------------------------------- Vote API-------------------------------------------\n\n\n\n1) Upvote a post:\n```\nExample request:\ncurl -i -X POST -H \"Content-Type: application/json\" -d '{\"vote_id\":\"2\"}' 'http://127.0.0.1:5000/upvotes'\n```\n\n2) Downvote a post:\n```\nExample request:\ncurl -i -X POST -H \"Content-Type: application/json\" -d '{\"vote_id\":\"2\"}' 'http://127.0.0.1:5000/downvotes'\n```\n\n3) Report the number of upvotes and downvotes for a post:\n```\nExample request:\ncurl -i 'http://localhost:2015/votes/get?vote_id=2';\n```\n\n4) List the n top-scoring posts to any community:\n```\nExample request:\ncurl -i 'http://localhost:2015/votes/getTop?n=3';\n```\n\n5) Given a list of post identifiers, return the list sorted by score.:\n```\nExample request:\ncurl -i -X POST -H \"Content-Type: application/json\" -d '{\"post_ids\":[\"1\",\"3\"]}' 'http://127.0.0.1:5000/getList'\n```\n\n## License\n[MIT](https://choosealicense.com/licenses/mit/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkasim95%2Fweb_backend_project_1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkasim95%2Fweb_backend_project_1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkasim95%2Fweb_backend_project_1/lists"}