File size: 1,633 Bytes
0b51d18 d5b52db 5da1c2e d5b52db 0b51d18 5da1c2e 0b51d18 dba24db 0b51d18 dba24db 0b51d18 dba24db 7a5add6 dba24db 0b51d18 6c91077 0b51d18 5da1c2e |
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 |
import axios from 'axios';
import { trbtoken } from '../all.js';
export async function TeraboxV3Downloader(url) {
const options = {
method: 'GET',
url: 'https://terabox-downloader-tool.p.rapidapi.com/api',
headers: {
'x-rapidapi-key': `${trbtoken}`,
'x-rapidapi-host': 'terabox-downloader-tool.p.rapidapi.com',
},
params: {
data: url
}
};
try {
const response = await axios.request(options);
return response.data;
} catch (error) {
console.error(error);
return null;
}
}
export async function TeraboxV2Downloader(url) {
const options = {
method: 'GET',
url: 'https://terabox-downloader-direct-download-link-generator2.p.rapidapi.com/url',
headers: {
'x-rapidapi-key': `${trbtoken}`,
'x-rapidapi-host': 'terabox-downloader-direct-download-link-generator2.p.rapidapi.com',
},
params: {
url: url
}
};
try {
const response = await axios.request(options);
return response.data;
} catch (error) {
console.error(error);
return null;
}
}
export async function TeraboxDownloader(url) {
const options = {
method: 'POST',
url: 'https://terabox-downloader-direct-download-link-generator.p.rapidapi.com/fetch',
headers: {
'x-rapidapi-key': `${trbtoken}`,
'x-rapidapi-host': 'terabox-downloader-direct-download-link-generator.p.rapidapi.com',
'Content-Type': 'application/json'
},
data: {
url: url
}
};
try {
const response = await axios.request(options);
return response.data;
} catch (error) {
console.error(error);
return null;
}
} |