Skip to content

Commit e08ecce

Browse files
authored
Create api-reference.md
1 parent 1acf631 commit e08ecce

File tree

1 file changed

+176
-0
lines changed

1 file changed

+176
-0
lines changed

Doc/api-reference.md

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
# API Reference
2+
3+
This document provides detailed information about the API endpoints, their request/response formats, and parameters.
4+
5+
## Addon
6+
7+
### Compile Source Code
8+
9+
Compiles the provided source code.
10+
11+
**Endpoint:** `POST /addon/compile`
12+
13+
**Request Body:**
14+
15+
- Content Type: `text/plain`
16+
- Schema:
17+
- Type: `string`
18+
19+
**Headers:**
20+
21+
- `title`: [string]
22+
- `standar`: [string] (c2a, c++11, c++14, c++17)
23+
- `o`: [string] (1, 2, 3)
24+
- `flags`: [string] (-Wall, etc.)
25+
- `data`: [string] (name 23 args)
26+
- `bot`: [string] (1)
27+
- `curl`: [string] ("on", "off")
28+
29+
**Responses:**
30+
31+
- 200: Successful response
32+
33+
### Download Source Code
34+
35+
Downloads the provided source code.
36+
37+
**Endpoint:** `POST /addon/download`
38+
39+
**Request Body:**
40+
41+
- Content Type: `text/plain`
42+
- Schema:
43+
- Type: `string`
44+
45+
**Headers:**
46+
47+
- `title`: [string]
48+
49+
**Responses:**
50+
51+
- 200: Successful response
52+
53+
### Generate Assembly Code
54+
55+
Generates assembly code for the provided source code.
56+
57+
**Endpoint:** `POST /addon/assembly`
58+
59+
**Request Body:**
60+
61+
- Content Type: `text/plain`
62+
- Schema:
63+
- Type: `string`
64+
65+
**Headers:**
66+
67+
- `title`: [string]
68+
- `standar`: [string] (2a, 11, 14, 17)
69+
- `o`: [string] (1, 2, 3)
70+
- `flags`: [string] (-Wall, etc.)
71+
72+
**Responses:**
73+
74+
- 200: Successful response
75+
76+
## Notes
77+
78+
### Create a New Note
79+
80+
Creates a new note.
81+
82+
**Endpoint:** `POST /notes/new`
83+
84+
**Request Body:**
85+
86+
- Content Type: `application/json`
87+
- Schema:
88+
- Properties:
89+
- `nombre`: [string]
90+
- `conten`: [string]
91+
- `autor`: [string] (optional)
92+
93+
**Responses:**
94+
95+
- 200: Successful response
96+
97+
### Retrieve Notes
98+
99+
Retrieves the notes.
100+
101+
**Endpoint:** `GET /notes/recollector`
102+
103+
**Responses:**
104+
105+
- 200: Successful response
106+
107+
### Add Items to a Note
108+
109+
Adds items to a note.
110+
111+
**Endpoint:** `POST /notes/items`
112+
113+
**Responses:**
114+
115+
- 200: Successful response
116+
117+
### Delete a Note
118+
119+
Deletes a note by ID.
120+
121+
**Endpoint:** `DELETE /notes/delete`
122+
123+
**Parameters:**
124+
125+
- `id`: [array of strings]
126+
127+
**Responses:**
128+
129+
- 200: Successful response
130+
131+
### Retrieve a Note
132+
133+
Retrieves a note by ID.
134+
135+
**Endpoint:** `GET /notes/show`
136+
137+
**Parameters:**
138+
139+
- `id`: [array of strings]
140+
141+
**Responses:**
142+
143+
- 200: Successful response
144+
145+
### Retrieve the Last Note
146+
147+
Retrieves the last note.
148+
149+
**Endpoint:** `GET /notes/last`
150+
151+
**Responses:**
152+
153+
- 200: Successful response
154+
155+
## Crypto
156+
157+
### Generate SHA256 Hash
158+
159+
Generates the SHA256 hash of the provided text.
160+
161+
**Endpoint:** `GET /crypto/sha256`
162+
163+
**Parameters:**
164+
165+
- `plain`: [array of strings]
166+
- `dg`: [array of strings] (hex, base64)
167+
168+
**Responses:**
169+
170+
- 200: Successful response
171+
172+
For more detailed information about the request/response formats and parameters, please refer to the [API Usage](api-usage.md) document.
173+
174+
## License
175+
176+
This API is released under the [MIT License](LICENSE).

0 commit comments

Comments
 (0)