forked from TingjiaInFuture/allbemcp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
326 lines (299 loc) · 16.4 KB
/
Copy pathindex.html
File metadata and controls
326 lines (299 loc) · 16.4 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Documentation - AllBeAPI</title>
<meta name="description" content="Complete documentation for AllBeAPI - SDK guides, API references, and examples.">
<!-- Stylesheets -->
<link rel="stylesheet" href="../assets/css/main.css">
<link rel="stylesheet" href="../assets/css/components.css">
<!-- Syntax highlighting -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css">
</head>
<body>
<!-- Language Switch -->
<div class="language-switch">
<div class="container">
<a href="../index.html">← Back to Home</a> |
<a href="index.html" class="active">English</a> |
<a href="index_zh.html">中文</a>
</div>
</div>
<!-- Navigation -->
<nav class="navbar">
<div class="container">
<div class="navbar-content">
<a href="../index.html" class="navbar-brand">AllBeAPI</a>
<ul class="navbar-nav">
<li><a href="index.html" class="active">Documentation</a></li>
<li><a href="getting-started.html">Getting Started</a></li>
<li><a href="api.html">API Reference</a></li>
<li><a href="sdk.html">SDK Guide</a></li>
<li><a href="https://github.com/TingjiaInFuture/allbeapi" target="_blank">GitHub</a></li>
</ul>
<div style="display: flex; align-items: center; gap: 1rem;">
<button class="theme-toggle" aria-label="Toggle theme">🌙</button>
</div>
</div>
</div>
</nav>
<div class="container" style="display: grid; grid-template-columns: 250px 1fr; gap: 2rem; margin-top: 2rem;">
<!-- Documentation Navigation -->
<aside class="doc-nav">
<h3 class="doc-nav-title">Documentation</h3>
<ul class="doc-nav-list">
<li class="doc-nav-item">
<a href="index.html" class="doc-nav-link active">Overview</a>
</li>
<li class="doc-nav-item">
<a href="getting-started.html" class="doc-nav-link">Getting Started</a>
<ul class="doc-nav-sublist">
<li><a href="getting-started.html#installation" class="doc-nav-link">Installation</a></li>
<li><a href="getting-started.html#quickstart" class="doc-nav-link">Quick Start</a></li>
<li><a href="getting-started.html#examples" class="doc-nav-link">Examples</a></li>
</ul>
</li>
<li class="doc-nav-item">
<a href="api.html" class="doc-nav-link">API Reference</a>
<ul class="doc-nav-sublist">
<li><a href="api.html#marked" class="doc-nav-link">Markdown (Marked)</a></li>
<li><a href="api.html#beautifulsoup" class="doc-nav-link">HTML Parsing</a></li>
<li><a href="api.html#prettier" class="doc-nav-link">Code Formatting</a></li>
<li><a href="api.html#qrcode" class="doc-nav-link">QR Code</a></li>
<li><a href="api.html#all-apis" class="doc-nav-link">All APIs</a></li>
</ul>
</li>
<li class="doc-nav-item">
<a href="sdk.html" class="doc-nav-link">SDK Guide</a>
<ul class="doc-nav-sublist">
<li><a href="sdk.html#javascript" class="doc-nav-link">JavaScript SDK</a></li>
<li><a href="sdk.html#python" class="doc-nav-link">Python SDK</a></li>
<li><a href="sdk.html#rest" class="doc-nav-link">REST API</a></li>
</ul>
</li>
<li class="doc-nav-item">
<a href="contributing.html" class="doc-nav-link">Contributing</a>
</li>
</ul>
</aside>
<!-- Main Documentation Content -->
<main class="doc-content">
<h1>AllBeAPI Documentation</h1>
<p class="lead">Welcome to the comprehensive documentation for AllBeAPI - your lightweight universal SDK for integrating popular third-party libraries.</p>
<div class="alert alert-info">
<strong>New to AllBeAPI?</strong> Start with our <a href="getting-started.html">Getting Started Guide</a> for a quick introduction.
</div>
<section id="overview">
<h2>What is AllBeAPI?</h2>
<p>AllBeAPI is a lightweight, universal SDK that provides a unified interface to access a wide range of commonly used third-party libraries. Instead of learning and managing multiple individual libraries, AllBeAPI offers:</p>
<ul>
<li><strong>Unified Interface:</strong> Consistent API across all integrated libraries</li>
<li><strong>Multiple SDKs:</strong> Support for JavaScript, Python, and direct REST API calls</li>
<li><strong>13+ Integrations:</strong> Popular libraries for common development tasks</li>
<li><strong>Easy to Use:</strong> Simple installation and minimal configuration</li>
</ul>
</section>
<section id="architecture">
<h2>Architecture</h2>
<p>AllBeAPI follows a microservices architecture where each integrated library runs as a separate service:</p>
<div class="code-example">
<pre class="code-block" data-language="text">┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ JavaScript │ │ Python │ │ REST API │
│ SDK │ │ SDK │ │ Client │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
└───────────────────────┼───────────────────────┘
│
┌─────────────────┐
│ AllBeAPI │
│ Gateway │
└─────────────────┘
│
┌───────────────────────┼───────────────────────┐
│ │ │
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Marked │ │ BeautifulSoup│ │ Prettier │ │ ... │
│ Service │ │ Service │ │ Service │ │ Services │
└─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘</pre>
</div>
</section>
<section id="supported-libraries">
<h2>Supported Libraries</h2>
<p>AllBeAPI currently integrates the following popular libraries:</p>
<div class="grid grid-2">
<div class="api-card">
<div class="api-card-header">
<div class="api-card-title">
<h3>Text Processing</h3>
<span class="api-badge">4 APIs</span>
</div>
</div>
<div class="api-card-body">
<ul class="api-endpoints">
<li>
<span class="method-badge method-post">POST</span>
<span class="endpoint-path">Marked.js - Markdown to HTML</span>
</li>
<li>
<span class="method-badge method-post">POST</span>
<span class="endpoint-path">Prettier - Code formatting</span>
</li>
<li>
<span class="method-badge method-post">POST</span>
<span class="endpoint-path">Pygments - Syntax highlighting</span>
</li>
<li>
<span class="method-badge method-post">POST</span>
<span class="endpoint-path">Diff - Text comparison</span>
</li>
</ul>
</div>
</div>
<div class="api-card">
<div class="api-card-header">
<div class="api-card-title">
<h3>Data Processing</h3>
<span class="api-badge">4 APIs</span>
</div>
</div>
<div class="api-card-body">
<ul class="api-endpoints">
<li>
<span class="method-badge method-post">POST</span>
<span class="endpoint-path">BeautifulSoup - HTML parsing</span>
</li>
<li>
<span class="method-badge method-post">POST</span>
<span class="endpoint-path">CSV Parser - CSV to JSON</span>
</li>
<li>
<span class="method-badge method-post">POST</span>
<span class="endpoint-path">Ajv - JSON validation</span>
</li>
<li>
<span class="method-badge method-post">POST</span>
<span class="endpoint-path">ESLint - Code linting</span>
</li>
</ul>
</div>
</div>
<div class="api-card">
<div class="api-card-header">
<div class="api-card-title">
<h3>Media Generation</h3>
<span class="api-badge">3 APIs</span>
</div>
</div>
<div class="api-card-body">
<ul class="api-endpoints">
<li>
<span class="method-badge method-post">POST</span>
<span class="endpoint-path">QR Code - Image generation</span>
</li>
<li>
<span class="method-badge method-post">POST</span>
<span class="endpoint-path">Mermaid - Diagram creation</span>
</li>
<li>
<span class="method-badge method-post">POST</span>
<span class="endpoint-path">PDFKit - PDF generation</span>
</li>
</ul>
</div>
</div>
<div class="api-card">
<div class="api-card-header">
<div class="api-card-title">
<h3>Security & Utils</h3>
<span class="api-badge">2 APIs</span>
</div>
</div>
<div class="api-card-body">
<ul class="api-endpoints">
<li>
<span class="method-badge method-post">POST</span>
<span class="endpoint-path">Sanitize HTML - XSS protection</span>
</li>
<li>
<span class="method-badge method-post">POST</span>
<span class="endpoint-path">Pillow - Image processing</span>
</li>
</ul>
</div>
</div>
</div>
</section>
<section id="quick-example">
<h2>Quick Example</h2>
<p>Here's a simple example showing how to use AllBeAPI with the JavaScript SDK:</p>
<div class="code-example">
<div class="code-tabs">
<button class="code-tab active">JavaScript</button>
<button class="code-tab">Python</button>
</div>
<div class="code-content">
<pre class="code-block" data-language="javascript">// Initialize the AllBeAPI client
const api = new AllBeApi();
// Convert Markdown to HTML
const markdown = "# Hello World\nThis is **bold** text.";
const htmlResult = await api.marked.render(markdown);
console.log(htmlResult);
// Generate a QR code
const qrBlob = await api.pythonQrcode.generateQrcode("https://allbeapi.com");
const imageUrl = URL.createObjectURL(qrBlob);
// Display the QR code
const img = document.createElement('img');
img.src = imageUrl;
document.body.appendChild(img);</pre>
<pre class="code-block" data-language="python" style="display: none;">from allbeapi import AllBeApi
# Initialize the AllBeAPI client
api = AllBeApi()
# Convert Markdown to HTML
markdown = "# Hello World\nThis is **bold** text."
html_result = api.marked.render(markdown)
print(html_result)
# Generate a QR code
qr_bytes = api.python_qrcode.generate_qrcode("https://allbeapi.com")
with open("qrcode.png", "wb") as f:
f.write(qr_bytes)</pre>
</div>
</div>
</section>
<section id="next-steps">
<h2>Next Steps</h2>
<div class="grid grid-3">
<div class="card">
<h3>🚀 Getting Started</h3>
<p>Learn how to install and configure AllBeAPI in your project.</p>
<a href="getting-started.html" class="btn btn-primary">Get Started</a>
</div>
<div class="card">
<h3>📚 API Reference</h3>
<p>Explore the complete API documentation with examples.</p>
<a href="api.html" class="btn btn-outline">API Docs</a>
</div>
<div class="card">
<h3>💻 SDK Guide</h3>
<p>Learn how to use the JavaScript and Python SDKs.</p>
<a href="sdk.html" class="btn btn-outline">SDK Guide</a>
</div>
</div>
</section>
</main>
</div>
<!-- Footer -->
<footer class="footer">
<div class="container">
<p>© <span id="currentYear"></span> AllBeAPI Project. Licensed under the MIT License.</p>
</div>
</footer>
<!-- Scripts -->
<script src="../assets/js/main.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<script>
document.getElementById("currentYear").textContent = new Date().getFullYear();
hljs.highlightAll();
</script>
</body>
</html>