1
0
mirror of https://github.com/snobu/destreamer.git synced 2026-01-17 05:22:18 +00:00
Files
destreamer-mirror/Thumbnail.ts
2020-04-09 11:35:14 +03:00

15 lines
420 B
TypeScript

import terminalImage from 'terminal-image';
import axios from 'axios';
export async function drawThumbnail(posterImage: string, accessToken: string) {
let thumbnail = await axios.get(posterImage,
{
headers: {
Authorization: `Bearer ${accessToken}`
},
responseType: 'arraybuffer'
});
console.log(await terminalImage.buffer(thumbnail.data));
}