File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change
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.
You can’t perform that action at this time.
0 commit comments