{"id":15014181,"url":"https://github.com/hansyagarwal/news-api","last_synced_at":"2026-02-09T15:35:08.435Z","repository":{"id":127073819,"uuid":"310905338","full_name":"hansyagarwal/news-api","owner":"hansyagarwal","description":"News-API for Appointy online test","archived":false,"fork":false,"pushed_at":"2020-11-09T16:39:38.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-03-08T10:20:29.675Z","etag":null,"topics":["api","golang","postman"],"latest_commit_sha":null,"homepage":"","language":"Go","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/hansyagarwal.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":"2020-11-07T18:16:23.000Z","updated_at":"2024-06-19T08:57:28.668Z","dependencies_parsed_at":null,"dependency_job_id":"e4b0171b-43e4-4e70-8ae4-dcc6f73a7ee5","html_url":"https://github.com/hansyagarwal/news-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/hansyagarwal/news-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansyagarwal%2Fnews-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansyagarwal%2Fnews-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansyagarwal%2Fnews-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansyagarwal%2Fnews-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hansyagarwal","download_url":"https://codeload.github.com/hansyagarwal/news-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansyagarwal%2Fnews-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268016818,"owners_count":24181655,"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","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"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":["api","golang","postman"],"created_at":"2024-09-24T19:45:17.926Z","updated_at":"2026-02-09T15:35:06.410Z","avatar_url":"https://github.com/hansyagarwal.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# news-api\n\n## Requirements\n- Postman\n- Go ver 1.4 or later\n- Text editor (VSCode recommended)\n\n## What operations it can do?\n- Create an Article\n- Get an Article by it's id\n- List/Get all the Articles\n- Search for an artice by it's title,subtitle or content\n\n## How to run?\nimport/download all package and libraries using `go get`\n``` \ngo run main.go\n```\n\u003e port: 3000\n\n\u003e everything is case-sensitive\n\n\u003e the mongodb uri is kept public for some time\n\nopen postman and create new request\n\n### for creating an article, \nswitch from GET to POST and type `localhost:3000/articles`\nselect `body` and then `raw` and for example type\n```\n{\n\t\"Title\": \"news article\",\n\t\"Subtitle\": \"subtitle of new article\",\n\t\"Content\": \"content of new article\"\n}\n```\nclick send\n\n### for other operations,\nswitch to GET and type:\n`localhost:3000/articles` to list all the articles\n\n`localhost:3000/articles/\u003cid\u003e` to get the article by its id (try `5fa96b181aff7c9b9bb04e8a` as id or put `localhost:3000/articles/5fa96b181aff7c9b9bb04e8a`)\n\n`localhost:3000/articles/search?q=\u003csearch term\u003e` to get the article by its title/subtitle/content (if the title is more than 1 word use `%20` for space, eg: `localhost:3000/articles/search?q=Covid19%20vaccine`)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhansyagarwal%2Fnews-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhansyagarwal%2Fnews-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhansyagarwal%2Fnews-api/lists"}