Giter VIP home page Giter VIP logo

autoscout24's Introduction

AutoScout24 Car Advert Backend Service

Running

You need to download and install sbt for this application to run.

Once you have sbt installed, the following at the command prompt will start up Play in development mode:

sbt run

Play will start up on the HTTP port at http://localhost:9000/. You don't need to deploy 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.

Usage

The service will start with an in memory list of 5 Adverts which is not persistent. This can be found in the CarAdvertRepository. In the feature, this can be replaced by a persistence storage such as RDBMS.

Please see below quick usage:

  • Get the list of all adverts sorted by Id by default
curl --include http://localhost:9000/api/v1/adverts
  • Get the list of all adverts sorted by a query parameter, for example: title
curl --include http://localhost:9000/api/v1/adverts?sortBy=title
  • Get the data for a single advert by Id for example id = 2
curl --include http://localhost:9000/api/v1/adverts/2
  • Create a new car advert via a Json data
curl --include -d '{"id": 7, "title": "Jaguar","fuel": "diesel","price": 0,"isNew": true}' -H "Content-Type: application/json" -X POST http://localhost:9000/api/v1/advert
 
  • Update an existing car advert via a Json data
curl --include -d '{"id": 3, "title": "Range Rover","fuel": "diesel","price": 0,"isNew": true}' -H "Content-Type: application/json" -X PUT http://localhost:9000/api/v1/advert
  • Delete an existing car Advert by Id for example id = 3
curl --include -X DELETE http://localhost:9000/api/v1/advert/3

autoscout24's People

Contributors

klawani avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.