randydev commited on
Commit
2149c25
·
verified ·
1 Parent(s): edbd1cd

Update plugins/alldownloader.js

Browse files
Files changed (1) hide show
  1. plugins/alldownloader.js +44 -0
plugins/alldownloader.js CHANGED
@@ -18,6 +18,7 @@ import {
18
  TeraboxV2Downloader,
19
  PinterestDownloader,
20
  XsearchDownloaderV2,
 
21
  InstagramDLV2,
22
  XInfoDownloaderV2,
23
  SeachTiktok,
@@ -144,6 +145,49 @@ AllDlRoutes.get('/api/v1/dl/xnxx-search-v2', authenticateApiKey, apiLimiter, asy
144
  }
145
  });
146
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
147
  /**
148
  * @swagger
149
  * /api/v1/dl/instagram-v2:
 
18
  TeraboxV2Downloader,
19
  PinterestDownloader,
20
  XsearchDownloaderV2,
21
+ InstagramDLV3,
22
  InstagramDLV2,
23
  XInfoDownloaderV2,
24
  SeachTiktok,
 
145
  }
146
  });
147
 
148
+ /**
149
+ * @swagger
150
+ * /api/v1/dl/instagram-v3:
151
+ * get:
152
+ * summary: Instagram V3 Downloader
153
+ * tags: [ALL-Downloader]
154
+ * parameters:
155
+ * - in: query
156
+ * name: url
157
+ * required: true
158
+ * description: null
159
+ * schema:
160
+ * type: string
161
+ * - in: header
162
+ * name: x-api-key
163
+ * required: true
164
+ * description: API key for authentication
165
+ * schema:
166
+ * type: string
167
+ * responses:
168
+ * 200:
169
+ * description: Success
170
+ * 400:
171
+ * description: Bad Request (e.g., missing or invalid URL)
172
+ * 401:
173
+ * description: Unauthorized (e.g., missing or invalid API key)
174
+ * 500:
175
+ * description: Internal Server Error
176
+ */
177
+ AllDlRoutes.get('/api/v1/dl/instagram-v3', authenticateApiKey, apiLimiter, async (req, res) => {
178
+ try {
179
+ const q = req.query.url;
180
+
181
+ if (!q) {
182
+ return res.status(400).json({ error: "URL parameter is required." });
183
+ }
184
+ const results = await InstagramDLV3(q);
185
+ res.json({ results });
186
+ } catch (error) {
187
+ res.status(500).json({ error: error.message });
188
+ }
189
+ });
190
+
191
  /**
192
  * @swagger
193
  * /api/v1/dl/instagram-v2: