{"id":20723731,"url":"https://github.com/kapit4n/play-news-api","last_synced_at":"2026-04-22T06:40:41.562Z","repository":{"id":71160472,"uuid":"79609248","full_name":"kapit4n/play-news-api","owner":"kapit4n","description":"Restfull API to manage news","archived":false,"fork":false,"pushed_at":"2018-10-10T11:16:43.000Z","size":1070,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T08:32:47.122Z","etag":null,"topics":["json","news","play-framework","rest-api","restful-api","sbt","scala"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kapit4n.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":"2017-01-20T23:25:01.000Z","updated_at":"2018-10-10T11:16:44.000Z","dependencies_parsed_at":"2023-02-22T08:15:10.455Z","dependency_job_id":null,"html_url":"https://github.com/kapit4n/play-news-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kapit4n/play-news-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapit4n%2Fplay-news-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapit4n%2Fplay-news-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapit4n%2Fplay-news-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapit4n%2Fplay-news-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kapit4n","download_url":"https://codeload.github.com/kapit4n/play-news-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapit4n%2Fplay-news-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27997394,"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-12-24T02:00:07.193Z","response_time":83,"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":["json","news","play-framework","rest-api","restful-api","sbt","scala"],"created_at":"2024-11-17T04:09:39.250Z","updated_at":"2025-12-24T07:32:56.916Z","avatar_url":"https://github.com/kapit4n.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Play REST API\n\nThis is the example project for [Making a REST API in Play](http://developer.lightbend.com/guides/play-rest-api/index.html).\n# Resources\n* http://localhost:9000/v1/posts\n* http://localhost:9000/v1/news\n\n### Running\n\nYou need to download and install sbt for this application to run.\n\nOnce you have sbt installed, the following at the command prompt will start up Play in development mode:\n\n```\nsbt run\n```\n\nPlay will start up on the HTTP port at http://localhost:9000/.   You don't need to reploy or reload anything -- changing any source code while the server is running will automatically recompile and hot-reload the application on the next HTTP request. \n\n### Usage\n#### GETS\n```\nGET /v1/news HTTP/1.1\nResult\n[\n  {\n    \"id\": \"1\",\n    \"link\": \"/v1/news/1\",\n    \"title\": \"Title\",\n    \"body\": \"body\",\n    \"likes\": 1\n  },\n  {\n    \"id\": \"2\",\n    \"link\": \"/v1/news/2\",\n    \"title\": \"news title\",\n    \"body\": \"News body 1\",\n    \"likes\": 0\n  }\n]\nGET /v1/news/1 HTTP/1.1\nResult \n{\n  \"id\": \"1\",\n  \"link\": \"/v1/news/1\",\n  \"title\": \"Title\",\n  \"body\": \"body\",\n  \"likes\": 1\n}\nGET /v1/news/1/comments HTTP/1.1\nResult \n[\n  {\n    \"id\": \"1\",\n    \"link\": \"/v1/news/1/comments/1\",\n    \"newsId\": 1,\n    \"body\": \"News body 1\",\n    \"likes\": 0\n  },\n  {\n    \"id\": \"2\",\n    \"link\": \"/v1/news/1/comments/2\",\n    \"newsId\": 1,\n    \"body\": \"Comments body 1\",\n    \"likes\": 0\n  }\n]\nGET /v1/comments/1 HTTP/1.1\nResult\n{Return the comment with Id equal 1}\n```\n#### POSTS\n```\nPOST /v1/news HTTP/1.1\nExample:\n{\"title\":\"news title\",\"body\":\"News body 1\", likes: '2'}\nPOST /v1/news/1/comments HTTP/1.1\nExample:\n{\"newsId\":\"2\",\"body\":\"Comments body 1\", \"likes\": \"1\"}\n```\n\n#### DELETE\n\n```\nDELETE http://localhost:9000/v1/news/1 http/1.1\n{delete news with Id 1}\nDELETE http://localhost:9000/v1/comments/1 http/1.1\n{delete comment with Id 1}\n```\n\n### Load Testing\n\nThe best way to see what Play can do is to run a load test.  We've included Gatling in this test project for integrated load testing.\n\nStart Play in production mode, by [staging the application](https://www.playframework.com/documentation/2.5.x/Deploying) and running the play script:s\n\n```\nsbt stage\ncd target/universal/stage\nbin/play-rest-api -Dplay.crypto.secret=testing\n```\n\nThen you'll start the Gatling load test up (it's already integrated into the project):\n\n```\nsbt gatling:test\n```\n\nFor best results, start the gatling load test up on another machine so you do not have contending resources.  You can edit the [Gatling simulation](http://gatling.io/docs/2.2.2/general/simulation_structure.html#simulation-structure), and change the numbers as appropriate.\n\nOnce the test completes, you'll see an HTML file containing the load test chart:\n\n```\n ./rest-api/target/gatling/gatlingspec-1472579540405/index.html\n```\n\nThat will contain your load test results.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkapit4n%2Fplay-news-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkapit4n%2Fplay-news-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkapit4n%2Fplay-news-api/lists"}