Download presentation
Presentation is loading. Please wait.
Published byAmie Boone Modified over 9 years ago
1
TRANSPORTS 22 An easy way to serve orders
2
INDEX 1.INTRODUCTION 2.API 3.MOTIVATION 4.GUI
3
1 INTRODUCTION TOPIC: TRANSPORTS COMPANY API URL - http://group22aiss.appspot.com/api/ http://group22aiss.appspot.com/api/ API DOC URL - http://group22aiss.appspot.com http://group22aiss.appspot.com AUTHORS o Alberto Rincón Borreguero - arincon1992@gmail.com o Rafael Vázquez Sánchez - rafa.vazsan@gmail.com o Francisco García Moreno - fragarmor@alum.us.es
4
2 API - RESOURCES Order: { "destinationAddress": "Akresh 8", "sourceAddress": "Aluham, 14", "refNumber": 7, "driverID": 0, "productType": "coffee", "productQuantity": 20, "status": "PENDING" } Driver: { "surname": "Baskes", "name": "Raphael", "id": 1 }
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): o username: o password: Response: o The user's auth token o 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
24
That’s it THE END
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.