From cbeb003fb6a00aad8bdad7f981e071a2aefd3484 Mon Sep 17 00:00:00 2001 From: Mark Suckerberg Date: Thu, 3 Aug 2023 20:04:41 -0500 Subject: [PATCH] Allows GetNotes to use BasicAuth --- src/functions/Post.ts | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/functions/Post.ts b/src/functions/Post.ts index 0c89820..7a03d14 100644 --- a/src/functions/Post.ts +++ b/src/functions/Post.ts @@ -202,13 +202,21 @@ export async function GetNotes( blogIdentifier: string, id: number | string, beforeTimestamp = Number.MAX_VALUE, - mode: "all" | "likes" | "conversation" | "rollup" | "reblogs_with_tags" = "all" + mode: "all" | "likes" | "conversation" | "rollup" | "reblogs_with_tags" = "all", + basicAuth = false ) { return ( - await accessTumblrAPI(token, `blog/${blogIdentifier}/notes`, { - id: id.toString(), - mode, - before_timestamp: beforeTimestamp.toString(), - }) + await accessTumblrAPI( + token, + `blog/${blogIdentifier}/notes`, + { + id: id.toString(), + mode, + before_timestamp: beforeTimestamp.toString(), + }, + "GET", + undefined, + basicAuth + ) ).response as TumblrNoteResponse; }