randydev commited on
Commit
bc3b7c1
·
verified ·
1 Parent(s): b48aba8

Update plugins/alldownloader.js

Browse files
Files changed (1) hide show
  1. plugins/alldownloader.js +40 -2
plugins/alldownloader.js CHANGED
@@ -19,6 +19,7 @@ import {
19
  PinterestDownloader,
20
  XsearchDownloaderV2,
21
  InstagramDLV2,
 
22
  } from '../lib/all.js';
23
 
24
  import { authenticateApiKey, apiLimiter } from '../middleware/midware.js';
@@ -55,10 +56,47 @@ async function downloadMedia(media) {
55
  }
56
  }
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
  /**
60
  * @swagger
61
- * /api/v1/dl/xnxxsearch-v2:
62
  * get:
63
  * summary: Xnxx Search V2 Downloader
64
  * tags: [ALL-Downloader]
@@ -79,7 +117,7 @@ async function downloadMedia(media) {
79
  * 500:
80
  * description: Internal Server Error
81
  */
82
- AllDlRoutes.get('/api/v1/dl/xnxxsearch-v2', apiLimiter, async (req, res) => {
83
  try {
84
  const q = req.query.q;
85
 
 
19
  PinterestDownloader,
20
  XsearchDownloaderV2,
21
  InstagramDLV2,
22
+ XInfoDownloaderV2,
23
  } from '../lib/all.js';
24
 
25
  import { authenticateApiKey, apiLimiter } from '../middleware/midware.js';
 
56
  }
57
  }
58
 
59
+ /**
60
+ * @swagger
61
+ * /api/v1/dl/xnxx-info-v2:
62
+ * get:
63
+ * summary: Xnxx Info V2 Downloader
64
+ * tags: [ALL-Downloader]
65
+ * parameters:
66
+ * - in: query
67
+ * name: q
68
+ * required: true
69
+ * description: null
70
+ * schema:
71
+ * type: string
72
+ * responses:
73
+ * 200:
74
+ * description: Success
75
+ * 400:
76
+ * description: Bad Request (e.g., missing or invalid URL)
77
+ * 401:
78
+ * description: Unauthorized (e.g., missing or invalid API key)
79
+ * 500:
80
+ * description: Internal Server Error
81
+ */
82
+ AllDlRoutes.get('/api/v1/dl/xnxx-info-v2', apiLimiter, async (req, res) => {
83
+ try {
84
+ const q = req.query.url;
85
+
86
+ if (!q) {
87
+ return res.status(400).json({ error: "url parameter is required." });
88
+ }
89
+ const results = await XInfoDownloaderV2(q);
90
+ res.json({ message: results });
91
+ // console.dir(testings);
92
+ } catch (error) {
93
+ res.status(500).json({ error: error.message });
94
+ }
95
+ });
96
 
97
  /**
98
  * @swagger
99
+ * /api/v1/dl/xnxx-search-v2:
100
  * get:
101
  * summary: Xnxx Search V2 Downloader
102
  * tags: [ALL-Downloader]
 
117
  * 500:
118
  * description: Internal Server Error
119
  */
120
+ AllDlRoutes.get('/api/v1/dl/xnxx-search-v2', apiLimiter, async (req, res) => {
121
  try {
122
  const q = req.query.q;
123