Skip to content

Commit 6691507

Browse files
committed
added example documentation
1 parent 5b6d635 commit 6691507

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

lab_04/example_documentation.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Example API Documentation
2+
3+
## Connecting to the API
4+
Since we are running our API locally we will access the endpoint at ```http://127.0.0.1:5000``` (or the address the appears on your console).
5+
6+
## Welcome
7+
- Method: GET
8+
- Path: ```/```
9+
- Query parameters: None
10+
11+
This is just a friendly welcome to the API.
12+
13+
## Sum
14+
- Method: GET
15+
- Path: ```/sum```
16+
- Query parameters: two integers ```a``` and ```b```
17+
18+
This query returns the sum of the two numbers in json format.
19+
20+
## Factorial
21+
- Method: GET
22+
- Path: ```/factorial```
23+
- Query parameters: An integer number ```n```
24+
25+
This query display a message with the result of n!. If no number is provided, it takes ```n = 10``` by default.

0 commit comments

Comments
 (0)