Skip to content

Commit

Permalink
Allows GetNotes to use BasicAuth
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkSuckerberg committed Aug 4, 2023
1 parent e1ac41e commit cbeb003
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions src/functions/Post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit cbeb003

Please sign in to comment.