Update README/docs
Browse files- README.md +2 -0
- src/main.ts +5 -1
- src/routes/docs.ts +11 -0
README.md
CHANGED
|
@@ -13,6 +13,8 @@ Proxy server for LINE store API and CDN.
|
|
| 13 |
|
| 14 |
For educational and research purposes only.
|
| 15 |
|
|
|
|
|
|
|
| 16 |
## API Documentation
|
| 17 |
|
| 18 |
Please refer to [API.md](API.md).
|
|
|
|
| 13 |
|
| 14 |
For educational and research purposes only.
|
| 15 |
|
| 16 |
+
[The demo server provided by Hugging Face馃](https://daydreamer-json-line-stamp-api-proxy.hf.space/) is available.
|
| 17 |
+
|
| 18 |
## API Documentation
|
| 19 |
|
| 20 |
Please refer to [API.md](API.md).
|
src/main.ts
CHANGED
|
@@ -59,7 +59,9 @@ Example:
|
|
| 59 |
- /api/download/sticker/single/23214968?device_type=android&is_static=false&size=1
|
| 60 |
- /api/download/sticker/thumb/18537?device_type=ios
|
| 61 |
- /api/download/sticker/sound/single/350279022?device_type=ios
|
| 62 |
-
- /api/download/sticker/sound/thumb/18537?device_type=ios
|
|
|
|
|
|
|
| 63 |
200,
|
| 64 |
{
|
| 65 |
'Content-Type': 'text/plain',
|
|
@@ -75,11 +77,13 @@ import searchRoutes from './routes/search';
|
|
| 75 |
import metaRoutes from './routes/meta';
|
| 76 |
import stickerRoutes from './routes/download/sticker';
|
| 77 |
import emojiRoutes from './routes/download/emoji';
|
|
|
|
| 78 |
|
| 79 |
apiRoutes.route('/search', searchRoutes);
|
| 80 |
apiRoutes.route('/meta', metaRoutes);
|
| 81 |
apiRoutes.route('/download/sticker', stickerRoutes);
|
| 82 |
apiRoutes.route('/download/emoji', emojiRoutes);
|
|
|
|
| 83 |
|
| 84 |
// 銈点兗銉愩兗璧峰嫊
|
| 85 |
const port = process.env.PORT || 3000;
|
|
|
|
| 59 |
- /api/download/sticker/single/23214968?device_type=android&is_static=false&size=1
|
| 60 |
- /api/download/sticker/thumb/18537?device_type=ios
|
| 61 |
- /api/download/sticker/sound/single/350279022?device_type=ios
|
| 62 |
+
- /api/download/sticker/sound/thumb/18537?device_type=ios
|
| 63 |
+
|
| 64 |
+
More info: /docs`,
|
| 65 |
200,
|
| 66 |
{
|
| 67 |
'Content-Type': 'text/plain',
|
|
|
|
| 77 |
import metaRoutes from './routes/meta';
|
| 78 |
import stickerRoutes from './routes/download/sticker';
|
| 79 |
import emojiRoutes from './routes/download/emoji';
|
| 80 |
+
import docsRoutes from './routes/docs';
|
| 81 |
|
| 82 |
apiRoutes.route('/search', searchRoutes);
|
| 83 |
apiRoutes.route('/meta', metaRoutes);
|
| 84 |
apiRoutes.route('/download/sticker', stickerRoutes);
|
| 85 |
apiRoutes.route('/download/emoji', emojiRoutes);
|
| 86 |
+
app.route('/docs', docsRoutes);
|
| 87 |
|
| 88 |
// 銈点兗銉愩兗璧峰嫊
|
| 89 |
const port = process.env.PORT || 3000;
|
src/routes/docs.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { Hono } from 'hono';
|
| 2 |
+
import { loadConfig } from '../utils/config';
|
| 3 |
+
|
| 4 |
+
const config = loadConfig();
|
| 5 |
+
const requestTimeout = config.request_timeout || 30000;
|
| 6 |
+
|
| 7 |
+
const app = new Hono();
|
| 8 |
+
|
| 9 |
+
app.get('/', (c) => c.redirect('https://github.com/daydreamer-json/line-stamp-api-proxy/blob/main/API.md', 301));
|
| 10 |
+
|
| 11 |
+
export default app;
|