randydev commited on
Commit
82e4c0f
·
verified ·
1 Parent(s): 1d1d4c5

Update plugins/alldownloader.js

Browse files
Files changed (1) hide show
  1. plugins/alldownloader.js +43 -4
plugins/alldownloader.js CHANGED
@@ -10,19 +10,20 @@ import {
10
  PinterestDL,
11
  sfilemobiSearch,
12
  TiktokDownloader,
13
- XnxxDownloader,
14
  TwitterDownloader,
15
- InstagramDownloader,
 
16
  TeraboxDownloader,
17
  TeraboxV2Downloader,
18
  TeraboxV3Downloader,
 
19
  XsearchDownloaderV2,
 
20
  InstagramDLV3,
21
  InstagramDLV2,
22
  InstagramDLV4,
23
  XInfoDownloaderV2,
24
  TelegramUseLog,
25
- TwitterDownloaderV2,
26
  } from '../lib/all.js';
27
 
28
  import { authenticateApiKey, apiLimiter } from '../middleware/midware.js';
@@ -58,6 +59,45 @@ async function downloadMedia(media) {
58
  }
59
  }
60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  /**
62
  * @swagger
63
  * /api/v1/dl/twitter-v2:
@@ -97,7 +137,6 @@ AllDlRoutes.get('/api/v1/dl/twitter-v2', async (req, res) => {
97
  }
98
  });
99
 
100
-
101
  /**
102
  * @swagger
103
  * /api/v1/dl/xnxx-info-v2:
 
10
  PinterestDL,
11
  sfilemobiSearch,
12
  TiktokDownloader,
 
13
  TwitterDownloader,
14
+ TwitterDownloderV3,
15
+ TwitterDownloaderV2,
16
  TeraboxDownloader,
17
  TeraboxV2Downloader,
18
  TeraboxV3Downloader,
19
+ XnxxDownloader,
20
  XsearchDownloaderV2,
21
+ InstagramDownloader,
22
  InstagramDLV3,
23
  InstagramDLV2,
24
  InstagramDLV4,
25
  XInfoDownloaderV2,
26
  TelegramUseLog,
 
27
  } from '../lib/all.js';
28
 
29
  import { authenticateApiKey, apiLimiter } from '../middleware/midware.js';
 
59
  }
60
  }
61
 
62
+ /**
63
+ * @swagger
64
+ * /api/v1/dl/twitter-v3:
65
+ * get:
66
+ * summary: Twitter V3 Downloader
67
+ * tags: [ALL-Downloader]
68
+ * parameters:
69
+ * - in: query
70
+ * name: url
71
+ * required: true
72
+ * description: null
73
+ * schema:
74
+ * type: string
75
+ * - in: header
76
+ * name: x-api-key
77
+ * required: true
78
+ * description: API key for authentication
79
+ * schema:
80
+ * type: string
81
+ * responses:
82
+ * 200:
83
+ * description: Success
84
+ * 400:
85
+ * description: Bad Request (e.g., missing or invalid URL)
86
+ * 401:
87
+ * description: Unauthorized (e.g., missing or invalid API key)
88
+ * 500:
89
+ * description: Internal Server Error
90
+ */
91
+ AllDlRoutes.get('/api/v1/dl/twitter-v3', async (req, res) => {
92
+ try {
93
+ const q = req.query.url;
94
+ const results = await TwitterDownloderV3(q);
95
+ res.json({ message: results });
96
+ } catch (error) {
97
+ res.status(500).json({ error: error.message });
98
+ }
99
+ });
100
+
101
  /**
102
  * @swagger
103
  * /api/v1/dl/twitter-v2:
 
137
  }
138
  });
139
 
 
140
  /**
141
  * @swagger
142
  * /api/v1/dl/xnxx-info-v2: