From 30b0adcacef48ac53aea13cbdc3288db0bd8d103 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sun, 17 Oct 2021 16:54:53 +0200 Subject: Init --- src/api/misskey/index.ts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/api/misskey/index.ts (limited to 'src/api/misskey') diff --git a/src/api/misskey/index.ts b/src/api/misskey/index.ts new file mode 100644 index 0000000..64bfe67 --- /dev/null +++ b/src/api/misskey/index.ts @@ -0,0 +1,26 @@ +/* +import got from "got"; +import FormData from "form-data"; +import stream from "stream"; +import config from "../../config"; + +export interface DriveFile { + id: string; +} + +export const client = got.extend({ + prefixUrl: config.misskey.instance, +}); + +export function upload(buf: Buffer, filename: string) { + const body = new FormData(); + body.append("i", config.misskey.token); + body.append("file", buf, { filename }); + + return client.post("drive/files/create", { body }).json(); +}; + +export function createNote() { + +} +*/ -- cgit v1.2.3-70-g09d2