{"id":25720061,"url":"https://github.com/gregwhitaker/ratpack-flatleftright-example","last_synced_at":"2026-06-07T21:31:47.349Z","repository":{"id":82732609,"uuid":"154857441","full_name":"gregwhitaker/ratpack-flatleftright-example","owner":"gregwhitaker","description":"Example of using \"flatLeft\" and \"flatRight\" in Ratpack","archived":false,"fork":false,"pushed_at":"2018-10-27T17:57:00.000Z","size":98,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-18T21:04:45.133Z","etag":null,"topics":["promise","ratpack","ratpackweb"],"latest_commit_sha":null,"homepage":"","language":"Java","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/gregwhitaker.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":"2018-10-26T15:42:46.000Z","updated_at":"2018-10-27T17:57:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"9bcf35b6-3687-48c4-af25-fbe39b468553","html_url":"https://github.com/gregwhitaker/ratpack-flatleftright-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gregwhitaker/ratpack-flatleftright-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregwhitaker%2Fratpack-flatleftright-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregwhitaker%2Fratpack-flatleftright-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregwhitaker%2Fratpack-flatleftright-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregwhitaker%2Fratpack-flatleftright-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregwhitaker","download_url":"https://codeload.github.com/gregwhitaker/ratpack-flatleftright-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregwhitaker%2Fratpack-flatleftright-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34039495,"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-07T02:00:07.652Z","response_time":124,"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":["promise","ratpack","ratpackweb"],"created_at":"2025-02-25T17:36:28.514Z","updated_at":"2026-06-07T21:31:47.322Z","avatar_url":"https://github.com/gregwhitaker.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ratpack-flatleftright-example\n[![Build Status](https://travis-ci.org/gregwhitaker/ratpack-flatleftright-example.svg?branch=master)](https://travis-ci.org/gregwhitaker/ratpack-flatleftright-example)\n\nAn example of using `flatLeft` and `flatRight` in [Ratpack](https://www.ratpack.io).\n\nThe `flatLeft` and `flatRight` commands add values to the returned `Pair` just like the `left` and `right` commands. However,\nunlike left and right, flatLeft and flatRight add the resolved value of the Promise to the Pair and not the Promise itself.\n\n## Building the Example\nRun the following Gradle command to build the example:\n\n    ./gradlew clean build\n    \n## Running the Example\n1. Run the following Gradle command to start the example:\n\n        ./gradlew run\n    \n2. Execute the following command to retrieve the employee widget report:\n\n        curl http://localhost:5050/api/v1/reports/employees/1/widgets\n        \n    If sucessful you will see the following response:\n        \n        {\"employeeId\":1,\"firstName\":\"John\",\"lastName\":\"Smith\",\"inspectedWidgets\":[{\"widgetId\":2,\"inspectionDate\":\"2018-10-27 10:38:35\"},{\"widgetId\":22,\"inspectionDate\":\"2018-10-27 10:38:35\"},{\"widgetId\":36,\"inspectionDate\":\"2018-10-27 10:38:35\"},{\"widgetId\":37,\"inspectionDate\":\"2018-10-27 10:38:35\"},{\"widgetId\":38,\"inspectionDate\":\"2018-10-27 10:38:35\"},{\"widgetId\":39,\"inspectionDate\":\"2018-10-27 10:38:35\"},{\"widgetId\":42,\"inspectionDate\":\"2018-10-27 10:38:35\"},{\"widgetId\":46,\"inspectionDate\":\"2018-10-27 10:38:35\"},{\"widgetId\":49,\"inspectionDate\":\"2018-10-27 10:38:35\"},{\"widgetId\":62,\"inspectionDate\":\"2018-10-27 10:38:35\"},{\"widgetId\":72,\"inspectionDate\":\"2018-10-27 10:38:35\"}]}\n    \n## Bugs and Feedback\nFor bugs, questions, and discussions please use the [Github Issues](https://github.com/gregwhitaker/ratpack-leftright-example/issues).\n\n## License\nMIT License\n\nCopyright (c) 2018 Greg Whitaker\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), 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.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregwhitaker%2Fratpack-flatleftright-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregwhitaker%2Fratpack-flatleftright-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregwhitaker%2Fratpack-flatleftright-example/lists"}