{"id":15790138,"url":"https://github.com/pycomet-zz/hacker-news-app","last_synced_at":"2025-03-31T18:40:59.685Z","repository":{"id":104239339,"uuid":"539635935","full_name":"Pycomet-zz/hacker-news-app","owner":"Pycomet-zz","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-26T19:11:03.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-05T22:04:59.138Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pycomet-zz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-09-21T18:40:45.000Z","updated_at":"2022-09-22T14:04:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"65c331b6-4fd6-4fb9-b2a6-3bc110c7c703","html_url":"https://github.com/Pycomet-zz/hacker-news-app","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/Pycomet-zz%2Fhacker-news-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pycomet-zz%2Fhacker-news-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pycomet-zz%2Fhacker-news-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pycomet-zz%2Fhacker-news-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pycomet-zz","download_url":"https://codeload.github.com/Pycomet-zz/hacker-news-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246519987,"owners_count":20790857,"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":"2024-10-04T22:05:03.070Z","updated_at":"2025-03-31T18:40:59.661Z","avatar_url":"https://github.com/Pycomet-zz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hacker News Miniblog Project\n\nThis project is aimed at synchronizing with the live hacker news api to provide a smooth interactive space for a user to search all the news content based on their preferred text keywords or possibly by the news type.\n\nBelow are the avaialable Restful endpoints from this flask application;\n\n## Fetch All News Items From Database\n\nUsed to fetch all the data avaialable in the database in order of the newest entries being at the top.\n\n**URL** : `/api/v1/news`\n\n**METHOD** : `GET`\n\n### Success Response\n\n**Code** : `200 OK`\n\n**Content example**\n\n```json\n{\n  \"message\": \"Fetch successfull\",\n  \"data\": [], // Data in a list\n  \"code\": 200\n}\n```\n\n## Fetch All News Items By Filter (by text or type )\n\nUsed to fetch data avaialable in the database based on text search or by the news type (story, job or poll).\n\n**URL** : `/api/v1/news`\n\n**METHOD** : `POST`\n\n**PARAMS** :\n\n```json\n{\n  \"search\": \"Query string to search\",\n  \"types\": \"news types seperated by ',' \"\n}\n```\n\n### Success Response\n\n**Code** : `200 OK`\n\n**Content example**\n\n```json\n{\n  \"message\": \"Fetch successfull\",\n  \"data\": [], // Data in a list\n  \"code\": 200\n}\n```\n\n## Fetch Single Item From Database\n\nUsed to fetch a single news data from the database.\n\n`\u003cnews_id\u003e is unique news id`\n\n**URL** : `/api/v1/news/\u003cnews_id\u003e`\n\n**METHOD** : `GET`\n\n### Success Response\n\n**Code** : `200 OK`\n\n**Content example**\n\n```json\n{\n  \"message\": \"Item Fetch Success\",\n  \"data\": item, // Data object\n  \"code\": 200\n}\n```\n\n## Create New Item To Database\n\nUsed to create/write a new data into database with a new unique id.\n\n`\u003cnews_id\u003e is not neccessarily valid`\n\n**URL** : `/api/v1/news/\u003cnews_id\u003e`\n\n**METHOD** : `POST`\n\n**PARAMS** :\n\n```json\n{\n  \"by\": \"codefred\",\n  \"type\": \"job\",\n  \"time\": 2436273623,\n  \"deleted\": false,\n  \"dead\": false,\n  \"text\": \"This is a test job\",\n  \"url\": \"https://google.com\",\n  \"title\": \"Flow design\"\n}\n```\n\n### Success Response\n\n**Code** : `200 OK`\n\n**Content example**\n\n```json\n{\n  \"message\": \"New Item Created\",\n  \"data\": true, // (Bool) created data\n  \"code\": 200\n}\n```\n\n## RUN ALL TESTS\n\nThis command run all the three (3) scripts to validate all the app functions to be working fine.\n\n**COMMAND** : `python -m unittest tests`\n\n## Creator\n\nCodefred - https://codefred.me\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpycomet-zz%2Fhacker-news-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpycomet-zz%2Fhacker-news-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpycomet-zz%2Fhacker-news-app/lists"}