1 / 24

TRANSPORTS 22

TRANSPORTS 22. An easy way to serve orders. INDEX. INTRODUCTION API MOTIVATION GUI. 1 INTRODUCTION. TOPIC: TRANSPORTS COMPANY API URL - http://group22aiss.appspot.com/api/ API DOC URL - http://group22aiss.appspot.com AUTHORS Alberto Rincón Borreguero - arincon1992@gmail.com

Télécharger la présentation

TRANSPORTS 22

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. TRANSPORTS 22 An easy way to serve orders

  2. INDEX • INTRODUCTION • API • MOTIVATION • GUI

  3. 1 INTRODUCTION • TOPIC: TRANSPORTS COMPANY • API URL - http://group22aiss.appspot.com/api/ • API DOC URL - http://group22aiss.appspot.com • AUTHORS • Alberto Rincón Borreguero - arincon1992@gmail.com • Rafael Vázquez Sánchez - rafa.vazsan@gmail.com • Francisco García Moreno - fragarmor@alum.us.es

  4. Driver: { "surname": "Baskes", "name": "Raphael", "id": 1 } 2 API - RESOURCES Order: { "destinationAddress": "Akresh 8", "sourceAddress": "Aluham, 14", "refNumber": 7, "driverID": 0, "productType": "coffee", "productQuantity": 20, "status": "PENDING" }

  5. 2 API - STATE MACHINE

  6. 2 API - USES CASES

  7. 2 API - AUTHENTICATION

  8. 2 API - METHODS (Auth) Logging in: • GET - /auth • Parameters (header): • username: <the user's name here> • password: <the user's password here> • Response: • The user's auth token • E.g.: PPRUD8844200LK3J4JGB22MI444JN1R

  9. 2 API - METHODS (Orders) Create a new order: • POST - /orders/ • Request: { "destinationAddress": "Sevilla", "sourceAddress": "Marrakech", "productType": "drink", "productQuantity": 1000, "driverID": 0, "refNumber": 0, "status": "PENDING" }

  10. 2 API - METHODS (Orders) Show a single order: • GET - /orders/{refNumber} • Response: { "destinationAddress": "Akresh 8", "sourceAddress": "Aluham, 14", "refNumber": 7, "driverID": 0, "productType": "coffee", "productQuantity": 20, "status": "PENDING“ }

  11. 2 API - METHODS (Orders) List all orders: • GET - /orders/ • Response: [{ "destinationAddress": "Akresh 8", "sourceAddress": "Aluham, 14", "refNumber": 7, "driverID": 0, "productType": "coffee", "productQuantity": 20, "status": "PENDING" }, { "destinationAddress": "Alame, 7", "sourceAddress": "Hamkinel, 23", "refNumber": 8, "driverID": 0, "productType": "fruit", "productQuantity": 20, "status": "PENDING" }]

  12. 2 API - METHODS (Orders) Update an existing order: *auth required (driver/admin) • PUT - /orders/{refNumber} • Request: { "destinationAddress": "Sevilla", "sourceAddress": "Marrakech", "productType": "drink", "productQuantity": 1000, "driverID": 2, <-- admin only "refNumber": 5, "status": "SHIPPED“ <-- driver only }

  13. 2 API - METHODS (Drivers) Show a single driver: *auth required (driver/admin) • GET - /drivers/{driverID} • Response: { "surname": "Baskes", "name": "Rafa", "id": 1 }

  14. 2 API - METHODS (Drivers) List all drivers: *auth required (admin) • GET - /drivers/ • Response: [{ "surname": "Baskes", "name": "Rafa", "id": 1 }, { "surname": "Garmo", "name": "Fran", "id": 2 }, { "surname": "Rinco", "name": "Albertitou", "id": 3 }]

  15. 2 API - METHODS (Drivers) List orders assigned to a driver: *auth required (driver) • GET - /drivers/{driverID}/orders/ • Response: [{ "destinationAddress": "Alame, 7", "sourceAddress": "Hamkinel, 23", "refNumber": 8, "driverID": 1, "productType": "fruit", "productQuantity": 20, "status": "PENDING" }, { "destinationAddress": "Krantiun, 8", "sourceAddress": "khonkraniu, 9", "refNumber": 18, "driverID": 3, "productType": "fish", "productQuantity": 20, "status": "PENDING" }]

  16. 3 MOTIVATION WHY TO USE OUR API? SECURITY:LOG IN TO MANAGE ADVANCED OPTIONS PERSISTENCE:HAVE ALWAYS YOUR DATA AVAILABLE IMPLEMENTATION: VERY EASY TO IMPLEMENT WITH A GREAT DOCUMENTATION

  17. 4 GUI - NAVIGATION GRAPH

  18. 4 GUI

  19. 4 GUI

  20. 4 GUI

  21. 4 GUI

  22. 4 GUI

  23. 4 GUI

  24. That’sit THE END

More Related