Skip to content

broilogabriel/deliveryhero

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Delivery Hero Restaurant REST Service

Self contained API service for CRUD operations on Restaurants.

This service is built using AkkaHttp

Installation

Clone this repo

git clone https://github.com/smur89/deliveryhero.git

Create the docker image

gradle buildDocker

Run the docker image

docker run --rm -p 8080:8080 --name deliveryhero-rest com.deliveryhero/restservice:latest  

Usage example

This API is documented using Swagger. Please visit the following URL for details

http://localhost:8080/swagger/index.html

Examples

Healthcheck

GET /v1/healthcheck

curl -X GET "http://localhost:8080/v1/healthcheck" -H "accept: */*"

Restaurants

GET /v1/restaurants

Gets the list of all stored available restaurants

curl -X GET "http://localhost:8080/v1/restaurants" -H "accept: */*"

GET /v1/restaurants/{id}

Gets a given restaurant

curl -X GET "http://localhost:8080/v1/restaurants/0" -H "accept: */*"

POST /v1/restaurants

Create a restaurant

curl -X POST "http://localhost:8080/v1/restaurants" -H "accept: */*" -H "Content-Type: */*" -d "{\"name\":\"string\",\"phoneNo\":\"string\",\"cuisines\":[\"string\"],\"address\":{\"line1\":\"string\",\"line2\":\"string\",\"city\":\"string\",\"country\":\"string\"},\"description\":\"string\"}"

PUT /v1/restaurants

Updates a restaurant

curl -X PUT "http://localhost:8080/v1/restaurants/0" -H "accept: */*" -H "Content-Type: */*" -d "{\"name\":\"string\",\"phoneNo\":\"string\",\"cuisines\":[\"string\"],\"address\":{\"line1\":\"string\",\"line2\":\"string\",\"city\":\"string\",\"country\":\"string\"},\"description\":\"string\"}"

DELETE /v1/restaurants

Delete a restaurant

curl -X DELETE "http://localhost:8080/v1/restaurants/0" -H "accept: */*"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 86.3%
  • HTML 13.1%
  • Shell 0.6%