Skip to content

Commit f6dd919

Browse files
authored
Create api_reference.py
1 parent 2b411c5 commit f6dd919

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/docs/api_reference.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
class APIReference:
2+
def __init__(self):
3+
self.endpoints = {
4+
"get_price": {
5+
"method": "GET",
6+
"description": "Fetch the current price of the asset.",
7+
"params": {},
8+
"example": "/api/get_price"
9+
},
10+
"submit_transaction": {
11+
"method": "POST",
12+
"description": "Submit a new transaction.",
13+
"params": {"amount": "float", "to": "string"},
14+
"example": "/api/submit_transaction"
15+
},
16+
"vote": {
17+
"method": "POST",
18+
"description": "Vote on a governance proposal.",
19+
"params": {"proposal_id": "string", "decision": "bool"},
20+
"example": "/api/vote"
21+
}
22+
}
23+
24+
def get_reference(self):
25+
return self.endpoints

0 commit comments

Comments
 (0)