Giter Club home page Giter Club logo

rides-api's Introduction

Sequence diagram

Sequence Diagram

Class diagram

Class Diagram

End point to search in Rides

  • A REST API application to list rides

  • GET http://localhost:8001/api/rides

  • Json Response in header Accept: text/json

{
  "rides": [
    {
      "id": 1,
      "uuid": "b498b7b9-9073-4a66-b156-fb1abca0dc82",
      "duration": 19,
      "source": "Port Karleeborough",
      "destination": "North Aron",
      "price": 47.42,
      "departureDate": "2021-07-10T04:48:27+00:00",
      "arrivalDate": "2021-07-10T05:07:27+00:00"
    },
    {
      "id": 2,
      "uuid": "e827dc23-f3a6-4007-b023-512a419e16e1",
      "duration": 39,
      "source": "Shanahanhaven",
      "destination": "Josianeburgh",
      "price": 143.67,
      "departureDate": "2021-07-14T02:41:11+00:00",
      "arrivalDate": "2021-07-14T03:20:11+00:00"
    }
  ]
}
  • GET http://localhost:8001/api/rides
  • For XML Response send header Accept: text/xml
<?xml version="1.0"?>
<response>
  <rides>
    <id>52</id>
    <uuid>6c50a577-cfe9-4b8e-9bd5-d04ad6f649b1</uuid>
    <duration>6</duration>
    <source>Lake Orville</source>
    <destination>Danielview</destination>
    <price>77.27</price>
    <departureDate>2021-07-04T00:21:12+00:00</departureDate>
    <arrivalDate>2021-07-04T00:27:12+00:00</arrivalDate>
  </rides>
</response>
Criteria/Filters Examples:
  • example http://localhost:8001/api/rides?sortByDepartureDate=asc&maxPrice=160&minPrice=120
  • minDuration /api/rides?minDuration=10 requirements="\d+"
  • maxDuration /api/rides?maxDuration=50 requirements="\d+"
  • sortByDepartureDate /api/rides?sortByDepartureDate=desc requirements="[a-z]+"
  • minPrice /api/rides?minPrice=50 requirements="\d+"
  • maxPrice /api/rides?minPrice=10 requirements="\d+"

Installation

  • Run make build

Running the tests

  • Run make test

Built With

rides-api's People

Contributors

mohamedhafezqo avatar

Stargazers

 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.