{"id":20743497,"url":"https://github.com/andr83/deliveryhero","last_synced_at":"2025-09-12T23:34:23.056Z","repository":{"id":86492827,"uuid":"153153411","full_name":"andr83/deliveryhero","owner":"andr83","description":"Delivery Hero technical test task","archived":false,"fork":false,"pushed_at":"2018-10-15T17:25:08.000Z","size":7,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T12:39:39.288Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","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/andr83.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":"2018-10-15T17:21:53.000Z","updated_at":"2022-01-15T15:50:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"ab5b19ad-531d-4878-ba98-b8261b635f8c","html_url":"https://github.com/andr83/deliveryhero","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andr83/deliveryhero","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andr83%2Fdeliveryhero","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andr83%2Fdeliveryhero/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andr83%2Fdeliveryhero/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andr83%2Fdeliveryhero/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andr83","download_url":"https://codeload.github.com/andr83/deliveryhero/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andr83%2Fdeliveryhero/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274893250,"owners_count":25369278,"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-09-12T02:00:09.324Z","response_time":60,"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":[],"created_at":"2024-11-17T07:11:11.241Z","updated_at":"2025-09-12T23:34:23.030Z","avatar_url":"https://github.com/andr83.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Delivery Hero technical test task\n\n## Introduction\nCreate a restful API using any framework of choice, which provides an interface for restaurants stored in a database. \nThe API should be self contained and easily runnable.\n\nThe exercise implemented on Scala 2.12 with usage only Akka, Akka HTTP, Circe, Lightbend Config and ScalaTest libraries. \n\n## REST API\n\n### Create a new restaurant. \n\n**URL**:   `/v1/restaurants`\n\n**Method**: `POST`\n\n**Data Parameters in JSON**:\n\n  * name String \n  * phone String\n  * cuisines Array[String]\n  * address String \n  * description String\n  \n#### Success Response\n\n**Code**: 200\n\n**Content**: Restaurant entity in JSON format\n\n**Example**:\n\n```bash\ncurl -H \"Content-Type: application/json\" \\ \n  --data '{\"name\":\"Kyubey\",\"phone\":\"911\",\"cuisines\":[\"Japan\"],\"address\":\"Tokio\",\"description\":\"The best!\"}' \\ \n  /v1/restaurants\n{\"id\":1,\"name\":\"Kyubey\",\"phone\":\"911\",\"cuisines\":[\"Japan\"],\"address\":\"Tokio\",\"description\":\"The best!\"}\n```\n\n#### Error Response\n\nIf one of the required fields is missing:\n  \n**Code**: 400\n\n**Content**: Error message\n\n### Update a restaurant by id. \n\n**URL**:   `/v1/restaurants/:id`\n\n**Method**: `PUT`\n\n**Data Parameters in JSON**:\n\n  * name String \n  * phone String\n  * cuisines Array[String]\n  * address String \n  * description String\n  \nAll fields are optional.  \n  \n#### Success Response\n\n**Code**: 200\n\n**Content**: Restaurant entity in JSON format\n\n**Example**:\n\n```bash\ncurl -H \"Content-Type: application/json\" -XPUT \\ \n  --data '{\"address\":\"Kyoto\"}' \\ \n  /v1/restaurants/1\n{\"id\":1,\"name\":\"Kyubey\",\"phone\":\"911\",\"cuisines\":[\"Japan\"],\"address\":\"Kyoto\",\"description\":\"The best!\"}\n```\n\n#### Error Response\nIf no restaurant by id is found.\n\n**Code**: 404\n\n### Get restaurant by id. \n\n**URL**:   `/v1/restaurants/:id`\n\n**Method**: `GET`\n\n#### Success Response\n\n**Code**: 200\n\n**Content**: Restaurant entity in JSON format\n\n**Example**:\n\n```bash\ncurl /v1/restaurants/1\n{\"id\":1,\"name\":\"Kyubey\",\"phone\":\"911\",\"cuisines\":[\"Japan\"],\"address\":\"Tokio\",\"description\":\"The best!\"}\n```\n\n#### Error Response\nIf no restaurant by id is found.\n\n**Code**: 404\n\n### List all restaurants. \n\n**URL**:   `/v1/restaurants`\n\n**Method**: `GET`\n\n#### Success Response\n\n**Code**: 200\n\n**Content**: List of restaurant entities in JSON format\n\n**Example**:\n\n```bash\ncurl /v1/restaurants\n[{\"id\":1,\"name\":\"Kyubey\",\"phone\":\"911\",\"cuisines\":[\"Japan\"],\"address\":\"Tokio\",\"description\":\"The best!\"}]\n```\n\n### Delete restaurant by id. \n\n**URL**:   `/v1/restaurants/:id`\n\n**Method**: `DELETE`\n\n#### Success Response\n\n**Code**: 200\n\n**Content**: Removed restaurant entity in JSON format\n\n**Example**:\n\n```bash\ncurl -XDELETE /v1/restaurants/1\n{\"id\":1,\"name\":\"Kyubey\",\"phone\":\"911\",\"cuisines\":[\"Japan\"],\"address\":\"Tokio\",\"description\":\"The best!\"}\n```\n\n### Health check. \n\n**URL**:   `/v1/healthcheck`\n\n**Method**: `GET`\n\n#### Success Response\n\n**Code**: 200\n\n**Example**:\n\n```bash\ncurl /v1/healthcheck\n()\n```\n  \n## Build REST API service\n### Docker\n\n```bash\nsbt docker:publishLocal\n```\n\nIt will build local docker image `deliveryhero-test:0.1`\n\n## Run REST API service in docker \n```bash\ndocker run -it --rm -p \"8080:8080\" deliveryhero-test:0.1\n```\n\n## REST API service configuration\n\nBy default service bind to `0.0.0.0` interface by `8080` port. It can be changed via environment variables:\n\n* HTTP_HOST\n* HTTP_PORT \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandr83%2Fdeliveryhero","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandr83%2Fdeliveryhero","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandr83%2Fdeliveryhero/lists"}