-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
32 lines (22 loc) · 857 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Train Problem Exercise
Is an Restfull Api that calculates for a given graph the cost, steps and path from a source to a destination node.
Following you can find the available resources:
- /edge
Method: GET List all the edges
POST Creates a new edge
Payload :
- src - source node
- dst - destination node
- length - cost of src to dst
- /route
Method: POST Creates a new route
Payload :
- path - pre-define path
- src - source node
- dst - destination node
- length - cost of src to dst
- cost - cost limit
- step - step limit
To run this api server application you will need to run the Sinatra by:
1. bundle install
2. run app.rb